Since Linux is so widely used for servers, it has a lot of utlities for monitoring network information and accessing remote resources. There are some networking commands people still use because they know them, but some are outdated and deprecated. Here are some deprecated utilities along with what you should use instead.
Telnet
Use SSH for remote terminal connections
Telnet is one of the oldest networking protocols still in use. It debuted with the original ARPANET in the late 1960s, before being formalized in the 1980s via a Request For Commments, or RFC.
Telnet was a way for people using one computer to log in remotely to another machine. In that era, this would have been likely a mainframe or minicomputer. One goal of ARPANET was to allow academics across the country to collaborate, such as by sharing computing facilities. While it was obviously useful in an era when terminals were the only practical way to use a computer interactively, its design reflected the assumptions of the era.
Telnet sends all its information between machines in plain text. This includes user names and passwords. Telnet was created in an environment that could hardly conceive that malicious actors would want to snoop on users, or even have the ability to with modern packet sniffing software.
One of the safer modern alternatives is to use SSH for remote logins. It's also standard on most Linux machines, and even Windows 11 has OpenSSH built in.
ifconfig
Use ip instead to set up your network
When I took a class in computer networking at a community college in the early 2000s, we were shown a utility on Windows called ipconfig that would let you see information on the networking interfaces and connections on your machine. Unix-like systems, including Linux, had a counterpart called ifconfig. If you wanted to see what your ip address or your subnet mask was, this was the command you would use to find out.
On linux, ifconfig has been largely replaced with the ip command.
If you want to find out what your ip address and the subnet mask (using CIDR notation) is:
ip addressIf you want to find the default route (or the default router/gateway) you're using:
ip routeYou can see the ARP table with this command:
ip neighborOr you want to see the ARP table and you're British:
ip neighbourIf you want to see some stats on the packets your system has processed:
ip statsYou can see which network interfaces are up with the ip link command:
ip linkIf you wanted to take the physical ethernet interface down, you'd use the "ip link down" command with the name of the interface:
sudo ip link eth0 downAnd you can bring it back up again:
sudo up link eth0 upThese are the most common operations you would likely want to do with the ip command, and you can read the manual page for more extensive information.
scp
Use sftp for secure file transfers
scp is an acronym that stands for "Secure Copy Protocol," and it's intended to allow you to copy files from one machine to another securely.
While scp is implemented in the OpenSSH client, its developers insist that scp is outdated. They recommend that users who want to transfer files use sftp or rsync instead.
Suppose you wanted to copy a file from your local machine to a remote machine. Here's how you would do it using sftp.
First, log in to the remote machine using sftp:
sftp example.comOr with your username:
sftp [email protected]Depending on if you've set up your account with an SSH key pair, you may be prompted for your password.
Once you've successfully logged in, you'll be greeted with the "sftp> " prompt.
You can use it as if you were at the linux command line, with the cd and ls commands. To copy your file, use the "put" command with the pathname on your machine of the file you want to transfer:
put path/to/fileYou can also download files from the remote machine with the "get" command:
get filenetstat
Use ss to see open sockers
You might have used netstat to view a list of currently open files. This command is handy, and it can also be used to find open network connections since everything is a file on Linux. netstat is also outdated, having belonged to the older net-tools package. You can still install it if you want to, depending on your distribution, but I would recommend something more modern.
The modern alternative for viewing the active network connections is the ss command, for "socket statistics."
To view all of the open files, you can run ss by itself:
ssA more useful command is to see open network sockets. To see all of the open TCP sockets, you can use -a and -t options:
ss -t -aTo display all of the listening sockets:
ss -a -lss is part of the iproute2 package. It will likely be installed automatically through most modern Linux distributions, since the package also includes the modern ip package. It's installed by default on Ubuntu systems.
You can also read the manual page for more extensive information on ss's options.
Linux changes, and so do networking tools
Linux, despite the influence of Unix, is a system that's always changing. Like the mythical Ship of Theseus, you might wonder how many of its components can be replaced and you can still call it Linux. But the replacement of networking utilities shows a pragmatism on the part of its developers. Linux users will have to change with it, but being flexible is already a virtue in modern networking.