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.
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 knowledgehub.blog
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 knowledgehub.blog
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 knowledgehub.blog 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 knowledgehub.blog
6. nslookup: query Internet name servers interactively
Nslookup is a program to query Internet domain name servers
root@kali:~# nslookup knowledgehub.blog
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 email@example.com:/tmp
9. nmap: Network exploration tool and security/port scanner
to check the open ports on the system.
root@kali:~# nmap 127.0.0.1
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.
root@kali :~# ssh firstname.lastname@example.org password:
Please follow us for more useful information.