Operations 31 min read

Master Linux System Administration: 100 Essential Quiz Questions

This article presents a comprehensive set of 100 multiple‑choice questions covering Linux system administration topics such as daemons, file permissions, package management, networking, and command‑line utilities, along with the correct answers for self‑assessment and exam preparation.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Linux System Administration: 100 Essential Quiz Questions

1. cron daemon is used for: A. File sharing over network B. Managing print subsystem C. Tracking system information and errors D. Scheduling daily 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 one page of content at a time? A. pause B. cat C. more D. grep

4. How to find out how much space is left in the current directory? A. Use df B. Use du / C. Use du . D. Use df .

5. How to change a file's permission settings? A. attrib B. chmod C. change D. file

6. To find which package a file /etc/my.conf belongs to, you can 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 level 3, how to switch to level 5 without rebooting? A. Set level = 5 B. telinit 5 C. run 5 D. ALT‑F7‑5

8. Which command is used to change 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 purpose of the command: set PS1="[\u\w\t]\\$" ; export PS1 A. Change error message prompt B. Change command prompt C. Change some terminal parameters D. Change auxiliary command prompt

11. As an administrator, where should you place a .bashrc file so that new users get it in their home directories? A. /etc/skel/ B. /etc/default/ C. /etc/defaults/ D. /etc/profile.d/

12. In bash, the export command does what? A. Run a command in a subshell B. Enable command history in subshells C. Set environment variables for other applications D. Provide NFS partitions to other systems

13. In 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 parameter deletes a user and also removes the user’s home directory? A. rmuser -r B. deluser -r C. userdel -r D. usermgr -r

15. A backup program mybackup must run at 1 PM and 8 PM Monday‑Friday; which crontab entry accomplishes this? 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 to unmount a currently mounted filesystem? A. umount B. dismount C. mount -u D. Delete the entry from /etc/fstab

17. With a umask of 022, the default permissions of a newly created file are: A. ----w--w- B. -w--w---- C. r‑x r‑x --- D. rw‑r‑‑r‑‑

18. In one command, how to find the path of a binary command 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, the user does NOT need which permission? A. read B. write C. execute D. browse on the directory

21. In Linux, how is the second extended partition of a slave IDE hard‑disk attached to IDE0 identified? A. /dev/hdb2 B. /dev/hd1b2 C. /dev/hdb6 D. /dev/hd1b6

22. At application startup, how to set a process’s priority? A. priority B. nice C. renice D. setpri

23. In bash, adding "1>&2" after a command means: A. Redirect stderr to stdin B. Redirect stdin to stderr C. Redirect stdout to stderr D. Redirect stdout to stdin

24. Which command 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. The command to display the last few lines of a file is: A. tac B. tail C. rear D. last

