1.9 Identify common features and tools of the Linux client/desktop operating system.
📘CompTIA A+ Core 2 (220-1202)
Linux Network Tools
Linux has several built-in commands to check, manage, and troubleshoot network connectivity. These are essential for system administrators and are part of the exam objectives.
1. ip Command
The ip command is used to view and manage network interfaces, IP addresses, and routes. It’s the modern replacement for the older ifconfig.
Basic usage:
- Show all network interfaces and their IP addresses:
ip addr
- Bring an interface up (enable it):
sudo ip link set eth0 up
- Bring an interface down (disable it):
sudo ip link set eth0 down
- Show routing table (how traffic is sent):
ip route
IT environment use case:
- Checking whether a server’s interface has a correct IP address before connecting to the network.
- Adding a static IP address to a Linux server.
2. ping Command
The ping command is used to check if a device is reachable over the network and to measure response time.
Basic usage:
ping 192.168.1.1
or using a hostname:
ping google.com
- Sends packets to the target and shows whether the target responds and how fast.
Common options:
-c 4→ send only 4 packets:
ping -c 4 google.com
IT environment use case:
- Checking if a website or server is online.
- Testing connectivity between two machines in a network.
3. curl Command
The curl command is used to transfer data to or from a server using protocols like HTTP, HTTPS, FTP, and more. It’s often used to test web services or APIs.
Basic usage:
- Fetch a web page:
curl https://example.com
- Show only headers (meta-information about the page):
curl -I https://example.com
IT environment use case:
- Checking if a web server is responding correctly.
- Testing APIs for web applications.
- Downloading files from a server directly to a Linux system.
4. dig Command
The dig (Domain Information Groper) command is used for DNS lookups. It shows how domain names are resolved to IP addresses.
Basic usage:
dig example.com
- Returns the IP address for the domain, name servers, and other DNS information.
Common options:
+short→ only show the IP address:
dig example.com +short
- Specify a particular DNS server:
dig @8.8.8.8 example.com
IT environment use case:
- Checking if a domain resolves correctly.
- Troubleshooting DNS issues when users cannot reach websites.
5. traceroute Command
The traceroute command shows the path packets take from your machine to a destination and measures delays at each hop.
Basic usage:
traceroute google.com
IT environment use case:
- Diagnosing where network delays or failures occur between servers.
- Understanding the route traffic takes through multiple network devices.
Summary Table for Exam
| Command | Purpose | Example | IT Use Case |
|---|---|---|---|
ip | Manage interfaces, IPs, routes | ip addr, ip route | Check IP addresses, configure network interfaces |
ping | Test connectivity and latency | ping -c 4 google.com | Verify server or device is online |
curl | Transfer data or test web servers | curl -I https://example.com | Check web server/API response |
dig | DNS lookups | dig example.com +short | Verify domain resolves correctly |
traceroute | Trace network path | traceroute google.com | Find network hops and delays |
✅ Exam Tips:
- Know what each command does, not just the syntax.
- Remember
pingis for connectivity,digis for DNS,tracerouteis for path tracing. - Commands like
ipandcurlare often used for configuration or testing in real IT tasks. - Options like
-cforpingor+shortfordigare commonly tested.
