If you are using Linux then you must know that Linux offers the terminal window that allows you to input commands and compile a software or you can use it to diagnose a network problem. You can use the terminal commands to activate certain tools that will allow you to better manage your network.
So we have prepared a guide that will allow you to use the terminal window in Linux to diagnose and manage your network. We also have included some of the important terminal commands that will be highly useful to you to manage the network.
How To Work The Network From Terminal Window In Linux
- Use the commands curl or wget to download files from internet without leaving the terminal windows. For example curl -O website.com/file or wget website.com/file. The file will be downloaded to your current directory.
- You can use the ping command to see whether your computer is communicating with the internet or not. You can use it as ping -c 4 google.com to see whether your computer communicates with Google or not.
- You can use the commands tracepath or traceroute to trace a network path to a specific computer or destination. For example tracepath example.com this will show you the path where the network is failing or is really slow.
- To combine ping and tracepath into a single command use mtr command for example mtr pindigit.com this will show you the network with how many packets are lost during the trace.
- If you want to look up DNS then you can use the command host and along with an IP address you can see the list of doman names associated with the IP. For example host pindigit.com, host 188.8.131.52
- If you want to view information about a website such as the owner or the registration information then use the command whois for example whois pindigit.com
- If you want to see whether a cable is plugged in the network interface or not use the command ifplugstatus for example sudo apt-get install ifplugd. If cable if unplugged you will see the status unplugged.
- If you want to configure or debug your system network interface then use the ifconfig command. To view the status of all active network interface type ifconfig.
- If you want to get a new IP address from your DHCP server then use the command dhclient. If you put the command –r after dhclient it will release your computers current IP and get a new one. For example sudo dhclient –r
There you have some of the terminal commands that will allow you to manage and diagnose any network problems that you may face.
If you know of any other terminal window commands that will allow you to manage your network from Linux do let us know.