Linux Computer Network Advanced Command | Network Command

Linux computer network command refers to the various networking protocols, tools, and configurations used in Linux operating systems.

In this blog, you will learn about all the Networking Commands in Linux. Networking Commands are mostly used for sending and checking the packets from one System to another System. So let’s get started with the blog.

Introduction to Linux Networking

Linux computer network command or Linux networking refers to the various networking protocols, tools, and configurations used in Linux operating systems. Linux offers a wide range of networking features and capabilities, making it a popular choice for network administrators and developers.

Some common Linux networking protocols include TCP/IP, DNS, DHCP, SMTP, FTP, SSH, and SNMP. These protocols allow Linux systems to communicate with other systems and devices on the network, exchange data, and provide various network services.

Linux also offers a variety of networking tools, such as ifconfig, ip, netstat, traceroute, ping, and tcpdump. These tools allow administrators to manage network interfaces, diagnose network issues, and monitor network traffic.

In addition to protocols and tools, Linux networking involves configuring network settings and services. This includes setting up IP addresses, routing tables, firewall rules, and network services such as DNS and DHCP.

Overall, Linux networking is a broad topic encompassing a range of protocols, tools, and configurations. With its flexibility and powerful networking capabilities, Linux is widely used in various networking environments, from small home networks to large enterprise networks.

List of Linux Computer Network Command

Here is the list of Linux Computer Network Command you should know:

A) ifconfig

The command ifconfig" is a networking utility used to configure and display information about network interfaces on a Unix-like operating system such as Linux or macOS. It is typically used to view the IP address, netmask, and other network-related information of a system’s network interfaces.

When executed without any arguments, the ifconfig command displays information about all the network interfaces on the system. The output includes details such as the interface name, IP address, netmask, MAC address, and other related information.

The “ifconfig” command stands for interface configuration. When the network and device are connected, an interface is created.

Basic information displayed upon using the ifconfig command is:

  1. IP address.
  2. MAC address.
  3. MTU (Maximum Transmission Unit)

Example:

$ ifconfig
eno1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e4:e7:49:0b:d4:ec  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2896  bytes 367818 (367.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2896  bytes 367818 (367.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.108  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::1d99:aa9b:c41:2bc6  prefixlen 64  scopeid 0x20<link>
        ether d8:9c:67:ad:6d:df  txqueuelen 1000  (Ethernet)
        RX packets 132971  bytes 150853029 (150.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74833  bytes 12873954 (12.8 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The above command shows the IP addresses of all three i.e IP address, MAC address, and MTU.

1) Get details of a specific interface

$ ifconfig ethO

$ ifconfig lo

$ ifconfig wlo1
 

2) Assigning IP address and Gateway

An interface can have an IP address and a gateway assigned to it, but these settings will be removed following a system restart.

Let’s see an example

$ ifconfig eth0 <address> netmask <address>  

3) Enable or Disable specific interface

For enabling the interface

$ ifup eth0

For disabling the interface

$ ifdown eth0

4) Setting MTU size

The MTU (Maximum Transmission Unit) size is 1500 by default, however, you can alter it to any number you choose.

$ ifconfig eth0 mtu xxx

Here, xxx represents the size of the MTU.

B) ip

The "ip” command is a powerful network configuration tool in Linux. It allows you to view and modify network interface settings, such as IP addresses, routes, and network devices. It is also said to be the upgraded command of the ifconfig command.

Syntax:

$ ip

$ ip addr

How does the IP command work?

A Linux system’s handling of IP addresses, network interface controllers, and other things is controlled by the IP command.

We do not need to reboot the system after making modifications with the IP command; they take effect right away.

The IP command makes use of the following helpful objects:

Address: Its contents include IP address ranges.

Link: It has network interfaces, including Wi-Fi adapters and connections.

Route: The protocols that control the routing of traffic transmitted to addresses via interfaces are contained in this section (links).

Some of the important ip command

  • ip link: Lists all the network interfaces on the system, their status, and their settings.
  • ip addr: Shows the IP address configuration of all network interfaces on the system.
  • ip route: Displays the routing table of the system, including the default route and any additional routes.
  • ip neigh: Shows the ARP cache table of the system, which contains information about the IP addresses and MAC addresses of other devices on the network.
  • ip tunnel: Creates and manages IP tunnels, which are used to encapsulate packets in another protocol and send them across a network.

A) Listing the IP addresses

$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether e4:e7:49:0b:d4:ec brd ff:ff:ff:ff:ff:ff
    altname enp2s0
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether d8:9c:67:ad:6d:df brd ff:ff:ff:ff:ff:ff
    altname wlp3s0
    inet 192.168.0.108/24 brd 192.168.0.255 scope global dynamic noprefixroute wlo1
       valid_lft 5317sec preferred_lft 5317sec
    inet6 fe80::1d99:aa9b:c41:2bc6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The above command displays the computer’s IP addresses and executes the IP command.

B) Display the IPv4 and IPv6 addresses

$ ip -4 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    altname wlp3s0
    inet 192.168.0.108/24 brd 192.168.0.255 scope global dynamic noprefixroute wlo1
       valid_lft 5095sec preferred_lft 5095sec
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
       
$ ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::1d99:aa9b:c41:2bc6/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

The above two command i.e ipv4 and ipv6 displays the IP version 4 address and IP version 6 address respectively.

C) traceroute

The "traceroute” command is a network diagnostic tool used in Linux and other Unix-based operating systems to trace the route taken by packets across an Internet Protocol (IP) network.

It works by sending packets with gradually increasing time-to-live (TTL) values to the destination host and observing the intermediate routers’ responses and is mainly used to troubleshoot the network. It detects the delay and determines the pathway to your target.

Syntax:

$ traceroute [destination or an domain name]

Note: traceroute is not inbuilt command, so we have to install it in our system.

$ sudo apt install traceroute            
$ sudo apt install inetutils-traceroute

$ traceroute www.google.com
traceroute to google.com (142.250.183.46), 30 hops max, 60 byte packets
 1  _gateway (192.168.0.1)  59.180 ms  60.073 ms  60.045 ms
 2  172.21.240.2 (172.21.240.2)  60.398 ms  60.377 ms  60.358 ms
 3  172.21.95.1 (172.21.95.1)  61.257 ms  61.240 ms  60.829 ms
 4  72.14.216.40 (72.14.216.40)  61.206 ms  61.179 ms  61.162 ms
 5  * * *
 6  172.253.77.22 (172.253.77.22)  65.024 ms * 142.251.69.42 (142.251.69.42)  2.874 ms
 7  108.170.248.195 (108.170.248.195)  20.560 ms 108.170.248.219 (108.170.248.219)  3.606 ms 142.250.62.153 (142.250.62.153)  2.441 ms
 8  108.170.248.161 (108.170.248.161)  3.313 ms  3.296 ms  3.624 ms
 9  142.250.62.153 (142.250.62.153)  3.243 ms 142.250.239.171 (142.250.239.171)  3.899 ms  3.861 ms
10  bom12s11-in-f14.1e100.net (142.250.183.46)  3.690 ms  5.918 ms  3.798 ms

From the above command we can conclude that:

  1. The first line of the output displays the hostname and IP address that is to be reached, hops that are going to be attempted by the traceroute command, and the size of the packets to be sent.
  2. Each line starting on the second line shows a hop to the destination. also the hostname, the host’s IP address, and the roundtrip time. The time it takes to send a signal and to react to the host is added together to form the roundtrip time.
  3. By default, it sends three packets for each host, so three response times are listed.
  4. The packet loss is indicated by the ‘*’ sign. The network may be down, there may be network congestion from heavy traffic, or the firewall may be dropping traffic, which all contribute to packet loss. The error message for a significant packet loss is “destination is not reached” on the traceroute.

D) tracepath

tracepath is a command-line utility in Linux used to trace the path that packets take from one host to another on a network. It is similar to the traceroute command, but it uses a different technique to accomplish the same goal.

It tracks the destination’s network route and logs each hop along the way. Tracepath can show you

where your network is weak if it detects a sluggish network.

Syntax:

$ tracepath [options] destination.

Here, destination refers to the IP address or hostname of the target host to which you want to trace the path.

Some common options that can be used with the tracepath command include:

  • -n: This option specifies that the output should show numeric IP addresses instead of hostnames.
  • -p port: This option specifies the destination port number to use in the probe packets.
  • -w timeout: This option specifies the timeout for waiting for a response in seconds.

When you run the tracepath command, it sends packets with increasing TTL (Time-To-Live) values to the target host, starting from

1. Each time a packet passes through a router, the TTL is decremented by 1.

2. If the TTL reaches 0, the router discards the packet and sends an ICMP “time exceeded” message back to the source. tracepath uses these ICMP messages to determine the path taken by the packets.

The output of the tracepath" the command shows the hops between the source and destination hosts, along with the IP addresses of each router along the way, and the time taken for each hop.

Example:

$ tracepath www.google.com
 1?: [LOCALHOST]                      pmtu 1500
 1:  _gateway                                              1.066ms 
 1:  _gateway                                              0.954ms 
 2:  _gateway                                              1.087ms pmtu 1480
 2:  172.21.240.2                                          2.722ms 
 3:  172.21.95.1                                           2.984ms 
 4:  72.14.216.40                                          4.286ms asymm  8 

E) ping

The ping command in Linux is used to test the connectivity between two network devices, such as a computer and a server.

ping stands for Packet Internet Groper.

It sends a series of packets to the target device and measures the time it takes for each packet to be sent and received, as well as the percentage of packets that were lost or dropped.

Syntax:

$ ping [options] destination

Here, destination refers to the IP address or hostname of the device you want to test connectivity with.

Some common options for the ping command include:

  • -c : specifies the number of packets to be sent (default is 5)
  • -i : specifies the interval between packets in seconds (default is 1 second)
  • -s : specifies the size of the packets in bytes (default is 56 bytes)
  • -t : sets a TTL (Time To Live) value for the packets
  • -v : enables verbose output

Example:

$ ping -c 10 -s 64 -i 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 64(92) bytes of data.
72 bytes from 8.8.8.8: icmp_seq=1 ttl=119 time=1582 ms
72 bytes from 8.8.8.8: icmp_seq=2 ttl=119 time=565 ms
72 bytes from 8.8.8.8: icmp_seq=3 ttl=119 time=14.1 ms
72 bytes from 8.8.8.8: icmp_seq=4 ttl=119 time=9.37 ms
72 bytes from 8.8.8.8: icmp_seq=5 ttl=119 time=10.7 ms
72 bytes from 8.8.8.8: icmp_seq=6 ttl=119 time=2.90 ms
72 bytes from 8.8.8.8: icmp_seq=7 ttl=119 time=2.31 ms
72 bytes from 8.8.8.8: icmp_seq=8 ttl=119 time=3.70 ms
72 bytes from 8.8.8.8: icmp_seq=9 ttl=119 time=21.9 ms
72 bytes from 8.8.8.8: icmp_seq=10 ttl=119 time=20.4 ms

--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9027ms
rtt min/avg/max/mdev = 2.313/223.231/1582.121/482.187 ms, pipe 2

This will send 10 packets to the Google DNS server, each with a size of 64 bytes, each with an interval of 1 sec, and display the results in the terminal. There is no loss of packets from the above command.

F) netstat

The “netstat” command is a powerful tool used to display various network-related information in Linux operating systems. It allows you to view active network connections, open ports, and routing tables.

The “netstat” command stands for Network Statistics. It provides data on various interface characteristics, such as open sockets, routing tables, and connection details.

Moreover, it may be utilized to display every socket connection (including TCP, and UDP). Together with the sockets that are already attached, it also shows the sockets that are waiting to be connected.

For network and system administrators, it is a useful tool.

Here are some commonly used options with the netstat command:

  • netstat -a: displays all active connections and their state, including TCP and UDP connections.
  • netstat -t: shows all TCP connections.
  • netstat -u: displays all UDP connections.
  • netstat -n: displays network addresses and port numbers in numerical form instead of resolving host and service names.
  • netstat -p: shows the process ID of the program that is using the network connection.
  • netstat -r: displays the kernel’s routing table.

A) Display all connections.

$netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:netbios-ssn     0.0.0.0:*               LISTEN     
tcp        0      0 localhost:mysql         0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:microsoft-ds    0.0.0.0:*               LISTEN     
tcp        0      0 localhost:27017         0.0.0.0:*               LISTEN     
tcp        0      0 localhost:6379          0.0.0.0:*               LISTEN     
tcp        0      0 localhost:5939          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:7071            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:51413           0.0.0.0:*               LISTEN     
tcp        0      0 localhost:postgresql    0.0.0.0:*               LISTEN     
tcp        0      0 localhost:ipp           0.0.0.0:*               LISTEN     
tcp        0      0 localhost:33185         0.0.0.0:*               LISTEN     
tcp        0      0 localhost:33060         0.0.0.0:*               LISTEN    

The above command will list all existing connections in your system.

B) Display only TCP or UDP Connections

$ netstat -at   --> display TCP Connections.


$ netstat -au   --> display UDP Connections.

C) Display PID and UID Connections

$ sudo netstat -nlpt

The above command will list all the PIDs for the TCP connections.

G) ss

The ss" command in Linux is used to display various socket statistics. It is a powerful tool that provides detailed information about active network connections, sockets, and network interfaces on a system.

The "ss command can display a variety of information about these objects, including their state, protocol, local and remote addresses, and more.

 It is also faster than netstat as it gets all information from kernel userspace.

$ ss
Netid State  Recv-Q Send-Q                               Local Address:Port                         Peer Address:Port                   Process                 
u_dgr ESTAB  0      0             /var/lib/samba/private/msg.sock/1832 47023                                   * 0                                              
u_dgr ESTAB  0      0                              /run/systemd/notify 20618                                   * 0                                              
u_dgr ESTAB  0      0                     /run/systemd/journal/dev-log 20642                                   * 0                                              
u_dgr ESTAB  0      0                      /run/systemd/journal/socket 20646                                   * 0                                              
u_dgr ESTAB  0      0             /var/lib/samba/private/msg.sock/1351 45800                                   * 0                                              
u_dgr ESTAB  0      0             /var/lib/samba/private/msg.sock/1887 47031                                   * 0                                              
u_seq ESTAB  0      0                                           @0000e 63042                                   * 63043                       

A) Listing listening and connecting ports of TCP, UDP, and Unix

If you want to list connected as well as listening ports for TCP, UDP, and Unix use -t, -u, and -x respectively with command.

$ ss -ta

$ ss -ua

$ ss -xa

B) Listing listening Ports of TCP, UDP, and Unix

If you want to list listening ports for TCP, UDP, and Unix use -t, -u, and -x respectively with the l command.

$ ss -lt
  
$ ss -lu 
 
$ ss -lx  

H) dig

The dig command in Linux is a tool for performing DNS (Domain Name System) queries. It allows you to retrieve information about DNS records for a specific domain name or IP address.

It stands for Domain Information Groper. A file’s lookup requests may be accessed using batch mode, which is another feature that is made possible by this.

The dig command will visit each name server from “/etc/resolv.conf” if a specific name server is not specified to query. Without any command-line arguments, the dig will run an NS search for “. (the root).

Syntax:

$ dig [options] domain_name

For running the dig command we have to install the dnsutils package.

$ sudo apt-get install dnsutils

A) Query a domain name

$ dig binfintech.com

; <<>> DiG 9.16.1-Ubuntu <<>> binfintech.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6881
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;binfintech.com.			IN	A

;; ANSWER SECTION:
binfintech.com.		300	IN	A	172.67.207.105
binfintech.com.		300	IN	A	104.21.69.102

;; Query time: 36 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Apr 04 11:56:10 IST 2023
;; MSG SIZE  rcvd: 75

From the above command, we can conclude that dig version information, statistics about the query, other technical details, and a question section along with a few other ones.

B) Display Short Output

$ dig binfintech.com +short
104.21.69.102
172.67.207.105

From the above command, we can conclude that it displays the IP address of the domain.

I) nslookup

The nslookup command is a command-line tool used to query the Domain Name System (DNS) to obtain domain name or IP address information.

In Linux, you can use the nslookup command to perform various DNS-related tasks, such as resolving domain names, testing DNS servers, and diagnosing DNS-related problems.

Here’s how to use the nslookup command in Linux:

  1. Open a terminal window.
  2. Type nslookup followed by the domain name or IP address you want to query, like this: nslookup example.com. Press Enter.
  3. The "nslookup” command will display the IP address associated with the domain name, as well as other information about the domain and the DNS server that provided the information.

Here are some common nslookup command options:

  • -query=<type>: Specifies the DNS query type, such as A, MX, or NS. For example, to query for MX records, you would use the command nslookup -query=mx example.com.
  • -debug: Enables debug mode, which provides additional information about the DNS query process.
  • -timeout=<seconds>: Specifies the timeout period for the DNS query, in seconds.
  • -server=<server>: Specifies the DNS server to use for the query. For example, nslookup -server=8.8.8.8 example.com would use Google’s DNS server for the query.

Note that some Linux distributions may use alternative DNS query tools such as dig or host instead of nslookup.

$ nslookup binfintech.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	binfintech.com
Address: 104.21.69.102
Name:	binfintech.com
Address: 172.67.207.105
Name:	binfintech.com
Address: 2606:4700:3032::6815:4566
Name:	binfintech.com
Address: 2606:4700:3034::ac43:cf69

J) ifplugstatus

The "ifplugstatuscommand in Linux is used to determine the status of the network cable connected to a particular network interface, such as eth0 or wlan0.

It is a simple utility that can be used to determine whether a network cable is plugged into an Ethernet port or not.

When the ifplugstatus command is run, it checks the link status of the specified interface and returns a status message indicating whether the interface is up or down, and whether a cable is plugged in or not.

$ sudo apt install ifplugd

$ ifplugstatus
lo: link beat detected
eno1: unplugged
wlo1: link beat detected
docker0: unplugged

$ sudo ifplugstatus wlo1
wlo1: link beat detected

Look at the above code, it shows the status of all interfaces. Here, the link beat detected means it is plugged in.

K) mtr

The “mtr” command in Linux stands for “My Traceroute”. It is a network diagnostic tool that combines the functions of both the “traceroute” and “ping” commands into a single command.

When you run the “mtr” command, it continuously sends packets to a destination host and displays the results in real time. This allows you to see the route taken by the packets, the response times of each hop along the way, and any packet loss or other network issues that may be occurring.

The output of the “mtr” command includes a list of all the routers or nodes between the source and the destination host, along with their IP addresses and response times. It also provides a graphical representation of the network path, which can be useful in identifying any network bottlenecks or congestion.

The “mtr” command can be particularly useful for troubleshooting network issues, such as high latency, packet loss, or routing problems. It can also be used to perform continuous monitoring of network performance over time.

Syntax

$ mtr <options> <hostname>/path

A) Display the traceroute command

$ mtr binfintech.com

Start_Time Status   Host       Hop    Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev,
1683612487 OK    binfintech.com 1,_gateway,0.00,10,0,56.83,22.82,0.86,75.88,25.09
1683612487 OK    binfintech.com 2,172.21.240.2,0.00,10,0,32.39,33.98,3.11,72.24,23.72
1683612487 OK    binfintech.com 3,172.21.95.1,0.00,10,0,36.51,25.21,3.03,68.35,20.44
1683612487 OK    binfintech.com 4,as13335.bom.extreme ix.net,20.00,10,2,38.48,45.09,2.36,107.18,34.37
1683612487 OKbinfintech.com,5,162.158.226.17,0.00,10,0,14.91,45.50,3.05,103.46,35.19
1683612487 OK   binfintech.com,6,104.21.69.102,0.00,10,0,13.57,24.91,1.69,87.02,31.23

The above command displays the traceroute report keeps showing until its done. To exit press the CTRL+C key.

B) Display CSV Output

$mtr --csv binfintech.com
Mtr_Version,Start_Time,Status,Host,Hop,Ip,Loss%,Snt, ,Last,Avg,Best,Wrst,StDev,
MTR.0.93,1683612487,OK,binfintech.com,1,_gateway,0.00,10,0,56.83,22.82,0.86,75.88,25.09
MTR.0.93,1683612487,OK,binfintech.com,2,172.21.240.2,0.00,10,0,32.39,33.98,3.11,72.24,23.72
MTR.0.93,1683612487,OK,binfintech.com,3,172.21.95.1,0.00,10,0,36.51,25.21,3.03,68.35,20.44
MTR.0.93,1683612487,OK,binfintech.com,4,as13335.bom.extreme-ix.net,20.00,10,2,38.48,45.09,2.36,107.18,34.37
MTR.0.93,1683612487,OK,binfintech.com,5,162.158.226.17,0.00,10,0,14.91,45.50,3.05,103.46,35.19
MTR.0.93,1683612487,OK,binfintech.com,6,104.21.69.102,0.00,10,0,13.57,24.91,1.69,87.02,31.23

This will display the output in CSV format. All columns are separated by a comma (,).

C) Specify the Limit of Ping

$ mtr -c 10 binfintech.com

This will display the output for the first 10 results.

D) Read Hostnames From File

Suppose we have to read the target domain name which is present in the file target.txt. Then how we can read that target domain name? Here -F options play an important role.

$ mtr -F target.txt

E) Disable DNS Resolving (Display numeric addresses only)

Because DNS resolving will no longer require as much bandwidth or waiting time, the output will be faster. Execute the command as follows with the ‘-n’ option to stop DNS resolving:

$ mtr -n binfintech.com

CommandDescription
ipconfigThe command ifconfig" is a networking utility used to configure and display information about network interfaces on a Unix-like operating system such as Linux and macOS.
ipThe "ip” command is a powerful network configuration tool in Linux. It allows you to view and modify network interface settings, such as IP addresses, routes, and network devices.
tracerouteThe "traceroute” command is a network diagnostic tool used in Linux and other Unix-based operating systems to trace the route taken by packets across an Internet Protocol (IP) network.
tracepathtracepath is a command-line utility in Linux used to trace the path that packets take from one host to another on a network.
pingThe ping command in Linux is used to test the connectivity between two network devices, such as a computer and a server.
netstattracepath is a command-line utility in Linux used to trace the path that packets take from one host to another on a network?
ssThe ss" command in Linux is used to display various socket statistics.
It is a powerful tool that provides detailed information about active network connections, sockets, and network interfaces on a system.
digThe dig command in Linux is a tool for performing DNS (Domain Name System) queries. It allows you to retrieve information about DNS records for a specific domain name or IP address.
nslookupThe nslookup command is a command-line tool used to query the Domain Name System (DNS) to obtain domain name or IP address information.
ifplugstatusThe ifplugstatus command in Linux is used to determine the status of the network cable connected to a particular network interface, such as eth0 or wlan0.
mtrThe “mtr” command in Linux stands for “My Traceroute”. It is a network diagnostic tool that combines the functions of both the “traceroute” and “ping” commands into a single command.
All Linux Networking Command

FAQ

List all the Linux Network Commands.

1) ipconfig
2) mtr
3) ifplugstatus
4) nslookup
5) dig
6) ss
7) netstat
8) ping
9) traceroute
10) tracepath

Recent Articles on Linux

  1. What is Linux Operating System | Introduction to Linux
  2. Directory in Linux Define | Linux Directory & its Commands
  3. Explain the chmod command in Linux | Linux chmod command
  4. Linux User Management || User Management in Linux

Related Articles on Python

  1. Continue and Break Statement in Python
  2. Definition of Strings in Python with its Examples
  3. Numbers in Python | Introduction to Numbers in Python
  4. Loop in Python | Different Types of Loop in Python
  5. Sets in Python | Python Sets and Operations performs on them
  6. Conditional Statements in Python (With Examples)
  7. File Handling in Python and Operations performed on File Handling
  8. What are Dictionary in Python | Dictionary in Python, advantages
  9. Variables and Typecasting in Python || Variables in Python

By Vivek Maurya

Write blogs related to Ethical hacking, Computer networks, Linux, Penetration testing and Web3 Security.

Leave a Reply

Your email address will not be published. Required fields are marked *