Network
ip is the modern tool for everything interface-related; ifconfig is its deprecated predecessor. a is short for addr .Identify the network hardware behind the interfaces.
Bring interfaces up or down and assign addresses manually (root required). Changes made with ip are gone after a reboot; make them permanent in your network manager. $ ip addr add 192.168.1.50/24 dev eth0 Release the DHCP lease and request a new one.
With NetworkManager, nmcli scans, connects, and even reveals the password of the current network. $ nmcli device wifi connect [SSID] password [password] $ nmcli device wifi show-password Stored Wi-Fi passwords live in NetworkManager's connection files (root required). $ sudo grep -r "psk=" /etc/NetworkManager/system-connections/ On systems using iwd instead of NetworkManager, use iwctl . $ iwctl station wlan0 get-networks $ iwctl station wlan0 connect [SSID]
Your public address as seen from the internet, via HTTP or DNS. $ dig +short myip.opendns.com @resolver1.opendns.com
ping checks if a host answers, traceroute shows the path packets take, and mtr combines both in a live view.Check whether a specific TCP port is reachable. Measure raw throughput between two machines (run iperf3 -s on one, -c on the other).
Resolve names to addresses and back. dig +short prints just the answer; -x does a reverse lookup of an IP. Look up who owns a domain or IP range.
wget downloads and resumes, curl -O saves under the remote name (-L follows redirects), aria2c and axel split downloads over parallel connections.
ss replaces netstat: -t TCP, -u UDP, -l listening, -n numeric, -p show the owning process (root for all processes).
Show the routing table, and ask which route (and source address) would be used to reach a destination.
Live traffic per connection (iftop ), per process (nethogs ), per interface (nload , bmon ), and long-term statistics (vnstat ).
Copied to clipboard