Operating System MCQs with Answers
Practice important Operating System MCQs with answers and explanations.
Multiple Choice Questions
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
View Answer
A
Q112: What does the 'ls -l' command display?
- A: Directory structure
- B: File contents
- C: File details including permissions
- D: System processes
View Answer
C
Q113: Which of the following commands is used to create a directory in UNIX/Linux?
- A: mkdir
- B: rmdir
- C: cp
- D: mv
View Answer
A
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
View Answer
B
Q115: Which command is used to change the current working directory in UNIX/Linux?
- A: cd
- B: pwd
- C: ls
- D: mkdir
View Answer
A
Q116: The command 'pwd' in UNIX/Linux displays _______.
- A: Process ID
- B: Current directory
- C: User details
- D: File content
View Answer
B
Q117: What does the 'cp' command do in UNIX/Linux?
- A: Copies files
- B: Moves files
- C: Removes files
- D: Renames files
View Answer
A
Q118: Which command is used to remove files in UNIX/Linux?
- A: rm
- B: cp
- C: mv
- D: mkdir
View Answer
A
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
View Answer
A
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
View Answer
B