bash how to edit file code example
Example 1: linux edit file
sudo nano filename.ext
Example 2: edit file terminal
vim filename.txt
//press i to enter insert mode
//press esc to exit insert mode
type :wq then enter to leave vim
sudo nano filename.ext
vim filename.txt
//press i to enter insert mode
//press esc to exit insert mode
type :wq then enter to leave vim