26. How to quickly switch 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 shows Linux boot information? 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. How to mount all filesystems defined in /etc/fstab? A. mount -a B. mount /mnt/* C. mount D. mount /etc/fstab

31. If a symbolic link new points to file old and old is deleted, can the data still be accessed? A. No, it is impossible B. Yes, it can still be accessed C. Depends on the file owner D. Depends on the file permissions

32. In an ext2 filesystem, how much space is reserved for the root user by default? A. 3% B. 5% C. 10% D. 15%

33. Which command shows inode usage for each partition? A. df -i B. df -H C. free -b D. du -a -c /

34. In most Linux distributions, which run‑level corresponds to graphical mode? A. 1 B. 2 C. 3 D. 5

35. To find all manual entries containing the word "print" you would use: A. man print B. which print C. locate print D. apropos print

36. What does "man 5 passwd" display? A. Usage of the passwd command B. Structure of the passwd file C. First five lines of the passwd manual D. First five sections of the passwd documentation

37. How to find all lines in a file that start with "*"? A. find \* file B. wc -l * < file C. grep -n * file D. grep '^\*' file

38. In the ps command, which option shows processes of all users? A. a B. b C. u D. x

39. Which command displays a binary file? A. od B. vil C. view D. binview

40. To count the number of registered users (including system users) on a Linux system you would use: A. account -l B. nl /etc/passwd | head C. wc --users /etc/passwd D. wc --lines /etc/passwd

41. Which character at the end of a line indicates the command continues on the next line? A. / B. \ C. ; D. |

42. The meaning of "kill -9" is: A. Kills the process whose PID is 9. B. Kills all processes belonging to UID 9. C. Sends SIGKILL to the process whose PID is 9. D. Sends SIGTERM to the process whose PID is 9.

43. How to delete a non‑empty subdirectory /tmp? A. del /tmp/* B. rm -rf /tmp C. rm -Ra /tmp/* D. rm -rf /tmp/*

44. Which command can schedule cmd1 to run at midnight today? A. at midnight cmd1 B. cron -at "00:00" cmd1 C. batch -t "00:00" < cmd1 D. echo "cmd1" | at midnight

45. With an incremental backup strategy, in what order should you restore data? A. Last full backup, then incremental backups from oldest to newest B. Last full backup, then incremental backups from newest to oldest C. Incrementals from oldest to newest, then last full backup D. Incrementals from newest to oldest, then last full backup

46. To set environment variables for all users, which file should be edited? A. /etc/bashrc B. /etc/profile C. ~/.bash_profile D. /etc/skel/.bashrc

47. If ls is aliased to "ls --color", how can you invoke the original ls? A. \ls B. ;ls C. ls $$ D. ls --noalias

48. What is the typical shebang line at the start of a Linux shell script? A. $/bin/sh B. #!/bin/sh C. use /bin/sh D. set shell=/bin/sh

49. Which syntax means "execute cmd2 only if cmd1 succeeds"? A. cmd1&&cmd2 B. cmd1|cmd2 C. cmd1;cmd2 D. cmd1||cmd2

50. In which file are the I/O addresses of network cards defined? A. cat /proc/modules B. cat /proc/devices C. cat /proc/ioports D. cat /io/dma

51. Which software provides TCP/IP packet filtering on Linux? A. rarp B. route C. iptables D. filter

52. How to pause a print queue? A. lpr B. lpq C. lpc D. lpd

53. Which vi command exits without saving? A. :q B. :w C. :wq D. :q!

54. In XFree86 3.x, the default font server is: A. xfs B. xfserv C. fonts D. xfstt

55. Which command checks basic network connectivity? A. ping B. route C. netstat D. ifconfig

56. Which protocol uses more than one port? A. telnet B. FTP C. rsh D. HTTP

57. In PPP, which authentication protocol does NOT transmit the password in clear text? A. PAM B. PAP C. PGP D. CHAP

58. Which filesystem should be allocated the most space? A. /usr B. /lib C. /root D. /bin

59. How to install an RPM package on a Debian system? A. alien pkgname.rpm B. dpkg --rpm pkgname.rpm C. dpkg --alien pkgname.rpm D. alien pkgname.rpm ; dpkg -i pkgname.deb

60. Which step of software installation requires root privileges? A. make B. make deps C. make config D. make install

61. Which command updates already installed RPM packages only? A. rpm -U *.rpm B. rpm -F *.rpm C. rpm -e *.rpm D. rpm -q *.rpm

62. In a dual‑boot Windows/Linux system, where should LILO be installed to manage the boot loader? A. MBR B. / C. First sector of the root partition D. /LILO

63. The configuration file for ldconfig is: A. /lib/ld.so B. /etc/ld.so.conf C. /etc/ld.so.cache D. /etc/modules.conf

64. Which command compresses files? A. tar -dzvf filename.tgz * B. tar -tzvf filename.tgz * C. tar -czvf filename.tgz * D. tar -xzvf filename.tgz *

65. A network service daemon is: A. lpd B. netd C. httpd D. inetd

66. To provide network file sharing between Linux and Windows, which daemon is needed? A. bind B. smbd C. nmbd D. shard

67. The default user for Apache sub‑processes is: A. root B. apached C. httpd D. nobody

68. The default location for unsent mail in sendmail is: A. /var/mail/ B. /var/spool/mail/ C. /var/spool/mqueue/ D. /var/mail/deliver/

69. The main configuration file for Apache is: A. httpd.conf B. httpd.cfg C. access.cfg D. apache.conf

70. Where are parameters such as I/O addresses for loadable modules stored? A. /etc/conf.modules B. /etc/lilo.conf C. /boot/System.map D. /etc/sysconfig

71. How to disable mail notifications in Linux? A. biff n B. mesg n C. notify off D. set notify=off

72. Pressing Ctrl‑Z while a command is running in bash will: A. Terminate the foreground job B. Add EOF to the current file C. Move the foreground job to the background D. Log out the current user

73. Which files define the bash environment for a user? A. bash & .bashrc B. bashrc & .bash_conf C. bashrc & bash_profile D. .bashrc & .bash_profile

74. Which command shows the libraries used by a program? A. ldd B. ld so C. modprobe D. ldconfig

75. How to view the location of configuration files of an RPM package? A. rpm -qc rpm1 B. rpm -Vc rpm1 C. rpm --config rpm1 D. rpm -qa --config rpm1

76. How to view the changelog of an RPM package? A. rpm -Vc postfix B. rpm -qpil postfix C. rpm --changelog postfix D. rpm -q --changelog postfix

77. Which Makefile command installs compiled code? A. make B. install C. make depend D. make install

78. Which command extracts a tar archive? A. tar -czvf filename.tgz B. tar -xzvf filename.tgz C. tar -tzvf filename.tgz D. tar -dzvf filename.tgz

79. In XF86Config, which section sets font files? A. The Fonts section. B. The Files section. C. The xfsCodes section. D. The Graphics section.

80. 8‑bit color means: A. 64K colors B. 16K colors C. 256 colors D. 16M colors

81. Which file sets the X window display resolution? A. xinit B. xinitrc C. XF86Setup D. XF86Config

82. Which variable specifies the X server for remote X applications? A. DISPLAY B. TERM C. ECHO D. OUTPUT

83. In xdm’s configuration directory, which file defines applications started after user login? A. The Xsession file B. The Xsetup_0 file C. The Xstart_up file D. The GiveConsole file

84. If "netstat -a" hangs, the problem is likely with: A. NFS B. DNS C. NIS D. routing

85. The protocol used by ping is: A. TCP B. UDP C. SMB D. ICMP

86. Which command is NOT used for network troubleshooting? A. ping B. init C. telnet D. netstat

87. The protocol commonly used for dial‑up networking is: A. PPP B. UUCP C. SLIP D. Ethernet

88. Which protocol provides automatic IP address allocation? A. ARP B. NFS C. DHCP D. DNS

89. Which file defines network service ports? A. /etc/netport B. /etc/services C. /etc/server D. /etc/netconf

90. Which utility generates a file checksum? A. md5 B. tar C. crypt D. md5sum

91. By default, where are user mails stored? A. ~/mail/ B. /var/mail/ C. /var/mail/spool/ D. /var/spool/mail/

92. Which file contains the directory list used by the NFS daemon? A. /etc/nfs B. /etc/nfs.conf C. /etc/exports D. /etc/netdir

93. How to stop the telnet service on a machine? A. Put NONE in /etc/telnet.allow B. Put a line 'ALL:ALL' in /etc/hosts.deny C. Comment the telnet entry in /etc/inittab D. Comment the telnet entry in /etc/xinetd.conf

94. In which file are sendmail aliases saved? A. /etc/aliases B. /etc/mailaliases C. /etc/sendmail.aliases D. /etc/sendmail/aliases

95. The configuration file for smbd and nmbd daemons is: A. /etc/exports B. /etc/smb.conf C. /etc/samba/config D. /usr/local/samba.cfg

96. Which command unloads a kernel module? A. rmmod B. unmod C. delmod D. modprobe

97. When must you run lilo? A. Once a day from cron B. Once a week from cron C. After installing a new kernel D. After installing a new module

98. Which command shows all loaded modules? A. lsmod B. dirmod C. modules D. modlist

99. Which command refreshes the printer queue? A. lpflush B. lprm - C. lpclear D. lprm all

100. Which command displays network card interrupts? A. cat /proc/ioports B. cat /proc/interrupts C. cat /proc/memoryinfo D. which interrupts

Answer Key: 01.D 02.B 03.C 04.C 05.B 06.C 07.B 08.C 09.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 31.A 32.C 33.A 34.D 35.D 36.B 37.D 38.A 39.A 40.D 41.B 42.D 43.B 44.D 45.B 46.B 47.A 48.B 49.A 50.C 51.C 52.C 53.D 54.A 55.A 56.B 57.D 58.A 59.D 60.D 61.B 62.A 63.B 64.C 65.D 66.B 67.D 68.C 69.A 70.A 71.A 72.C 73.D 74.A 75.A 76.D 77.D 78.B 79.B 80.C 81.D 82.A 83.B 84.B 85.D 86.B 87.A 88.C 89.B 90.A 91.D 92.C 93.D 94.A 95.B 96.A 97.C 98.A 99.B 100.B

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

command-lineSystem AdministrationQuizLinux Basics
MaGe Linux Operations
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.