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

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all