vi
Editor¶
View a file¶
- Open a file:
vi <file name>
- Close the file by typing
:q
and pressENTER
Edit/Create a file¶
- Open or create a file:
vi <file name>
- Press
i
to activate the insert mode - Navigate to the right location using the arrow keys:
←
↑
→
↓
-
Modify or add some content
Note
Use
Ctrl
Shift
+c
andCtrl
Shift
+v
for copy/paste content in thevi
editor`. -
Press
ESC
to exit the insert mode - Store and close the file by typing
:wq
and pressENTER