Linux Foundation Certified System Administrator: What happens after issuing the command vi without any additional parameters?

Understanding the behavior of the vi command without additional parameters.

Question

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

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

D

The correct answer is D. When you issue the vi command without any additional parameters, vi starts in command mode and opens a new empty file. Command mode is the default mode for vi, and it allows you to enter commands to perform various operations on the file.

Here's what you can expect when you issue the vi command:

  1. You will see a blank screen with a tilde (~) character at the bottom left corner indicating that you are at the beginning of an empty file.
  2. The cursor will be in command mode, and you can begin typing commands to perform various operations.
  3. To switch to insert mode, you can press the i key, which will allow you to insert text into the file.
  4. To save the file and exit vi, you can press the Esc key to return to command mode, and then type :wq followed by Enter. This will write the file to disk and exit vi.

It's worth noting that vi is a powerful text editor that can be used for editing various types of files, including configuration files, scripts, and source code. With its wide range of features and commands, it's a popular choice for system administrators and developers working on Unix and Linux systems.