IKM System Administration Fundamentals — Questions and Answers
Question 1: What is the purpose of a cron job?
- Monitor CPU temperature
- Schedule commands to run automatically at specified times (Correct answer)
- Manage passwords
- Compress logs manually
Correct answer: Schedule commands to run automatically at specified times
Cron is a time-based scheduler executing commands at specified times or intervals.
Uses five time fields: minute, hour, day of month, month, day of week. 'crontab -e' edits user crontabs. Systemd timers are a modern alternative.
Question 2: What does /etc/passwd contain?
- Encrypted passwords
- User account info: username, UID, GID, home directory, shell (Correct answer)
- Password policies
- Failed login logs
Correct answer: User account info: username, UID, GID, home directory, shell
/etc/passwd contains user account information, not actual passwords.
Format: username:x:UID:GID:comment:home:shell. The 'x' means passwords are in /etc/shadow. UID 0 is root, 1-999 system accounts, 1000+ regular users.
Question 3: What is the difference between hard and symbolic links?
- Hard links cross file systems
- Hard links point to the inode; symbolic links point to the file path (Correct answer)
- Symlinks cannot be created by users
- No practical difference
Correct answer: Hard links point to the inode; symbolic links point to the file path
Hard links share the same inode; symbolic links contain the target path.
Hard links cannot cross file systems or link to directories. Deleting one hard link does not affect others. Symbolic links can cross file systems and link to directories but break if the target is deleted.
Question 4: What does chmod do?
- Change ownership
- Change file access permissions (Correct answer)
- Change modification time
- Change file name
Correct answer: Change file access permissions
chmod modifies read, write, and execute permissions for owner, group, and others.
Numeric: r=4, w=2, x=1 (755 = rwxr-xr-x). Symbolic: u+x adds execute for owner. Special permissions: setuid, setgid, sticky bit.
Question 5: What is LVM used for?
- Network volumes
- Flexible disk storage by abstracting physical disks into logical volumes (Correct answer)
- Disk health monitoring
- Disk encryption
Correct answer: Flexible disk storage by abstracting physical disks into logical volumes
LVM provides flexible creation, resizing, and management of logical volumes.
Three layers: Physical Volumes, Volume Groups (pool), Logical Volumes (virtual partitions). Key benefits: online resize, spanning, snapshots, live data migration.
Question 6: What is SSH key-based authentication?
- Speed up connections
- Secure password-less authentication using public-private key pairs (Correct answer)
- Encrypt DNS queries
- Manage SSL certs
Correct answer: Secure password-less authentication using public-private key pairs
SSH keys provide stronger security than passwords and enable automated logins.
Public key in authorized_keys on server. Server sends challenge encrypted with public key; only the matching private key can decrypt. Supports Ed25519 and RSA.
Question 7: What is the purpose of systemd?
- Compile the kernel
- Initialize the system, manage services, and handle system state (Correct answer)
- Manage package repos
- Configure firewalls
Correct answer: Initialize the system, manage services, and handle system state
systemd is the init system and service manager for modern Linux, PID 1.
Replaces SysVinit with parallel startup. Key tools: systemctl (services), journalctl (logs). Unit files define services, timers, mounts. Manages cgroups for resource control.
Question 8: What does /etc/fstab define?
- Firewall rules
- File systems to mount automatically at boot (Correct answer)
- System logging config
- User groups
Correct answer: File systems to mount automatically at boot
/etc/fstab defines which file systems are mounted during startup.
Each line: device/UUID, mount point, type, options, dump flag, fsck order. Using UUID prevents issues if disk order changes. Errors can prevent booting.
Question 9: What is the difference between TCP Wrappers and iptables?
- TCP Wrappers is newer
- TCP Wrappers controls at application level; iptables filters at kernel level (Correct answer)
- iptables is UDP only
- Same technology
Correct answer: TCP Wrappers controls at application level; iptables filters at kernel level
TCP Wrappers uses hosts.allow/deny for services; iptables provides kernel-level packet filtering.
TCP Wrappers intercept connections to libwrap-enabled services. iptables uses netfilter chains (INPUT, OUTPUT, FORWARD). Modern systems use nftables and firewalld.
Question 10: What is RAID?
- SSD file system
- Technology combining multiple disks for performance, redundancy, or both (Correct answer)
- Load balancing technique
- Memory management algorithm
Correct answer: Technology combining multiple disks for performance, redundancy, or both
RAID combines multiple physical disks into a logical unit.
RAID 0 (striping, no redundancy), RAID 1 (mirror), RAID 5 (parity, 1 disk failure), RAID 6 (double parity), RAID 10 (mirror+stripe). Not a substitute for backups.
Question 11: What is log rotation?
- Log encryption
- Managing log size by archiving, compressing, and removing old logs (Correct answer)
- Sending logs to central server
- Filtering by severity
Correct answer: Managing log size by archiving, compressing, and removing old logs
Log rotation prevents log files from consuming all disk space.
logrotate configured in /etc/logrotate.conf. Options: rotate count, frequency, compress, maxsize, copytruncate, postrotate scripts.
Question 12: What is a container vs a virtual machine?
- Containers are VMs
- Containers share host kernel; VMs run separate operating systems (Correct answer)
- VMs are more lightweight
- Containers have better hardware isolation
Correct answer: Containers share host kernel; VMs run separate operating systems
Containers share the host kernel and isolate processes; VMs run complete guest OSes.
Containers use namespaces and cgroups. Lightweight (MB vs GB), fast start (seconds vs minutes). VMs provide stronger isolation. Docker popularized containers; Kubernetes orchestrates them.
Question 13: A Linux server has a umask of 027. What permissions will a newly created regular file receive by default?
- 750 (rwxr-x---)
- 640 (rw-r-----) (Correct answer)
- 644 (rw-r--r--)
- 600 (rw-------)
Correct answer: 640 (rw-r-----)
Regular files start at 666, and masking with 027 removes group write and all other bits, leaving 640.
Question 14: Which RAID level combines mirroring and striping, needs at least four disks, and gives strong write performance with redundancy?
- RAID 0
- RAID 5
- RAID 10 (Correct answer)
- RAID 1
Correct answer: RAID 10
RAID 10 stripes data across mirrored pairs, so it has no parity write penalty and stays redundant.
Question 15: When does the cron entry '30 2 * * 1 /usr/local/bin/backup.sh' run?
- Every day at 2:30 AM
- Every Monday at 2:30 AM (Correct answer)
- On the 1st of every month at 2:30 AM
- Every 30 minutes between 2:00 and 3:00 AM on Mondays
Correct answer: Every Monday at 2:30 AM
The fields are minute=30, hour=2, any day of month, any month, day of week=1 (Monday).
Question 16: Which statement about hard links on a typical Linux filesystem is true?
- They can freely point to directories
- Deleting the original filename makes the hard link unusable
- Each hard link gets its own separate inode
- They cannot span different filesystems (Correct answer)
Correct answer: They cannot span different filesystems
A hard link is just another directory entry for the same inode, and inode numbers are only unique within one filesystem.
Question 17: A company does a full backup on Sunday and differential backups every other night. To restore after a failure on Thursday morning, which backups are needed?
- Sunday's full backup and Wednesday's differential (Correct answer)
- Sunday's full backup and every differential from Monday to Wednesday
- Only Wednesday's differential
- Sunday's full backup only
Correct answer: Sunday's full backup and Wednesday's differential
Each differential holds every change since the last full backup, so you only need the full backup and the newest differential.
Question 18: Which signal can a process NOT catch, block, or ignore?
- SIGTERM
- SIGHUP
- SIGKILL (Correct answer)
- SIGINT
Correct answer: SIGKILL
The kernel delivers SIGKILL (signal 9) directly, and a process cannot install a handler for it.
Question 19: Which DNS record type maps an IP address back to a hostname for reverse lookups?
- A
- PTR (Correct answer)
- CNAME
- SRV
Correct answer: PTR
PTR records under in-addr.arpa or ip6.arpa resolve addresses back to names.