Home »
Aptitude Questions and Answers »
Linux Aptitude Questions and Answers
Linux VI Editor Aptitude Questions and Answers
Linux VI Editor Aptitude Questions and Answers: This section contains aptitude questions and answers on Linux VI Editor.
Submitted by Nidhi, on May 20, 2020
This section contains Aptitude Questions and Answers on Linux VI Editor.
1) There are the following statements that are given below, which of them are correct about vi the editor?
- The vi editor is also known as a Visual editor.
- The vi editor is used to create and edit text files.
- It is a very user-friendly editor and works on different distributions of Linux.
- vim is the improved version of the vi editor.
Options:
- A and B
- C and D
- A, B, and C
- A, B, C, and D
Correct answer: 4
A, B, C, and D
Statements A, B, C, and D are correct about the vi editor.
2) Which of the following mode(s) are used in the vi editor?
- Insert mode
- Command mode
- Both of the above
- None of the above
Correct answer: 3
Both of the above
Both insert mode and command mode are used in the vi editor.
3) In which year vi editor was developed?
- 1976
- 1980
- 1982
- 1988
Correct answer: 1
1976
The vi editor was developed in 1976.
4) Who was developed the vi editor?
- Bill joy
- James gosling
- Andy Bechtolseim
- Scott G. McNealy
Correct answer: 1
Bill joy
The vi editor was developed by Bill joy in 1976.
5) Which of the following command is used to "save and quit" from the vi editor?
- :q
- :Q
- :wq
- :q!
Correct answer: 3
:wq
The :wq command is used to save and quit from the vi editor.
6) Which of the following command is used to "quit with discarding changes" from the vi editor?
- :q
- :Q
- ZZ
- :q!
Correct answer: 4
:q!
The :q! command is used to save and quit from the vi editor.
7) "ZZ" command is also used to save and quit from the vi editor?
- Yes
- No
Correct answer: 1
Yes
Yes, the ZZ command is also used to save and quit from the vi editor.
8) Which of the following commands are used to switch from command mode to insert mode in the vi editor?
- i
- a
- o
- O
Options
- A and B
- A and C
- A, C, and D
- A, B, C, and D
Correct answer: 4
A, B, C, and D
All given commands are used to switch from command mode to insert mode in the vi editor.
9) Which of the following command is used to "start typing at the end of the current line" in the vi editor?
- A
- a
- o
- O
Correct answer: 1
A
The command A is used to start typing at the end of the current line in the vi editor.
10) Which of the following command is used to "move up" in the vi editor?
- I
- h
- j
- k
Correct answer: 4
k
The k command is used to "move up" in the vi editor.
11) Which of the following command is used to "move left" in vi editor?
- I
- h
- j
- k
Correct answer: 2
h
The h command is used to "move left" in the vi editor.
12) Which of the following command is used to "move to the last line" in the file?
- G
- K
- Dot (.)
- ``
Correct answer: 1
G
The G command is used to "move to the last line" in the file.
13) Which of the following command is used to "delete current line" from the file?
- dd
- r
- x
- X
Correct answer: 1
dd
The dd command is used to "delete the current line" from the file.
14) Which of the following command is used to "undo the last command" in the vi editor?
- uu
- x
- X
- u
Correct answer: 4
u
The u command is used to "undo the last command" in the vi editor.
15) Which of the following command is used to "copy a line" in the vi editor?
- CC
- cc
- YY
- yy
Correct answer: 4
yy
The yy command is used to "copy a line" in the vi editor.
16) Which of the following command is used to "swap two lines" in the vi editor?
- sl
- SL
- DDP
- ddp
Correct answer: 4
ddp
The ddp command is used to "swap two lines" in the vi editor.
17) Which of the following command is used to "delete till the end of the line" in the vi editor?
- $
- d$
- d0
- DD
Correct answer: 2
d$
The d$ command is used to "delete till the end of the line" in the vi editor.
18) Which of the following command is used to "move one word forward" in the vi editor?
- b
- ww
- w
- yw
Correct answer: 3
w
The w command is used to "move one word forward" in the vi editor.
19) Which of the following command is used to "forward search for given string" in the vi editor?
- ?string
- /string
- \string
- #string
Correct answer: 2
/string
The /string is used to "forward search for given string" in the vi editor.
20) Which of the following command is used to "copy one word" in vi editor?
- c
- w
- cw
- yw
Correct answer: 4
yw
The yw command is used to "copy one word" in the vi editor.
21) Which of the following command is used to "repeat the last command" in the vi editor?
- Dot (.)
- !
- @
- $
Correct answer: 1
Dot (.)
The . command is used to "repeat last command" in vi editor.
22) Which of the following command is used to "switch two characters" in vi editor?
- sc
- xp
- xc
- xx
Correct answer: 2
xp
The xp command is used to "switch two characters" in the vi editor.
23) Which of the following command is used to "replace the current character" in the vi editor?
- R
- rr
- r
- rc
Correct answer: 3
r
The r command is used to "replace the current character" in the vi editor.
24) Which of the following command is used to "delete the character before cursor" in the vi editor?
- X
- x
- D
- d
Correct answer: 1
X
The X command is used to "delete the character before cursor" in the vi editor.
25) Which of the following command is used to "paste before the current line" in the vi editor?
- y
- Y
- p
- P
Correct answer: 4
P
The P command is used to "paste before the current line" in the vi editor.