vim root permission :w !sudo tee %

/etc consists of all configurations files so to edit the files under /etc you need the superuser permissions but sometime we forget to use sudo. but at that time we can also use
:w !sudo tee %
then enter your administrator password
:q!
to exit successfully

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

15 managing disk - understanding /etc/fstab xfs_admin mount -o rw,remount /