Networking command
-
ping google.com– Checks connectivity to a remote server. -
netstat -tulnp– Displays open network connections. curl https://example.com– Fetches a webpage's content.wget https://example.com/file.zip– Downloads a file from the internet.
Network Manager
ip a– Check IP addressnmcli device status– Show active network connectionsnmcli connection show– View detailed connection infonmcli device show– Check if DHCP or Static IP is usedresolvectl status– Check DNS and Gatewaynmcli device wifi list– See Wi-Fi details (laptop specific)ifconfig– Display network configuration informationip addr show– Modern replacement forifconfig
The route command
route– Show routing table.route -n– Show numeric routing table.ip route show– Modern command to display the routing table with detailed info
The netstat command
netstat -i– Show network interface statistics (RX/TX packets and errors).netstat -r– Show kernel IP routing table (similar toroute).netstat -tln– Show listening TCP ports with numeric addresses.netstat -tl– Show listening TCP ports with service names.
The ss command
ss– Display current socket connections and states (modern replacement fornetstat).ss -s– Show summary statistics of all socket types.ss | less– for easier viewing
The dig command
dig example.com– Tests DNS server functionality and performs DNS queries
The host command
host example.com– Resolve a hostname to its IP address.host 192.168.1.2– Perform a reverse DNS lookup (IP → hostname).host -t CNAME example.com– Query the CNAME (canonical name) record.host -t SOA example.com– Query the Start of Authority (SOA) record.host -a example.com– Display all DNS records for a domain.
The ssh command
ssh hostname– Logs in using your current username on the remote hostssh username@hostname– Logs in with a specific username