Linux Foundation Certified System Administrator (LFCS) — Question 20
What is the difference between the i and a commands of the vi editor?
Answer options
- A. i (interactive) requires the user to explicitly switch between vi modes whereas a (automatic) switches modes automatically.
- B. i (insert) inserts text before the current cursor position whereas a (append) inserts text after the cursor.
- C. i (independent rows) starts every new line at the first character whereas a (aligned rows) keeps the indentation of the previous line.
- D. i (interrupt) temporarily suspends editing of a file to the background whereas a (abort) terminates editing.
Correct answer: B
Explanation
The correct answer is B because the i command is used to insert text before the cursor, while the a command is used to append text after the cursor. The other options describe incorrect functionalities or terms that do not accurately represent the vi editor commands.