VIM is a free and open-source text editor program. Listed here most used commands. Knowing these commands will be helpful for your daily bases Linux jobs
Install VIM on Ubuntu Linux
✅ sudo apt install vim
Verify installation
✅ vim – -version
Edit file with VIM
✅ vim filename
Switch to insert mode
✅ press i
Switch back to command mode
✅ press esc
Save and exist from the file
✅ :wq!
Exit without saving(force exit)
✅ :q!
Undo changes
✅ press u
Redo changes
✅ ctrl+r
Move cursor at first line of the file
✅ gg
Move cursor at last line of the file
✅ G
Copy line
✅ yy
Copy n lines
✅ n yy
Paste
✅ p
Delete line
✅ dd
Delete n lines
✅ n dd
Set line numbers in the file
✅ :se nu
To replace all the matching word in the file
✅ :s/searchword/replaceword/g
To search word in the file
✅ :/searchword
#aws #linux #devops #cloud #learner