Networking Flashcards
7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Networking flashcards as text
Which command displays the routing table on a Linux system?
Answer: netstat -r
The `netstat -r` command (or `ip route show`) displays the kernel IP routing table.
What does the `ss` command replace in modern Linux distributions?
Answer: netstat
`ss` (socket statistics) is the modern replacement for `netstat` and provides faster, more detailed socket information.
Which file on a Linux system maps hostnames to IP addresses locally before DNS is queried?
Answer: /etc/hosts
The `/etc/hosts` file provides static hostname-to-IP mappings that are checked before DNS resolution.
What is the purpose of the `/etc/resolv.conf` file?
Answer: Specifies DNS server addresses for name resolution
`/etc/resolv.conf` configures the DNS resolver by specifying nameserver addresses and search domains.
Which port does SSH use by default?
Answer: 22
SSH (Secure Shell) listens on TCP port 22 by default for encrypted remote connections.
What does the `traceroute` command do?
Answer: Shows the path packets take to reach a destination
`traceroute` sends packets with incrementing TTL values to reveal each hop between source and destination.
Which `ip` command subcommand would you use to add a new IP address to an interface?
Answer: ip addr add
`ip addr add / dev ` adds an IP address to a specified network interface.