nerdexam
Linux_Foundation

LFCS · Question #857

What happens after issuing the command vi without any additional parameters?

The correct answer is D. vi starts in command mode and opens a new empty file. Invoking the vi editor without any arguments starts it in command mode, presenting an empty buffer for editing.

Submitted by jakub_pl· Apr 18, 2026Essential Commands

Question

What happens after issuing the command vi without any additional parameters?

Options

  • Avi starts and loads the last file used and moves the cursor to the position where vi was when it
  • Bvi starts and requires the user to explicitly either create a new or load an existing file.
  • Cvi exits with an error message as it cannot be invoked without a file name to operate on.
  • Dvi starts in command mode and opens a new empty file.
  • Evi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains

How the community answered

(35 responses)
  • A
    6% (2)
  • B
    3% (1)
  • D
    89% (31)
  • E
    3% (1)

Why each option

Invoking the `vi` editor without any arguments starts it in command mode, presenting an empty buffer for editing.

Avi starts and loads the last file used and moves the cursor to the position where vi was when it

`vi` does not automatically load the last used file or restore the cursor position upon an empty invocation; such behavior typically requires specific configurations or plugins.

Bvi starts and requires the user to explicitly either create a new or load an existing file.

`vi` does not explicitly prompt the user to create or load a file; it provides an empty buffer by default when no filename is given.

Cvi exits with an error message as it cannot be invoked without a file name to operate on.

`vi` does not exit with an error; it is designed to open an empty editing session when no file is specified.

Dvi starts in command mode and opens a new empty file.Correct

When `vi` is executed without any additional parameters, it opens a new, unnamed, and empty buffer, placing the user directly into command mode, ready for commands or text insertion.

Evi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains

While `vi` uses buffers, it does not automatically populate a new, empty file with the contents of a prior buffer upon startup without explicit commands.

Concept tested: vi editor startup behavior

Source: https://man7.org/linux/man-pages/man1/vi.1.html

Topics

#vi editor#command line editor#text editing#editor modes

Community Discussion

No community discussion yet for this question.

Full LFCS Practice