The net-tools
package contains classic networking commands like ifconfig
, netstat
, route
, arp
, and hostname
.
While newer tools like ip
(from the iproute2
package) are now the default, some scripts and tutorials still rely on these older commands.
This guide will help you:
net-tools
on UbuntuUbuntu no longer includes net-tools
by default, but you can easily add it:
sudo apt update
sudo apt install net-tools
Verify the installation:
ifconfig --version
View and configure network interfaces:
ifconfig
Use it to quickly check IP addresses and interface status.
Check open ports, connections, and routing tables:
netstat -tulnp
Display or modify the system’s routing table:
route -n
Show the ARP table:
arp -a
View or set the system’s hostname:
hostname
The iproute2
suite has replaced most net-tools
commands.
Here is a quick reference table for modern equivalents:
Deprecated Command (net-tools) | Modern Equivalent |
---|---|
ifconfig | ip addr , ip link |
netstat | ss , ip route , ip -s link |
arp | ip neighbour |
route | ip route |
For example, instead of ifconfig
, you can use:
ip addr show
And instead of netstat -tulnp
, use:
ss -tulnp
Beyond net-tools
, these utilities are worth knowing:
lsof -i -P -n
).sudo apt install nmap
).iw
).These tools, combined with net-tools
, provide a more comprehensive networking toolkit.
Modern Ubuntu recommends ip
, ss
, and related commands from the iproute2
package. However:
ifconfig
or netstat
.Think of net-tools
as a fallback toolkit, while learning modern tools for new workflows.
net-tools
provides a simple way to access classic network commands on Ubuntu.
Even though newer tools are preferred, keeping net-tools
installed can be useful for compatibility and quick diagnostics.
Combine these with modern utilities for a full-featured networking toolbox.