Estimated Reading Time: 15–20 minutes Difficulty: Beginner–Intermediate Prerequisites: Navigation
Networking commands help you inspect interfaces, test connectivity, troubleshoot DNS, identify listening services, and securely connect to remote systems.
- Viewing network interfaces
- Testing connectivity
- Querying DNS
- Viewing listening ports
- Secure remote access
Displays network interfaces and IP addresses.
ip a- View IP addresses.
- Verify interface status.
- Troubleshoot networking.
Useful when identifying interface configuration during investigations or penetration testing.
ip r
Displays the system routing table.
ip r- View the default gateway.
- Troubleshoot routing.
Helps determine how traffic reaches external networks.
ip a
Tests connectivity using ICMP.
ping HOSTping google.com
ping 8.8.8.8- Verify connectivity.
- Measure latency.
- Troubleshoot networking.
Useful during troubleshooting, although ICMP may be disabled on production systems.
traceroute
Displays the path packets take to a destination.
traceroute HOSTtraceroute google.com- Identify routing issues.
- Locate network bottlenecks.
Useful when diagnosing connectivity problems across multiple networks.
ping
Displays network sockets and listening ports.
ss -tulpn- View open ports.
- Identify listening services.
- Troubleshoot applications.
Often used to identify unnecessary or suspicious services listening on a system.
netstat
Displays network connections and routing information.
netstat -tulpn- View active connections.
- Troubleshoot networking.
Legacy command still encountered on many systems.
ss
Queries DNS servers.
nslookup DOMAINnslookup openai.comdig
Performs advanced DNS lookups.
dig DOMAINdig openai.comUseful when investigating DNS records and troubleshooting name resolution.
nslookup
Transfers data to or from a server.
curl URLcurl https://example.comFrequently used to test APIs, download responses, and verify web services.
wget
Downloads files from web servers.
wget URLwget https://example.com/file.txtcurl
Creates a secure remote connection using SSH.
ssh user@hostssh user@192.168.1.10SSH is the standard protocol for secure remote administration.
scp
Securely copies files between systems using SSH.
scp FILE user@host:/destinationscp report.txt user@192.168.1.10:/home/user- Transfer files securely.
- Copy logs between systems.
Useful when securely transferring investigation artifacts between Linux systems.
ssh
| Problem | Cause |
|---|---|
| Host unreachable | Network connectivity issue |
| Connection refused | Service not listening |
| Permission denied (SSH) | Incorrect credentials or key |
You should now understand how to inspect network interfaces, test connectivity, query DNS, identify open ports, and securely communicate with remote systems.
- Processes
- Security
- Bash