Operations 35 min read

Test Your Linux Mastery: 100 Essential System Administration Questions

This article presents a comprehensive set of 100 multiple‑choice Linux system‑administration questions covering commands, daemons, file permissions, networking, and more, each worth one point, with reference answers provided at the end for self‑assessment.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Test Your Linux Mastery: 100 Essential System Administration Questions

This set contains 100 Linux multiple‑choice questions, each worth one point, with reference answers at the end.

1. The cron background daemon is used for:

A. Managing file sharing over the network

B. Managing the print subsystem

C. Tracking system information and errors

D. Managing daily task scheduling

2. In most Linux distributions, which of the following is a block device?

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 can you find out how much space is available in the current directory?

A. Use df

B. Use du /

C. Use du .

D. Use df .

5. How do you change the permission settings of a file?

A. attrib

B. chmod

C. change

D. file

6. If you need to determine 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 current system is running at level 3, how can you 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. What does the following command do: 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, you want a .bashrc file placed in every new user's home directory; where should you put this file?

A. /etc/skel/

B. /etc/default/

C. /etc/defaults/

D. /etc/profile.d/

12. In bash, what is the purpose of the export command?

A. Run command in subshell

B. Enable command history in subshell

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 command option can delete a user and also remove the user's home directory?

A. rmuser -r

B. deluser -r

C. userdel -r

D. usermgr -r

15. A backup program mybackup needs to run at 1 pm and 8 pm Monday through 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 do you unmount a currently mounted filesystem?

A. umount

B. dismount

C. mount -u

D. Delete the entry from /etc/fstab

17. If your umask is set to 022, what are the default permissions of a newly created file?

A. ----w--w-

B. -w--w----

C. r-xr-x---

D. rw-r--r--

18. Which command finds 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. When running a script, which permission is NOT required from the user?

A. read

B. write

C. execute

D. browse on the directory

21. In Linux, how do you identify the second extended partition on the slave hard disk attached to IDE0?

A. /dev/hdb2

B. /dev/hd1b2

C. /dev/hdb6

D. /dev/hd1b6

22. When starting an application, how do you set the process priority?

A. priority

B. nice

C. renice

D. setpri

23. In bash, appending "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. Which command displays 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 can convert 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 boot information?

A. mesg -d

B. dmesg

C. cat /etc/mesg

D. cat /var/mesg

29. Runlevels are defined in:

A. in the kernel

B. in /etc/inittab

C. in /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 you create a symbolic link new pointing to file old with ln, and then delete old, can you still access the data?

A. Not possible

B. Still can

C. Depends on owner

D. Depends on permissions

32. In an ext2fs filesystem, what default percentage of space is reserved for the root user?

A. 3%

B. 5%

C. 10%

D. 15%

33. Which command shows inode usage for each filesystem?

A. df -i

B. df -H

C. free -b

D. du -a -c /

34. In most Linux distributions, which runlevel corresponds to graphical mode?

A. 1

B. 2

C. 3

D. 5

35. Which command finds all manual entries containing the word "print"?

A. man print

B. which print

C. locate print

D. apropos print

36. What does "man 5 passwd" display?

A. Show usage of passwd command

B. Show structure of passwd file

C. Show first five lines of passwd command description

D. Show first five sections of passwd documentation

37. How to find and display all lines that start with "*" in a file?

A. find * file

B. wc -l * < file

C. grep -n * file

D. grep '^\*' file

38. Which ps 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. How to display the number of registered users (including system users) on a Linux system?

A. account -l

B. nl /etc/passwd | head

C. wc --users /etc/passwd

D. wc --lines /etc/passwd

41. Which character placed at the end of a line indicates continuation on the next line?

A. /

B. \

C. ;

D. |

42. What does "kill -9" mean?

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 schedules 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 from oldest to newest

B. Last full backup, then incremental 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. Where should variable settings for all users be placed?

A. /etc/bashrc

B. /etc/profile

C. ~/.bash_profile

D. /etc/skel/.bashrc

47. In Linux, ls is often aliased to "ls --color"; how can you invoke the original ls command?

A. \ls

B. ;ls

C. ls $$

D. ls --noalias

48. What is the typical shebang line at the start of a Linux script file?

A. $/bin/sh

B. #!/bin/sh

C. use /bin/sh

D. set shell=/bin/sh

49. Which syntax runs 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. What is the name of the software that provides TCP/IP packet filtering in Linux?

A. rarp

B. route

C. iptables

D. filter

52. How do you 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. Which authentication protocol in PPP does not transmit passwords in clear text?

A. PAM

B. PAP

C. PGP

D. CHAP

58. Which filesystem should be allocated the largest 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 pkganme.rpm ; dpkg -i pkganme.deb

60. During software installation, which step requires root privileges?

A. make

B. make deps

C. make config

D. make install

61. Which command updates only already installed rpm packages?

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 placed to manage booting?

A. MBR

B. /

C. first sector of 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. For Linux‑Windows network sharing, which daemon is needed?

A. bind

B. smbd

C. nmbd

D. shard

67. What is the default user for Apache server child processes?

A. root

B. apached

C. httpd

D. nobody

68. 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 for loadable modules (e.g., I/O addresses) 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. In a bash shell, pressing Ctrl‑Z while a command runs will:

A. terminate the foreground job

B. add EOF to current file

C. move the foreground job to background

D. log out the 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 shared 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 command installs compiled code via a Makefile?

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 refers to:

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 which X server a remote X application should display on?

A. DISPLAY

B. TERM

C. ECHO

D. OUTPUT

83. In xdm's configuration directory, which file defines applications started automatically 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 for a long time, where might the problem be?

A. NFS.

B. DNS.

C. NIS.

D. routing.

85. Ping uses which protocol?

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. Dial‑up Internet connections typically use which protocol?

A. PPP

B. UUCP

C. SLIP

D. Ethernet

88. Which protocol in TCP/IP is used for 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 checksum for a file?

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 list of directories exported for 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 stored?

A. /etc/aliases

B. /etc/mailaliases

C. /etc/sendmail.aliases

D. /etc/sendmail/aliases

95. 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 clears 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

Reference Answers:

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.

LinuxSystem Administrationmultiple choicepractice test
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.