BASH - Commands - Network Commands

Network

DescriptionCommand
Activate network interfaceip link set ppp0 up
Change default routeip route add default via 192.168.0.2
Deactivate network interfaceip link set ppp0 down
Delete IP addressip addr del 192.168.0.193/24 dev wlan0
Display the system hostnamehostname
Display IP address of the hosthostname -i
Display network interfaces and IP addressesip addr show
Display network interfaces and IP addresses for a specific interfaceip addr show eth0
Download a filewget filename
Enable TCP Delayed Ackip route quickack
Get DNS information for the domaindig domain
Get Reverse DNS information for the hostdig -x host
Get whois information for the domainwhois domain
Lookup DNS IP address for the domainhost google.com
Lookup local IP addresshostname -i
Monitor network messagesip monitor all
Set IP addressip addr add 192.168.0.1 dev eth0
Show Ethernet statusethtool eth0
Show Ethernet statusmii-tool eth0
Show Routing tableip route show
Show the route packets will takeip route get 192.168.0.1
Send echo request to test connectionping host
Show all listening network portsnetstat -tulpn
Show network statsip -s link
Show network stats for an interfaceip -s -s link ls eth0
Show arp entriesip neighbour