Linux Basics: Working with the vi editor

Опубликовано: 20 Ноябрь 2024
на канале: The Tech Team
598
2

Command: vi file
Working example: vi test.txt

This will bring up the vi editor, however I will need to press "i" to enter into insert mode.

Once in insert mode, press "esc" to exit the mode and the ":" to bring up your command line, you then need to tell vi what you want to do.

:w - write your file
:q - quit the file
:wq - write the file and then quit
:q! - I know I have changes but I don't want to save, force it to quit

More tutorials at https://www.barberriley.com