Network Basics
Overview
This chapter introduces Linux network configuration and management fundamentals, including network interfaces, IP address configuration, DNS settings, and more.
Network Configuration Viewing
ip Command
ip is the main modern Linux network configuration tool.
ifconfig (Traditional Tool)
Network Interface Information
Configuring IP Addresses
Temporary Configuration
Permanent Configuration (Netplan - Ubuntu)
Ubuntu 18.04+ uses Netplan for network configuration.
Permanent Configuration (NetworkManager)
Permanent Configuration (Traditional Method - Debian)
DNS Configuration
/etc/resolv.conf
systemd-resolved
/etc/hosts
Local hostname resolution:
Hostname Configuration
Network Diagnostic Tools
ping - Test Connectivity
traceroute - Route Tracing
mtr - Comprehensive Diagnosis
dig - DNS Query
nslookup - DNS Query
host - Simple DNS Query
Ports and Connections
ss - Socket Statistics
netstat (Traditional Tool)
lsof - View Port Usage
Network Test Tools
curl - HTTP Request
wget - Download Tool
nc (netcat) - Network Swiss Army Knife
Firewall
UFW (Ubuntu)
iptables
Network Configuration Files
Summary
This chapter introduced Linux network basics:
- Viewing configuration:
ip,ifconfig - Configuring network: Netplan, NetworkManager
- DNS configuration: resolv.conf, hosts
- Diagnostic tools:
ping,traceroute,dig - Port viewing:
ss,netstat,lsof - Network testing:
curl,wget,nc - Firewall:
ufw,iptables
Network configuration is an important skill for server administration. Mastering these tools will help you diagnose and solve network problems.
Previous chapter: Service Management
Next chapter: SSH Remote Connection