20 Linux Networking Commands for Ubuntu 26.04 (2026): Cheat Sheet

Share

These are the must-know Linux networking commands for Ubuntu 26.04 LTS and Ubuntu 26.10. The list leads with modern tools (ip, ss, resolvectl, nmcli). Legacy ifconfig and netstat appear only at the end as net-tools holdovers.

Before You Start
Ubuntu version
Examples target Ubuntu 26.04 LTS and Ubuntu 26.10. Desktop installs usually have NetworkManager; servers may rely more on netplan and systemd-resolved.
Terminal
Open a terminal with Ctrl + Alt + T. Prefer read-only checks first (ip, ss, ping) before changing firewall rules.
Packages
Most tools ship by default. Add extras with sudo apt install traceroute nmap tcpdump iftop whois when needed.
KEY TAKEAWAYS
01Lead with ip and ss
On Ubuntu 26.04, use ip for addresses and routes, and ss for sockets. They replace most ifconfig and netstat habits.
02DNS and Wi-Fi helpers
resolvectl talks to systemd-resolved. nmcli is the NetworkManager CLI on Ubuntu Desktop.
03Cheat sheet included
Download the free multi-format networking cheat sheet, then practice the examples on a test machine.
04Legacy is optional
ifconfig and netstat live in the net-tools package. Install them only when an old script still needs them.
05Safe practice
Start with ping, ip, and ss. Save nmap and tcpdump for networks you own or have permission to test.
06Related guides
Pair this list with the Top 40 commands guide and the security commands post for firewalls and SSH.
Free Cheat Sheet

Download the Linux Networking Commands Cheat Sheet

All 20 networking commands from this guide in one file. Pick PDF for printing, or EPUB / DOCX / MOBI / AZW3 for your reader.

New to Ubuntu networking? Start from a clean install via the Ubuntu 26.04 LTS download page or see Top 40 Linux commands for Ubuntu 26.04 for everyday shell skills.

Modern networking commands on Ubuntu

Work through these in order on Ubuntu 26.04. Each block has a copy button so you can paste into your terminal.

1. ip

Show and change addresses, links and routes. This is the modern replacement for most ifconfig and route usage.

ip -br a
ip -br a
ip route
ip link show
Sample terminal output of ip -br a showing network interfaces on Ubuntu
Sample output: ip -br a with a redacted link-local address (generated for this guide).

2. ss

Socket statistics. Faster and better maintained than netstat for listening ports and connections.

ss -tuln
ss -tuln
ss -s
Sample terminal output of ss -tuln listing listening sockets on Ubuntu
Sample output: ss -tuln listing listening sockets (generated for this guide).

3. resolvectl

Query and inspect systemd-resolved on Ubuntu. Use it to check DNS servers, domains and stub listener status.

resolvectl status
resolvectl status
resolvectl query ubuntu.com

4. nmcli

NetworkManager command-line client on Ubuntu Desktop. List devices, connections and Wi-Fi networks without opening Settings.

nmcli device status
nmcli device status
nmcli connection show
Illustrative sample terminal output of nmcli device status on Ubuntu
Illustrative sample output: nmcli device status (labeled sample for this guide).

5. ping

Test reachability and round-trip time with ICMP echo requests. Limit the count so it stops cleanly.

ping -c 4 1.1.1.1
ping -c 4 1.1.1.1
ping -c 2 127.0.0.1
Sample terminal output of ping -c 2 to localhost on Ubuntu
Sample output: ping -c 2 127.0.0.1 (generated for this guide).

6. traceroute

Show the hop-by-hop path to a host. Install with apt if missing: sudo apt install traceroute.

traceroute example.com
traceroute example.com
tracepath example.com

7. dig

Detailed DNS lookups. Prefer dig over older tools when you need full answer and authority sections.

dig example.com
dig example.com
dig +short example.com A

8. nslookup

Quick interactive or one-shot DNS queries. Still handy; dig is usually clearer for scripts and debugging.

nslookup example.com
nslookup example.com

9. curl

Transfer data with HTTP and many other protocols. Great for APIs and header checks.

curl -I https://example.com
curl -I https://example.com
curl -O https://example.com/index.html

10. wget

Download files over HTTP, HTTPS or FTP. See also the dedicated wget command guide.

wget https://example.com/file.zip
wget https://example.com/file.zip
wget -c https://example.com/file.zip

11. nmap

Port and host discovery scanner. Only scan networks you own or have explicit permission to test.

nmap -sn 192.168.1.0/24
nmap -sn 192.168.1.0/24
nmap -sV 192.168.1.10

12. tcpdump

Capture packets on an interface for troubleshooting. Needs sudo for most interfaces.

sudo tcpdump -i any -n port 53
sudo tcpdump -i any -n port 53
sudo tcpdump -i eth0 -c 20

13. ethtool

Query Ethernet driver and link settings such as speed and duplex.

ethtool eth0
ethtool eth0
sudo ethtool -S eth0 | head

14. ip neigh

Neighbor (ARP/NDP) table via the ip suite. Prefer this over the standalone arp command on modern Ubuntu.

ip neigh
ip neigh
ip neigh show dev eth0

15. whois

Look up domain registration data. Install with sudo apt install whois if needed.

whois example.com
whois example.com

16. scp

Copy files over SSH. For many files or resumes, prefer rsync.

scp notes.txt [email protected]:~/
scp notes.txt [email protected]:~/
scp -r Documents/ [email protected]:~/backup/

17. rsync

Efficient local or remote sync over SSH. -avz is a solid everyday starting set of flags.

rsync -avz Documents/ [email protected]:~/Documents/
rsync -avz Documents/ [email protected]:~/Documents/

18. iftop

Live bandwidth view by connection. Install with sudo apt install iftop.

sudo iftop -i eth0
sudo iftop -i eth0

Legacy net-tools commands

Ubuntu still lets you install the net-tools package for older scripts. Prefer ip and ss for new work. Install only when you must: sudo apt install net-tools.

19. ifconfig

Legacy interface configuration from net-tools. Use ip address and ip link instead on Ubuntu 26.04.

ifconfig -a
ifconfig -a

Tip: treat ifconfig as compatibility only. New docs and scripts should call ip.

20. netstat

Legacy socket and routing summary from net-tools. Use ss -tuln and ip route instead.

netstat -tuln
netstat -tuln

Tip: ss is faster and maintained. Keep netstat only for old how-tos that still quote it.

Quick reference table

A compact map of all 20 networking commands in this guide.

Range Focus Commands
1-4 Modern core ip, ss, resolvectl, nmcli
5-10 Reachability and transfers ping, traceroute, dig, nslookup, curl, wget
11-18 Scan, capture, sync nmap, tcpdump, ethtool, ip neigh, whois, scp, rsync, iftop
19-20 Legacy net-tools ifconfig, netstat

Why these commands matter

Connectivity checks, DNS, and socket inspection cover most Ubuntu network troubleshooting. Learn ip and ss first, then add dig, curl and tcpdump when you need deeper detail. Firewall policy belongs with Linux security commands (ufw and nftables).

Still on Ubuntu 24.04? Plan your move with the upgrade to Ubuntu 26.04 LTS guide.