Knowing Vi Editor commands allows Linux/Unix engineers to efficiently edit configuration files, scripts, text-based files in a terminal environment
Shahjahan Ali
Infra & Cloud Engineer @ Miimansa || Linux || AWS cloud || VMware || LDAP|| Docker || Ansible || Ex-HCL
Vi is a standard command-line text editor for Linux and Unix that allows users to create, edit, and manage text files. The vi editor is elaborated as visual editor. It is installed in every Unix system. In other words, it is available in all Linux distros. It is user-friendly and works same on different distros and platforms. It is a very powerful application. An improved version of vi editor is vim.
The Vi editor has two modes:
#Note: If you are not sure which mode you are in, press Esc key twice and you'll be in command mode.
vi syntax:
$ vi filename.txt
Mode change:
To save and quit:
Navigation:
Advanced commands enhance editing efficiency:
Copying and Pasting:
领英推荐
Deleting Text:
Undo and Redo:
u — Undo.
Search and Replace:
Other Vi shortcuts:
Knowing these vi commands allows Linux/Unix and DevOps engineers to efficiently edit configuration files, scripts, and other text-based files in a terminal environment.
If you like this article, please hit like and comment's.