Network Connectivity Commands
Command |
Description |
Example |
---|---|---|
Maps IP addresses to MAC addresses on a local network and manages the ARP cache. |
arp Shows the current ARP cache entries. |
|
arp -a |
Prints the ARP table entries. |
(Example covered in description) |
arp -a -d |
Removes all entries from the ARP table. |
arp -d 192.168.1.100 Deletes the ARP entry for IP 192.168.1.100. |
arp -s |
Adds a new entry to the ARP table. |
arp -s 192.168.1.10 00:11:22:33:44:55 Adds a static ARP entry for IP 192.168.1.10 and MAC 00:11:22:33:44:55. |
Shows active network connections, routing information, and other network statistics. |
netstat -antp Lists all active network connections and the processes using them. |
|
netstat -r |
Prints the kernel’s routing table. |
(Example covered in description) |
Tests network connectivity between a host/client and server by sending data packets and measuring the response time. |
ping 8.8.8.8 Tests connectivity to the Google DNS server at 8.8.8.8. |
|
Configures the kernel’s routing table entries. |
route add default gw 192.168.1.1 Sets the default gateway to 192.168.1.1. |
|
route flush |
Removes all routes from the routing table. |
(Example covered in description) |
Displays the path and hops that packets take to reach a remote server. |
traceroute www.example.com Traces the route taken to reach www.example.com. |
|
Establishes the connection to the remote server or system through a TCP/IP network using the Telnet protocol. |
telnet 192.168.1.10 22 Connects to the SSH server on 192.168.1.10 via Telnet. |
|
w |
This will Shows the information about users currently logged into the system. |
(Example covered in description) |
|
Sends and receives email messages via the command line interface. |
mail -s "Hello" user@example.com Sends an email with subject “Hello” to user@example.com. |
Displays and filters network packet data based on a given regular expression pattern. |
ngrep -W byline "^GET" Captures and prints HTTP GET requests. |
|
Displays and configures wireless network interface settings. |
iw dev wlan0 scan Scans for available wireless networks on the wlan0 interface. |
Linux Network Commands Cheat Sheet
Linux is a very popular operating system. Many people use it. Developers and network admins need to know Linux network commands well. This article will going explains most of the common Linux network commands in a very easy way and It also has a cheat sheet about these commands. The cheat sheet tells you what each command does and how you use it.
Linux Network Commands Cheat Sheet
- What Are Networking Commands in Linux?
- Linux Networking Commands Cheat Sheet
- Network Configuration Commands
- Network Connectivity Commands
- DNS and Name Resolution Commands
- Network Information Commands
- Network Testing and Monitoring Commands
- Network Analysis and Monitoring Commands
- Remote Access Commands
- Security Commands
- Utility Commands