Whether you’re handling a network at work or simply keeping an eye out for your home systems, it is very important to understand your network connections– how you communicate with public systems and those on the local network. This article covers some of the most important commands readily available on Linux to help you get a clear understanding of your regional network and how it reaches outside.While the links
provided include essential tips on using network commands, some consist of commands that have actually been deprecated in favor of newer commands. A few of the most important commands to know today include ip a, ip neigh, ping, tracepath, dig, tcpdump and whois. (If a command is
deprecated, it doesn’t indicate it does not work or isn’t offered. It indicates that the command has been replaced with a newer command that serves the very same function and is most likely better supported.)
ip a
The ip a command will provide info on your network interface. This includes your designated IP address (even if appointed immediately) and the loopback address that is utilized when the system requires to communicate with itself, the benefit being that it stays stable where the designated IP address might not constantly be the same.The ip a command has actually largely changed the deprecated ifconfig command. It offers the same range of information, but in a different format. The output listed below programs the loopback(lo) address (127.0.0.1) and the system’s assigned (enp0s25) address (192.168.0.7).
$ ip a 1: lo:
The ip link command offers comparable info, however less of it.
$ ip link 1: lo:
ip neigh
$ arp -a _ entrance (192.168.0.1) at 1c:64:99: ec: b1:97 [ether] on enp0s25? (192.168.0.6) at b0: c0:90:3 f:10:15 [ether] on enp0s25? (192.168.0.4) at 74: e2:0 c: da:27:53 [ether] on enp0s25? (192.168.0.18) at cc:3 d:82:39:78:85 [ether] on enp0s25? (192.168.0.22) at
The ip neigh command can provide much more information about systems on your network including MAC address, and it supports removing IP addresses from your arp table.ping The ping
command continues to be really helpful by sending out packages to another system to gather an action that shows that the system is up and reachable.
$ ping www.networkworld.com PING idg.map.fastly.net (146.75.30.165) 56( 84) bytes of information. 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=1 ttl=57 time=49.2 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=2 ttl=57 time=32.4 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=3 ttl=57 time=125 ms 64 bytes from 146.75.30.165 (146.75.30.165): icmp_seq=4 ttl=57 time=75.9 ms– idg.map.fastly.net ping statistics– 4 packets transmitted, 4 got, 0% package loss, time 3000ms rtt min/avg/max/ mdev = 32.388/ 70.534/ 124.680/ 34.892 ms
tracepath
The tracepath command follows …