Linux Commands Helper
💬 Your AI-powered Linux assistant
vi Command - Text Editor
The vi command opens the vi text editor to create and modify text files directly in the terminal.
Syntax
vi [options] [file]
Examples
vi file.txt
Open or create file.txt in vi editor.
vi +10 file.txt
Open file.txt and position the cursor at line 10.
Notes
- vi has multiple modes: normal mode, insert mode, and command mode.
- Common keys:
i
(insert mode),Esc
(exit to normal mode),:w
(save),:q
(quit). - vim is an enhanced version of vi with additional features.