Search Everything in One Place

Explore the web, images, videos, news, and more – all in one place.

News

These Linux networking command-line tools are outdated. Here's what you should use instead

This Quake-inspired terminal is my new favorite on Linux
These Linux networking command-line tools are outdated. Here's what you should use instead.

Telnet, ifconfig, and netstat, and more, all have better replacements.

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 connection to the Aarchon MUD in the terminal.
Telnet connection to the Aarchon MUD in the terminal.

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.

SSH session in a vintage Unix system.
SSH session in a vintage Unix system.

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.

The Linux ip -4 a command results IPV4 addresses visible.
The Linux ip -4 a command results IPV4 addresses visible.

If you want to find out what your ip address and the subnet mask (using CIDR notation) is:

ip address

If you want to find the default route (or the default router/gateway) you're using:

ip route

You can see the ARP table with this command:

ip neighbor

Or you want to see the ARP table and you're British:

ip neighbour

If you want to see some stats on the packets your system has processed:

ip stats

You can see which network interfaces are up with the ip link command:

ip link

If 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 down

And you can bring it back up again:

sudo up link eth0 up

These 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

sftp in the Linux terminal.
sftp in the Linux terminal.

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.com

Or 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/file

You can also download files from the remote machine with the "get" command:

get file

netstat

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:

ss
Output of the ss command in the WSL terminal.
Output of the ss command in the WSL terminal.

A 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 -a
Output of the Linux ss -a -t command showing open TCP sockets in the terminal.
Output of the Linux ss -a -t command showing open TCP sockets in the terminal.

To display all of the listening sockets:

ss -a -l
Output of ss -a -l in the Linux terminal showing active listening sockets.
Output of ss -a -l in the Linux terminal showing active listening sockets.

ss 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.

Read full story on HowToGeek

Related News

More stories you might be interested in.

Billionaire Jeff Bezos called Amazon’s customer service to prove a point but waited in silence for more than 10 minutes — ‘It was really long’
Barchart·12 hours ago

Billionaire Jeff Bezos called Amazon’s customer service to prove a point but waited in silence for more than 10 minutes — ‘It was really long’

Numbers can tell a story. Amazon (AMZN) founder Jeff Bezos believed they could also tell the wrong one. When customer complaints didn’t match what his team’s reports were saying, he decided there was only one way to settle the debate. Speaking on the Lex Fridman Podcast in December 2023, Bezos recalled an early Amazon meeting where executives revie...

OpenAI says its AI technology acted on its own in an 'unprecedented' hack of another company
The Associated Press - Business News·5 hours ago

OpenAI says its AI technology acted on its own in an 'unprecedented' hack of another company

ChatGPT maker OpenAI said Tuesday that its artificial intelligence system hacked into another AI company on its own in what the company called an “unprecedented cyber incident.” “We had a significant security incident during evaluation of our models,” OpenAI CEO Sam Altman said in a statement posted on social media. AI startup Hugging Face said las...

Top