Title: Common Network Commands - A Detailed Reference Guide
1. ipconfig (Windows)
- Usage: ipconfig /all
- Purpose: Displays all IP configuration information for all network adapters.
2. ifconfig (Linux/macOS)
- Usage: ifconfig
- Purpose: Used to configure or display network interfaces.
3. ping
- Usage: ping google.com
- Purpose: Tests connectivity to a host and measures round-trip time.
4. traceroute (Linux) / tracert (Windows)
- Usage (Linux): traceroute google.com
- Usage (Windows): tracert google.com
- Purpose: Traces the route packets take to a host.
5. nslookup
- Usage: nslookup google.com
- Purpose: Queries the DNS to get domain name or IP address mapping.
6. netstat
- Usage: netstat -an
- Purpose: Displays active connections, listening ports, and routing tables.
7. arp
- Usage: arp -a
- Purpose: Displays the ARP cache (IP to MAC mappings).
8. route
- Usage: route print or route -n
- Purpose: Displays or modifies the routing table.
9. curl and wget
- Usage: curl http://example.com
- Purpose: Downloads content or interacts with APIs over HTTP(S).
10. dig (Linux)
- Usage: dig google.com
- Purpose: Performs DNS lookups; more detailed than nslookup.
11. telnet
- Usage: telnet <host> <port>
- Purpose: Tests if a specific port is open on a remote host.
12. ssh
- Usage: ssh user@hostname
- Purpose: Secure shell for remote login to another machine.
13. nmap
- Usage: nmap -sS <target>
- Purpose: Network scanning and host discovery.
14. hostname
- Usage: hostname
- Purpose: Displays or sets the system's hostname.
15. netsh (Windows)
- Usage: netsh wlan show profiles
- Purpose: Configuration of network settings, firewalls, and interfaces.
Tips:
- Always run network tools with appropriate privileges.
- Combine commands with redirection or scripting for automation.
- Use logs from these commands in troubleshooting connectivity, DNS issues, and routing problems.