Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Chapter: 4
Q101:
In UNIX/Linux, the root directory is denoted by which symbol?
A. /
B. ~
C. $
D. &
Correct Answer:
A
Chapter: 4
Q102:
Which directory in Linux holds essential system boot files, including the kernel image?
A. /bin
B. /boot
C. /dev
D. /home
Correct Answer:
B
Chapter: 4
Q103:
Which directory in Linux contains configuration files for system setup?
A. /boot
B. /etc
C. /lib
D. /sbin
Correct Answer:
B
Chapter: 4
Q104:
What is the purpose of the /mnt directory in Linux?
A. To store system configurations
B. To mount temporary filesystems
C. To store executable files
D. To store shared libraries
Correct Answer:
B
Chapter: 4
Q105:
Which Linux directory is used for storing system utilities and administrative commands?
A. /boot
B. /bin
C. /sbin
D. /home
Correct Answer:
C
Chapter: 4
Q106:
What does the /home directory in Linux contain?
A. Temporary files
B. User-specific files
C. Kernel files
D. Executable files
Correct Answer:
B
Chapter: 4
Q107:
Fill in the blank: The __________ approach to OS design simplifies debugging and verification by modularizing the system.
A. Layered
B. Microkernel
C. Monolithic
D. Virtual Machine
Correct Answer:
A
Chapter: 4
Q108:
Fill in the blank: The __________ approach to OS design involves structuring the system by adding more services to user space rather than modifying the kernel.
A. Microkernel
B. Monolithic
C. Layered
D. Virtual Machine
Correct Answer:
A
Chapter: 4
Q109:
In a microkernel OS, the user-level processes typically interact with the kernel through __________.
A. memory management
B. communication facilities
C. networking protocols
D. file system management
Correct Answer:
B
Chapter: 5
Q110:
Which command is used to display the contents of a directory in UNIX/Linux?
A. ls
B. cd
C. mkdir
D. pwd
Correct Answer:
A
Chapter: 5
Q111:
The command 'ls -a' displays all files, including those starting with _______.
A. hidden files
B. system files
C. text files
D. read-only files
Correct Answer:
A
Chapter: 5
Q112:
What does the 'ls -l' command display?
A. Directory structure
B. File contents
C. File details including permissions
D. System processes
Correct Answer:
C
Chapter: 5
Q113:
Which of the following commands is used to create a directory in UNIX/Linux?
A. mkdir
B. rmdir
C. cp
D. mv
Correct Answer:
A
Chapter: 5
Q114:
What is the purpose of the 'rmdir' command in UNIX/Linux?
A. To remove a file
B. To remove a directory if empty
C. To rename a directory
D. To copy a directory
Correct Answer:
B
Chapter: 5
Q115:
Which command is used to change the current working directory in UNIX/Linux?
A. cd
B. pwd
C. ls
D. mkdir
Correct Answer:
A
Chapter: 5
Q116:
The command 'pwd' in UNIX/Linux displays _______.
A. Process ID
B. Current directory
C. User details
D. File content
Correct Answer:
B
Chapter: 5
Q117:
What does the 'cp' command do in UNIX/Linux?
A. Copies files
B. Moves files
C. Removes files
D. Renames files
Correct Answer:
A
Chapter: 5
Q118:
Which command is used to remove files in UNIX/Linux?
A. rm
B. cp
C. mv
D. mkdir
Correct Answer:
A
Chapter: 5
Q119:
What is the default name of the executable file produced when a C program is compiled in UNIX/Linux?
A. a.out
B. program.exe
C. output
D. executable
Correct Answer:
A
Chapter: 5
Q120:
The 'gcc program.c -o assignment' command in UNIX/Linux compiles a program and stores the executable in which file?
A. program.c
B. assignment
C. a.out
D. executable
Correct Answer:
B