Preparing for Linux interviews or strengthening your system administration skills? This Linux MCQs collection covers Linux fundamentals, filesystem navigation, permissions, users and groups, process management, package management, networking, storage, shell scripting, security, and troubleshooting. Use these multiple-choice questions to assess your knowledge and identify topics to revise.
Note: Score 60% or higher to unlock an exclusive offer of up to 50% off on all self-paced Linux and System Administration courses.
Let's begin!
1. What is the Linux kernel responsible for?
2. Which component provides the command-line interface?
3. Which command displays the current username?
4. Which command displays the Linux kernel and system information?
5. What does the root account represent?
6. Which directory typically contains essential user commands?
7. What is a Linux distribution?
8. Which command prints the current working directory?
9. Which symbol commonly represents the root directory?
10. What does the tilde (~) usually represent in a shell?
11. Which command clears the terminal display?
12. Which command shows a short manual page for a command?
13. Which directory stores system-wide configuration files?
14. Where are regular users’ home directories commonly located?
15. Which directory contains variable data such as logs?
16. What is the purpose of /proc?
17. Which directory commonly contains device files?
18. Where are temporary files commonly stored?
19. Which command creates a directory?
20. Which command removes an empty directory?
21. Which command changes the current directory?
22. Which command lists files, including hidden files?
23. Which command copies files or directories?
24. Which command moves or renames a file?
25. Which command creates an empty file or updates its timestamp?
26. Which command displays the contents of a text file?
27. Which command searches text using patterns?
28. Which command displays the first lines of a file by default?
29. Which command displays the last lines of a file by default?
30. Which command counts lines, words, and bytes?
31. Which command sorts lines in text input?
32. Which utility can perform stream editing on text?
33. Which command compares two files line by line?
34. Which command searches for files by name and other criteria?
35. Which command prints a line of text to standard output?
36. Which command can extract selected columns or fields from lines?
37. What does the permission mode 755 grant to the owner?
38. Which command changes file permissions?
39. Which command changes file ownership?
40. What does the permission letter r represent?
41. What does the permission letter w represent?
42. What does the permission letter x represent?
43. In chmod 644, what permissions do group members receive?
44. Which command displays detailed file permissions and ownership?
45. What is the purpose of umask?
46. Which command changes a user password?
47. What does chgrp change?
48. What does the sticky bit commonly help control on shared directories?
49. Which file stores local user account information?
50. Which file stores local group information?
51. Which file typically stores password hashes and aging information?
52. Which command adds a new user account on many Linux distributions?
53. Which command modifies an existing user account?
54. Which command removes a user account?
55. Which command displays user and group IDs?
56. Which command displays the groups a user belongs to?
57. What is the purpose of sudo?
58. Which command creates a group?
59. Which command switches to another user account?
60. What is a primary group?
61. Which command displays a snapshot of running processes?
62. Which interactive utility monitors processes and resource use?
63. Which command sends a signal to a process by PID?
64. Which command searches for processes by name or attributes?
65. What does the ampersand (&) do when placed after a shell command?
66. Which command lists jobs started by the current shell?
67. Which command brings a background job to the foreground?
68. Which command resumes a stopped job in the background?
69. What is a PID?
70. Which signal is commonly used for graceful process termination?
71. Which command can adjust a process priority when starting it?
72. What does renice do?
73. Which package manager is commonly used on Debian and Ubuntu?
74. Which command refreshes APT package indexes?
75. Which command installs a package with APT?
76. Which package manager is commonly used by modern Fedora systems?
77. Which command installs a package using DNF?
78. Which package format is native to Debian-based systems?
79. Which package format is commonly used by RPM-based distributions?
80. Which command queries installed RPM packages?
81. Which command removes a package using APT?
82. What is a software repository?
83. Which command searches package names and descriptions with APT?
84. What is the purpose of package dependencies?
85. Which command displays network interface addresses on modern Linux systems?
86. Which command tests reachability using ICMP echo requests?
87. Which command securely connects to a remote shell?
88. Which utility securely copies files over SSH?
89. Which command-line tool transfers data using URLs?
90. Which file commonly maps hostnames to IP addresses locally?
91. Which file configures DNS resolver information on many Linux systems?
92. What is the default port for SSH?
93. Which command displays listening TCP and UDP sockets on many systems?
94. Which command traces the route packets take toward a destination?
95. What does DNS primarily translate?
96. Which protocol provides encrypted web communication?
97. Which command reports mounted filesystem disk usage?
98. Which command estimates space used by files and directories?
99. Which command lists block devices?
100. Which file commonly defines filesystems to mount at boot?
101. Which command attaches a filesystem to the directory tree?
102. Which command detaches a mounted filesystem?
103. Which utility checks and repairs many Linux filesystems?
104. What is a mount point?
105. Which command displays memory and swap usage?
106. Which command can create and manage partition tables interactively?
107. What is swap space used for?
108. Which command displays filesystem type and UUID information for block devices?
109. Which line commonly identifies Bash as the script interpreter?
110. Which command makes a shell script executable for its owner?
111. Which variable holds the first positional argument in a shell script?
112. What does $? contain after a command finishes?
113. Which variable expands to the number of positional parameters?
114. Which construct is used for conditional branching in Bash?
115. Which keyword begins a loop over a list in Bash?
116. Which command reads input from standard input in a shell script?
117. Which operator redirects standard output to a file, overwriting it?
118. Which operator appends standard output to a file?
119. What does a pipe (|) do in the shell?
120. Which scheduler is commonly used to run recurring jobs for users?
121. Which command manages services on systemd-based systems?
122. Which command displays logs collected by systemd-journald?
123. Which command displays kernel ring-buffer messages?
124. Which command shows system uptime and load averages?
125. Which command displays CPU architecture and details?
126. Which command displays loaded kernel modules?
127. Which command loads a kernel module and dependencies?
128. What is the purpose of a firewall?
129. Which tool is commonly used to configure firewall rules on many Linux systems?
130. Which command checks whether a command is available and where it resolves?
131. Which practice improves security when administering Linux?
132. Which command displays the system hostname and related settings on systemd systems?
You Can Also Check:
1. Linux Commands Cheat Sheet
2. Ubuntu vs Kali Linux: Key Differences
3. Linux for DevOps: A Complete Guide
4. What Is Bash? A Complete Guide
5. Top Shell Scripting Interview Questions and Answers