System Administration 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 System Administration flashcards as text
What is the purpose of the `/etc/hosts.allow` and `/etc/hosts.deny` files?
Answer: Define TCP Wrappers access control rules
TCP Wrappers reads `/etc/hosts.allow` and `/etc/hosts.deny` to permit or block connections to wrapped services.
Which command would display all open network ports and the processes listening on them?
Answer: netstat -tulpn
`netstat -tulpn` shows TCP/UDP listening ports with the process name/PID (requires root for all processes).
You want to find all files modified in the last 24 hours under `/var/log`. Which command is correct?
Answer: find /var/log -mtime -1
`-mtime -1` matches files modified less than 1 day (24 hours) ago; the minus sign means 'less than'.
What is the primary function of `logrotate`?
Answer: Manages automatic rotation, compression, and deletion of log files
`logrotate` automatically rotates, compresses, removes, and mails log files based on rules in `/etc/logrotate.conf`.
Which `iptables` chain filters packets destined for the local system?
Answer: INPUT
The INPUT chain processes packets destined for the local machine's own network stack.
What does the `lsblk` command display?
Answer: Block device tree showing disks and partitions
`lsblk` lists block devices in a tree format showing disks, partitions, and their mount points.
A service fails to start and you see 'Unit not found'. What is the most likely cause?
Answer: The unit file does not exist or is not in the search path
'Unit not found' means systemd cannot locate the service's unit file in any of its configured directories.