1. creat newfile sudo vim newfile
read file sudo vim filename(if this file is not exist,creat a new one) and no houzhuiming
sudo vim /etc/passwd system account
2.change the owner of file
sudo chown user file
sudo chown root newfile
exit
3. editing and navigatating
insert: 'a'
get out insert moden: 'esc'
find sth,seach: :/ *max* notice space max means what are you looking for
:/ ?
hit 'n' : go to the next search
4. command in vim
open file: :e file
colse file :q! (no change,no save)
:wq (save and close) back to system ,quit vim
:w filename (save as another file)