Introduction
Networking commands are essential tools used by network administrators and engineers to diagnose, configure, and troubleshoot network connectivity. This article explores the most commonly used networking commands with practical examples.1. ping - Checking Network Connectivity
The ping command is used to test the reachability of a host on an IP network by sending ICMP Echo Request packets.
Example:
2. traceroute / tracert - Tracing Network Routes
traceroute (Linux/macOS) or tracert (Windows) displays the path packets take to reach a destination.
Example:
3. ipconfig / ifconfig - Displaying IP Configuration
- Windows:
ipconfigdisplays network settings. - Linux/macOS:
ifconfig(deprecated, useip a) shows IP configuration.
4. netstat - Viewing Network Connections
The netstat command provides detailed information about active network connections, listening ports, and routing tables.
Example:
5. nslookup - Querying DNS Records
nslookup is used to find the IP address of a domain name and troubleshoot DNS issues.
Example:
6. dig - Advanced DNS Queries
dig is a powerful DNS lookup tool available on Linux/macOS.
Example:
7. arp - Viewing ARP Cache
The arp command shows or manipulates the ARP table, which stores IP-to-MAC address mappings.
Example:
8. route - Managing Routing Tables
The route command displays and modifies the routing table.
Example:
9. hostname - Displaying Hostname
The hostname command prints the system’s hostname.
Example:
10. curl & wget - Fetching Web Content
curlandwgetretrieve web content via HTTP/S.