Javatpoint Logo
Javatpoint Logo

Linux Networking Commands

Every computer is connected to some other computer through a network whether internally or externally to exchange some information. This network can be small as some computers connected in your home or office, or can be large or complicated as in large University or the entire Internet.

Maintaining a system's network is a task of System/Network administrator. Their task includes network configuration and troubleshooting.

Here is a list of Networking and Troubleshooting commands:

ifconfig Display and manipulate route and network interfaces.
ip It is a replacement of ifconfig command.
traceroute Network troubleshooting utility.
tracepath Similar to traceroute but doesn't require root privileges.
ping To check connectivity between two nodes.
netstat Display connection information.
ss It is a replacement of netstat.
dig Query DNS related information.
nslookup Find DNS related query.
route Shows and manipulate IP routing table.
host Performs DNS lookups.
arp View or add contents of the kernel's ARP table.
iwconfig Used to configure wireless network interface.
hostname To identify a network name.
curl or wget To download a file from internet.
mtr Combines ping and tracepath into a single command.
whois Will tell you about the website's whois.
ifplugstatus Tells whether a cable is plugged in or not.

Explanation of the above commands:

ifconfig: ifconfig is short for interface configurator. This command is utilized in network inspection, initializing the interface, enabling or disabling an IP address, and configuring an interface with an IP address. Also, it is used to show the network and route interface.

The basic details shown with ifconfig are:

  • MTU
  • MAC address
  • IP address


ip: It is the updated and latest edition of ifconfig command. The command provides the information of every network, such as ifconfig. Also, it can be used to get information about a particular interface.


traceroute: The traceroute command is one of the most helpful commands in the networking field. It's used to balance the network. It identifies the delay and decides the pathway to our target. Basically, it aids in the below ways:

  • It determines the location of the network latency and informs it.
  • It follows the path to the destination.
  • It gives the names and recognizes all devices on the path.


tracepath: The tracepath command is the same as the traceroute command, and it is used to find network delays. Besides, it does not need root privileges. By default, it comes pre-installed in Ubuntu. It traces the path to the destination and recognizes all hops in it. It identifies the point at which the network is weak if our network is not strong enough.


ping: It is short for Packet Internet Groper. The ping command is one of the widely used commands for network troubleshooting. Basically, it inspects the network connectivity between two different nodes.


netstat: It is short for network statistics. It gives statistical figures of many interfaces, which contain open sockets, connection information, and routing tables.


ss: This command is the substitution for the netstat command. The ss command is more informative and much faster than netstat. The ss command's faster response is possible because it fetches every information from inside the kernel userspace.


nsloopup: The nslookup command is an older edition of the dig command. Also, it is utilized for DNS related problems.


dig: dig is short for Domain Information Groper. The dig command is an improvised edition of the nslookup command. It is utilized in DNS lookup to reserve the DNS name server. Also, it is used to balance DNS related problems. Mainly, it is used to authorize DNS mappings, host addresses, MX records, and every other DNS record for the best DNS topography understanding.


route: The route command shows and employs the routing table available for our system. Basically, a router is used to detect a better way to transfer the packets around a destination.


host: The host command shows the IP address for a hostname and the domain name for an IP address. Also, it is used to get DNS lookup for DNS related issues.


arp: The arp command is short for Address Resolution Protocol. This command is used to see and include content in the ARP table of the kernel.


iwconfig: It is a simple command which is used to see and set the system's hostname.


curl and wget: These commands are used to download files from CLI from the internet. curl must be specified with the "O" option to get the file, while wget is directly used.

curl Syntax:

wget Syntax:

mtr: The mtr command is a mix of the traceroute and ping commands. It regularly shows information related to the packets transferred using the ping time of all hops. Also, it is used to see network problems.


whois: The whois command fetches every website related information. We can get every information of a website, such as an owner and the registration information.


ifplugstatus: The ifplugstatus command checks whether a cable is currently plugged into a network interface. It is not available in Ubuntu directly. We can install it with the help of the below command:


iftop: The iftop command is utilized in traffic monitoring.

tcpdump: The tcpdump command is widely used in network analysis with other commands of the Linux network. It analyses the traffic passing from the network interface and shows it. When balancing the network, this type of packet access will be crucial.


Next TopicLinux ifconfig

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA