Linux – 10 Useful Networking Commands

Linux is powerful operating system and open source. It provides many inbuilt networking commands for troubleshooting. Here 10 useful networking commands.


1. ifconfig – configure a network interface

We can configure network interface related parameters using the ifconfig command, in general, we use ifconfig command to check the IP address.

 root@kali:~# ifconfig

2. dig: DNS lookup utility

dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers
that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its
flexibility, ease of use and clarity of output

root@kali:~# dig

3. traceroute: print the route packets trace to network host

traceroute tracks the route packets taken from an IP network on their way to a given host. It utilizes the IP protocol’s time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

root@kali:~# traceroute

4. telnet: the user interface to the TELNET protocol

The telnet command is used for interactive communication with another host using the TELNET protocol.

In general purpose telnet command used to verify the IP and port the connectivity.

root@kali:~# telnet 443

5. ping: Send ICMP ECHO_REQUEST to network hosts

ping uses the ICMP protocol’s mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway

root@kali:~# ping

6. nslookup: query Internet name servers interactively

Nslookup is a program to query Internet domain name servers

root@kali:~# nslookup

7. netstat: Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships

root@kali:~# netstat -loapn

8. scp: secure copy (remote file copy program)

scp command to copy file or directories to the remote server.

scp -rp <filePath/dirPath> <userName>@<IP>:<remoteDirectoryPath>

root@kali :~# scp -rp /tmp/localdir root@

9. nmap: Network exploration tool and security/port scanner

to check the open ports on the system.

root@kali:~# nmap

10. ssh: OpenSSH SSH client (remote login program)

ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine.

ssh <userName>@<IpAddress>

root@kali :~# ssh root@


Please follow us for more useful information.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s