Explore topic-wise MCQs in Unix.

This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

Which command is used to abort the editing and quit the editing mode?

A. :w
B. :wq
C. :q
D. ‘:x’
Answer» D. ‘:x’
2.

Which one of the following is the best way of saving and quitting the editor?

A. ZZ
B. :wq
C. :w
D. ‘:x’
Answer» B. :wq
3.

Which of the following command is a substitute for ‘:x’ command?

A. ‘:x’
B. :wq
C. :q
D. :w
Answer» C. :q
4.

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

A. :q
B. :w
C. ‘:x’
D. :f
Answer» D. :f
5.

We can specify the filename with ‘:w’ command.

A. True
B. False
Answer» B. False
6.

After pressing ‘:w’, we can normally resume our editing work.

A. True
B. False
Answer» B. False
7.

To save a file and remain in vi editor, which one of the following command will be used?

A. :w
B. ‘:x’
C. :q
D. :a
Answer» B. ‘:x’
8.

To save a file and return to shell prompt, which one of the following command will be used in ex-mode?

A. :w
B. ‘:x’
C. :a
D. :f
Answer» C. :a
9.

Pressing ‘:’ in command mode invokes which mode of vi editor?

A. ex-mode
B. insert mode
C. command mode
D. input mode
Answer» B. insert mode
10.

To save the editing performed on a file, we have to switch to ______ mode

A. command
B. input
C. ex
D. insert
Answer» D. insert