This article discusses useful network commands for Unix/Linux and Windows systems, including ping, traceroute, finger, ssh, and whois. These commands can be used for troubleshooting and obtaining information about network connections and domains.
The most useful network commands, of course, depend on the type of network you’re working on. There are two main families of networks, and we will cover both here. The first family, the Unix or Linux family, is the oldest, with its origins in the early days of computing, when the Unix system achieved dominance among all network operating systems. The second family, the Windows family, is widely used these days as many network computers run a Windows-based operating system. Both have similar functions at their disposal, but the network commands that achieve these ends are different.
One of the networking commands that many people may be familiar with is the ping command. Both use the same basic syntax, that of ping (destination_address), but the options available to each are different. Ping is an easy way to see how long it takes for one computer to communicate with another, which can be used for a variety of troubleshooting purposes, and thus is one of the first network commands people learn when debugging networks. Available options include setting a manual timeout, setting a larger buffer size to send, and timestamping each hop as it is made.
Traceroute is another popular network command, as it shows which path a packet is taking from a source to a destination. This can be interesting to see, to get an idea of how far a network connection travels, but it can also be useful for finding where a connection is slowing down, as each host listed also shows how long it took the packet to get there. Traceroute is part of the main suite of networking commands available for both Unix and Windows systems, although the options available for each differ slightly.
When you are logged into a system, especially a Unix system with many other users, one of the most used network commands is the finger command. Using the syntax finger (username) results in displaying a block of information about another user logged on to the system. This can include their real name, their contact information, their email address, and any other information they have specified in a document in their user directory. Remotely the command can often be used using the syntax finger (username)@(host).
The ssh command allows you to establish a secure connection from the host you are logged into to another computer. This can be used from a local computer, through a shell, or while logged into another host to work through that computer. Many systems also allow the use of ssh-keygen, which generates a number of authentication keys for the ssh protocol.
Many systems also allow for a whois command, which can be a useful and easy way to get information about a domain name. The whois command can return various information, but most people use it to find the IP address of the host to which the domain name resolves. The whois command can also be set up to query the whois database in order to return more complete information about the domain, including when it was registered, and the contact information of whoever registered it, as well as administrative and technical contacts.
Protect your devices with Threat Protection by NordVPN