When I was in a school, I can edit a text file very easily on Sun Microsystems Unix/Solaris:
pico index.htmlOr
vi index.htmlBut I couldn't edit a text file using the same command using my home built Linux.
Until someday someone told me the Linux sudo command. Sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy.
For example, to edit a text with superuser privilege, add sudo to the front:
sudo pico index.htmlOr
sudo gedit index.htmlWhen a user type sudo command, Linux will prompt for sudo password for the first time and no need to input the password every time. That saves a lot of time and effort instead.
My practical method is in case of I cannot edit or delete a file because of insufficient privilege, I will add the sudo prefix.
No comments:
Post a Comment