Networking Commands

Essential for understanding and interacting with networks.

• ifconfig

• Purpose: Displays or configures network interfaces (older, still common in Kali).

• Example: ifconfig → Shows IP address (e.g., eth0: 192.168.1.10).

• ip

• Purpose: Modern replacement for ifconfig to manage network settings.

• Example: ip addr → Lists network interfaces and IPs.

• ping

• Purpose: Tests connectivity to a host.

• Example: ping 8.8.8.8 → Checks if Google DNS responds (Ctrl+C to stop).

• netstat

• Purpose: Shows network connections, ports, and routing tables.

• Example: netstat -tuln → Lists listening TCP/UDP ports.

• arp

• Purpose: Displays or modifies the ARP cache (MAC-to-IP mappings).

• Example: arp -n → Shows ARP table without name resolution.

• route

• Purpose: Displays or manages the routing table.

• Example: route -n → Shows routing table numerically.