1. Which one of the following statement is not true?
a) vim editor is the improved version of vi editor
b) vi editor commands are not case sensitive
c) vi editor has two modes of operation: command mode and insert mode
d) vi stands for visual editor
View Answer
Explanation: None.
2. Which command is used to close the vi editor?
a) q
b) wq
c) both q and wq
d) none of the mentioned
View Answer
Explanation: The command ‘q’ just closes the file and ‘wq’ saves and closes the file.
3. In vi editor, the key combination CTRL+f
a) moves screen down one page
b) moves screen up one page
c) moves screen up one line
d) moves screen down one line
View Answer
Explanation: None.
4. Which vi editor command copies the current line of the file?
a) yy
b) yw
c) yc
d) none of the mentioned
View Answer
Explanation: The command ‘p’ puts the copied text after the cursor.
5. Which command is used to delete the character before the cursor location in vi editor?
a) X
b) x
c) D
d) d
View Answer
Explanation: The command ‘x’ is used to delete the character under the cursor locarion.
6. Which one of the following statement is true?
a) autoindentation is not possible in vi editor
b) autoindentation can be set using the command ‘:set ai’
c) autoindentation can be set using the command ‘:set noai’
d) autoindentation is set by default in vi editor
View Answer
Explanation: None.
7. Which command searches the string in file opened in vi editor?
a) / or ?
b) f or F
c) t or T
d) none of the mentioned
View Answer
Explanation: The command ‘/’ searches downward in the file and command ‘?’ searches upward in the file.
8. In vi editor, which command reads the content of another file?
a) read
b) r
c) ex
d) none of the mentioned
View Answer
Explanation: None.
9. Which command shows all the abbreviations in vi editor?
a) ab
b) abb
c) show
d) none of the mentioned
View Answer
Explanation: None.
10. Which command sets the number for all lines?
a) :set li
b) :set ln
c) :set nu
d) :set nl
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – Linux Administration & Programming.
Here’s the list of Best Books in Linux Commands & Shell Programming.
Here’s the list of Best Books in Linux Kernel, Device-Drivers & System Programming.
To practice all questions on Linux Administration & Programming, here is complete set of 1000+ Multiple Choice Questions and Answers on Linux.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Check Information Technology Books
- Check Linux Books
- Apply for Programming Internship
- Practice Programming MCQs