010-160 010-160 - LPI Linux Essentials Networking Basics Questions and Answers 2 — Questions and Answers
Question 1: Which command shows the routing table on a Linux system using the modern iproute2 suite?
- ip route (Correct answer)
- route -n
- netstat -r
- ifconfig route
Correct answer: ip route
The `ip route` command displays the kernel routing table, showing how packets are directed to their destinations on modern Linux systems.
Question 2: What port number is used by the SSH (Secure Shell) protocol by default?
- 22 (Correct answer)
- 23
- 80
- 443
Correct answer: 22
SSH uses TCP port 22 by default to provide encrypted remote login and command execution over a network.
Question 3: Which command traces the network path (hops) that packets take to reach a destination host?
- traceroute (Correct answer)
- ping
- netstat
- route
Correct answer: traceroute
The `traceroute` command sends packets with increasing TTL values to discover each router (hop) along the path to a destination host.
Question 4: What does the command `ss -tuln` display on a Linux system?
- Listening TCP and UDP ports without resolving names (Correct answer)
- System socket statistics
- SSL certificate details
- Subnet and VLAN information
Correct answer: Listening TCP and UDP ports without resolving names
The `ss -tuln` command lists all listening TCP (-t) and UDP (-u) sockets with numeric addresses (-n) without resolving hostnames (-l for listening).
Question 5: Which command on Linux is used to securely copy files between a local machine and a remote host over SSH?
- scp (Correct answer)
- cp
- ftp
- rsync
Correct answer: scp
The `scp` (secure copy) command uses the SSH protocol to encrypt and transfer files between local and remote systems.
Question 6: What is the purpose of the `/etc/hostname` file on a Linux system?
- It stores the system's hostname (Correct answer)
- It lists remote hostnames for SSH
- It maps hostnames to MAC addresses
- It configures the DNS search domain
Correct answer: It stores the system's hostname
The `/etc/hostname` file contains the hostname of the local Linux system, which is read at boot to set the machine's identity on the network.
Which command shows the routing table on a Linux system using the modern iproute2 suite?