Common Network Commands

ifconfig Command

  • ifconfig Displays and configures network interfaces, showing details like IP addresses, packet counts, and interface status (up/down).

  • Example output:

    • inet addr: IPv4 address

    • RX/TX packets: Number of received/transmitted packets

    • UP: Indicates if the interface is active

ifconfig

iwconfig Command

  • iwconfig configures wireless interfaces, displaying details like SSID, mode, and signal strength.

  • Example output:

    • ESSID: Network name

    • Mode: Wireless mode (e.g., Managed, Ad-Hoc)

    • Signal level: Signal strength

  • That use for Wireless Pentesting

iwconfig
not wireless interfaces

Ping Command

  • ping tests network connectivity by sending requests to a host and measuring response time.

  • Example output:

    • Reply from: Host's IP address

    • Time: Round-trip time in milliseconds

ping 192.168.1.1

arp -a Command

  • arp -a displays the IP-to-MAC address mapping for devices on your local network.

  • Example output:

    • IP address: The device's IP.

    • Physical address: The corresponding MAC address.

arp  -a

route Command

  • The route command displays or modifies the routing table in Unix-like systems.

  • Example output:

    • Destination: Network or host

    • Gateway: Next hop address

    • Flags: Routing flags (e.g., U for up)

route 

ip a Command

The ip a command is a short form of ip address show. It displays all IP address information for the system’s network interfaces.

Example output includes:

  • Interface name (e.g., eth0, lo, wlan0)

  • inet: IPv4 address

  • inet6: IPv6 address

  • state: Interface status (UP/DOWN)

✅ Used as a modern replacement for ifconfig in most Linux systems.

ip a

ip n Command

The ip n command displays the ARP (Address Resolution Protocol) cache, similar to arp -a.

Example output:

  • IP address: The device's IP address.

  • lladdr: The corresponding MAC address.

  • state: The current state of the entry (e.g., REACHABLE).

It helps view IP-to-MAC address mappings for devices on your local network.

ip n

ip r Command

The ip r command displays the routing table of the system, showing how network packets are routed through the system.

Example output:

  • default via: The default gateway for routing traffic.

  • Destination: Destination network or host.

  • Via: The next-hop router or interface.

  • Iface: The network interface used for the route (e.g., eth0, wlan0).

It helps in managing and troubleshooting network routes.

ip r

Last updated