Essential Network Commands on Linux (ping, ifconfig, ip)

ip, ping, ss and why ifconfig and netstat are no longer the recommended option.

Intermediate 1 min read Published on 2026 By Equipo SolucionaPC
CommandWhat it's for
ip aSee your IP addresses (replaces ifconfig)
ping [address]Check if there's a connection to a destination
ip routeSee your network's gateway
ss -tulnpSee listening ports (replaces netstat)
dig / nslookupQuery a domain's DNS

ifconfig and netstat are deprecated on many modern distributions (though they still work on some if you install them separately). ip and ss are their actively maintained replacements — worth getting used to from the start.

Quick connection diagnosis

ping -c 4 8.8.8.8

-c 4 limits it to 4 attempts — without this, ping would keep going indefinitely until you stop it manually with Ctrl + C.

Frequently asked questions

Why doesn't ping stop on its own?

By default, ping keeps going indefinitely until you stop it with Ctrl + C. Use the -c option followed by a number to limit how many attempts it makes automatically.

Should I learn ifconfig if I keep seeing it in old tutorials?

It isn't necessary to get started — 'ip a' does the same thing and is the actively maintained command. Knowing ifconfig only helps with understanding older guides that still use it.

Share: