Linux Networking Commands
Posted on June 1, 2024 (Last modified on June 8, 2024) • 1 min read • 198 wordsLearn essential networking commands in Linux, including configuring network interfaces, monitoring network traffic, and troubleshooting connectivity issues.
Networking is a critical aspect of system administration. This guide covers essential networking commands in Linux, including configuring network interfaces, monitoring network traffic, and troubleshooting connectivity issues.
Use ifconfig to configure network interfaces.
ifconfig eth0 upAssign an IP address.
ifconfig eth0 192.168.1.100Use ip for more advanced network configuration.
ip addr show
ip addr add 192.168.1.100/24 dev eth0
ip link set eth0 upUse netstat to display network connections and routing tables.
netstat -tulnUse ss as a modern alternative to netstat.
ss -tulnUse tcpdump to capture network packets.
tcpdump -i eth0Filter packets by port.
tcpdump -i eth0 port 80Use ping to test network connectivity.
ping google.comUse traceroute to trace the path to a network host.
traceroute google.comUse nslookup to query DNS records.
nslookup google.comMastering networking commands in Linux is essential for troubleshooting and maintaining network connectivity. Practice configuring network interfaces, monitoring traffic, and using diagnostic tools to enhance your networking skills.