Master Linux System Administration: 30 Essential Exam Questions & Answers
This article presents a comprehensive set of 30 Linux system administration exam questions—including multiple‑choice, short‑answer, and open‑ended items—covering command usage, partition planning, file deletion mechanics, vi editor basics, sed options, and more, together with the correct answers for study and review.
Part 1 – Multiple Choice Questions
1. The cron daemon is used for:
A. File sharing over the network
B. Managing the print subsystem
C. Tracking system information and errors
D. Scheduling routine system tasks
2. Which of the following is a block device in most Linux distributions?
A. Serial port
B. Hard disk
C. Virtual terminal
D. Printer
3. Which Linux command can display output one page at a time?
A. pause
B. cat
C. more
D. grep
4. How do you find out how much free space remains in the current directory?
A. Use df
B. Use du /
C. Use du .
D. Use df .
5. Which command changes a file’s permission settings?
A. attrib
B. chmod
C. change
D. file
6. To discover which package provides /etc/my.conf, you would run:
A. rpm -q /etc/my.conf
B. rpm -requires /etc/my.conf
C. rpm -qf /etc/my.conf
D. rpm -q | grep /etc/my.conf
7. If the system is running at runlevel 3, how can you switch to runlevel 5 without rebooting?
A. Set level = 5
B. telinit 5
C. run 5
D. ALT‑F7‑5
8. Which command changes IDE hard‑disk settings?
A. hdparam
B. ideconfig
C. hdparm
D. hddparm
9. Which command lists all tasks scheduled to run once at a specific future time?
A. atq
B. cron
C. batch
D. at
10. The effect of the command set PS1="[\u\w\t]\\$" ; export PS1 is:
A. Change error messages
B. Change the command prompt
C. Change some terminal parameters
D. Change the auxiliary command prompt
11. To automatically copy a .bashrc file into every new user’s home directory, where should the file be placed?
A. /etc/skel/
B. /etc/default/
C. /etc/defaults/
D. /etc/profile.d/
12. In bash, the export command is used to:
A. Run a command in a subshell
B. Enable command history in subshells
C. Set environment variables for other applications
D. Provide NFS shares to other systems
13. For a system using shadow passwords, the correct permissions for /etc/passwd and /etc/shadow are:
A. -rw-r----- , -r--------
B. -rw-r--r-- , -r--r--r--
C. -rw-r--r-- , -r--------
D. -rw-r--rw- , -r-----r--
14. Which command deletes a user and also removes the user’s home directory?
A. rmuser -r
B. deluser -r
C. userdel -r
D. usermgr -r
15. To run a backup program “mybackup” at 13:00 and 20:00 on weekdays, which crontab entry is correct?
A. 0 13,20 * * 1,5 mybackup
B. 0 13,20 * * 1,2,3,4,5 mybackup
C. * 13,20 * * 1,2,3,4,5 mybackup
D. 0 13,20 1,5 * * mybackup
16. How do you unmount a currently mounted filesystem?
A. umount
B. dismount
C. mount -u
D. Delete the entry from /etc/fstab
17. With a default umask of 022, newly created files will have which permissions?
A. ----w--w-
B. -w--w----
C. r-xr-x---
D. rw-r--r--
18. Which command finds the path of a binary named Xconfigurator?
A. apropos Xconfigurator
B. find Xconfigurator
C. where Xconfigurator
D. which Xconfigurator
19. Which command mounts all filesystems defined in /etc/fstab?
A. amount
B. mount -a
C. fmount
D. mount -f
20. To run a script, which permission is NOT required for the user?
A. read
B. write
C. execute
D. browse the directory
21. How is the second extended partition on the slave IDE0 disk identified?
A. /dev/hdb2
B. /dev/hd1b2
C. /dev/hdb6
D. /dev/hd1b6
22. Which command sets a process’s priority when an application starts?
A. priority
B. nice
C. renice
D. setpri
23. In bash, what does appending "1>&2" to a command do?
A. Redirect standard error to standard input
B. Redirect standard input to standard error
C. Redirect standard output to standard error
D. Redirect standard output to standard input
24. Which command correctly copies f1.txt to f2.txt?
A. cp f1.txt | f2.txt
B. cat f1.txt | f2.txt
C. cat f1.txt > f2.txt
D. copy f1.txt | f2.txt
25. Which command shows the last few lines of a file?
A. tac
B. tail
C. rear
D. last
26. How do you quickly change to user John’s home directory?
A. cd @John
B. cd #John
C. cd &John
D. cd ~John
27. Which command converts all characters in a stream to uppercase?
A. tr a‑z A‑Z
B. tac a‑z A‑Z
C. sed /a‑z/A‑Z
D. sed --toupper
28. Which command displays Linux kernel boot messages?
A. mesg -d
B. dmesg
C. cat /etc/mesg
D. cat /var/mesg
29. Run‑level definitions are stored in:
A. in the kernel
B. /etc/inittab
C. /etc/runlevels
D. using the rl command
30. To mount all filesystems listed in /etc/fstab, you use:
A. mount -a
B. mount /mnt/*
C. mount
D. mount /etc/fstab
Answer Key
1.D 2.B 3.C 4.C 5.B 6.C 7.B 8.C 9.A 10.B 11.A 12.C 13.C 14.C 15.B 16.A 17.D 18.D 19.B 20.B 21.C 22.B 23.C 24.C 25.B 26.D 27.A 28.B 29.B 30.A
Part 2 – Short Answer Questions
1. How should Linux systems be partitioned in production environments?
Partitioning should be simple, manageable, and suitable for batch operations. Recommendations vary by server role: single‑server (e.g., /boot 100‑200 MB, swap 2×RAM, / 80 GB, /var 20 GB, /data for web/DB), load balancers, RS servers, database servers (separate /data, RAID 10/5), storage servers, NFS servers, and monitoring servers, each with appropriate swap size and RAID level based on performance and reliability needs.
2. Describe the principle of file deletion in Linux.
Linux deletes a file only when its link count reaches zero and no process holds it open. Each file has an i_count (open references) and i_nlink (hard‑link count). Deleting removes a link; when i_nlink becomes 0 and i_count is 0, the inode and data blocks are freed.
3. Briefly describe how to use the vi editor.
vi is the standard text editor with three modes: normal (command) mode, insert mode, and command‑line mode. In normal mode, keys issue commands for navigation, copying, pasting, and deleting. Press “i” to enter insert mode for text entry. Use “Esc” to return to normal mode, then “:wq” or “:x” to save and quit, adding “!” to force actions.
4. Summarize advanced sed options for basic regular expressions.
-n suppresses automatic printing, -p forces printing, -d deletes lines, -e allows multiple editing commands. Use captured groups with \( \) and refer to them as \1, \2 … up to \9. Remember that sed is greedy; craft patterns carefully and watch for spaces.
Part 3 – Open‑Ended Questions
1. In your past work, what value have you brought to the company?
2. If you accidentally delete a database and cannot recover it, how would you respond?
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
