MCQs Practice Portal

Interactive quizzes, exam prep, and practice tests for learners and developers.

Unix/Lunux MCQ Quiz Hub

Browse questions and answers for the Unix MCQ quiz.

What is Unix?

✅ Correct Answer: 3

The Unix shell is both _______ and _______ language.

✅ Correct Answer: 1

In which language UNIX is written?

✅ Correct Answer: 2

Which of the following is the first UNIX editor?

✅ Correct Answer: 4

Which of the following is not a feature of Unix?

✅ Correct Answer: 2

Which of the following is not true about Unix?

✅ Correct Answer: 1

Which editor is used by the Unix system to edit files?

✅ Correct Answer: 3

Which of the following is not a part of all the versions of Unix?

✅ Correct Answer: 2

Which part of the Unix operating system interacts with the hardware?

✅ Correct Answer: 4

Which command is used to display the documentation of commands in Unix?

✅ Correct Answer: 1

Which Unix command is used for changing the current directory?

✅ Correct Answer: 3

Which command is used for printing the current working directory?

✅ Correct Answer: 4

Which command is used for listing files in a directory?

✅ Correct Answer: 2

Which command is used by the user to change their login password in Unix?

✅ Correct Answer: 4

Which command is used for displaying the contents of a file in Unix?

✅ Correct Answer: 2

Which command is used to compress files?

✅ Correct Answer: 1

Which command is used for displaying the beginning of a file in Unix?

✅ Correct Answer: 4

Which symbol is used with the tail command to print the file from the selected line? d)

✅ Correct Answer: 3

Which command is used to delete all files in a directory?

✅ Correct Answer: 2

echo command is used for _________

✅ Correct Answer: 1

What is the function of cp command in Unix?

✅ Correct Answer: 4

Which command is used for removing/deleting files in Unix?

✅ Correct Answer: 1

Which command is used for renaming files in Unix?

✅ Correct Answer: 3

Which command is used for comparing two files?

✅ Correct Answer: 2

Which Unix command is used for counting words, lines, and characters in a file?

✅ Correct Answer: 1

Which command is used for saving and quitting the vi editor simultaneously?

✅ Correct Answer: 1

How can we escape to the UNIX shell without quitting vi editor?

✅ Correct Answer: 1

Which of the following files are known as special files in Unix?

✅ Correct Answer: 3

What is the output of the following Unix command? $ wc -c *.c

✅ Correct Answer: 2

In Unix, for what purpose bc command is used?

✅ Correct Answer: 4

Which process is immediately set up by the kernel when we log on to a Unix system?

✅ Correct Answer: 3

Which command shows some attributes of a process?

✅ Correct Answer: 2

Which of the following system call is used for creating a new process in Unix?

✅ Correct Answer: 4

Which Unix command is used for locating files?

✅ Correct Answer: 3

Which command is used for preparing a file for printing?

✅ Correct Answer: 1

Which command is used for sorting a file on specified fields?

✅ Correct Answer: 4

Which Unix command is used for locating repeated and non-repeated lines?

✅ Correct Answer: 3

Which command is used for translating characters?

✅ Correct Answer: 2

Which of the following command will be used for searching “director” in emp.lst?

✅ Correct Answer: 1

Which of the following command is used for searching for a pattern in one or more file(s)?

✅ Correct Answer: 2

Which of the following commands is known as stream editor?

✅ Correct Answer: 3

What is a shell script?

✅ Correct Answer: 2

To run the script, we should make it executable first by using _____

✅ Correct Answer: 3

Which command is used to find out the consumption of a specific directory?

✅ Correct Answer: 3

Which filter apart from perl, is the most powerful?

✅ Correct Answer: 1

Which filter apart from perl, is the most powerful?

✅ Correct Answer: 1

For running a Unix command within awk, we’ve to use ____ function.

✅ Correct Answer: 2

To extract specific columns from a file ____ command is used.

✅ Correct Answer: 1

Which of the following cannot be performed by cat command?

✅ Correct Answer: 2

What is the default delimiter used by the cut command for cutting fields?

✅ Correct Answer: 3

Which of the following is not an internal command used by mailx?

✅ Correct Answer: 3

Which command is used for printing the current working directory?

✅ Correct Answer: 3

Which command is used for changing the current directory?

✅ Correct Answer: 1

Which command is used for creating directories?

✅ Correct Answer: 2

Which command is used for creating directories?

✅ Correct Answer: 2

What does the following command do? $ mkdir dir dir/dir_01/dir_02

✅ Correct Answer: 1

Sometimes we are unable to create a directory because ______________

✅ Correct Answer: 4

Which command is used for removing an empty directory?

✅ Correct Answer: 2

If rmdir dir001 fails, what could be the reason(s)?

✅ Correct Answer: 4

Which of the following keys is used to replace a single character with new text?

✅ Correct Answer: 2

$ cp file_01 . copies the file named file_01 in ____ directory

✅ Correct Answer: 2

The output of the following command is __________ $ cp abd/ .user_06

✅ Correct Answer: 1

For moving two level up in the file hierarchy system using cd command once, we separates ( . . ) by which symbol?

✅ Correct Answer: 4

Which command is used for listing files in a directory?

✅ Correct Answer: 3

Which option is used with ls command for long listing of files with seven attributes?

✅ Correct Answer: 2