The SuperUser

If Linux gives you an error message "Permission denied", then in all likelihood you need to be "root" to execute the command or edit the file, etc. You don't have to log out and then log back in as "root" todo this. Just use thesucommand to give yourself root powers (assuming you know root’s password).

su -

Then enter the password when prompted. You now have root

privileges (the system prompt will reflect this). Note that the "-" aftersuallows Linux to apply root's environment (including root’s path) to yoursulogin. So you don't have to enter the full path of a command. Actually,suis a “switch user” command, and can allow you to become any user (if you know the password), not just root.

When you are finished using yoursulogin, return to your own self by typingexit.

A word of caution: Be VERY judicious in your use of the root login. It can be destructive. For simple tasks that require root permission, usesuand use it sparingly.

results matching ""

    No results matching ""