Posts

Showing posts with the label Sudo

Running Linux Su and Sudo Commands to Work As Root and Viewing the Linux Root User Home Directory

Example of Using the Linux su Command Run the Linux su command with the dash option, as in “su -” (but not quotes). Then type in the password for the root user and press Enter. If you’re using Ubuntu, see the alternate steps below. Now type in the pwd command and press Enter to see your “path to (current) working directory”. If the su (superuser) command above worked, you should see the directory path of /root which indicates that you are now working as the root user at the Linux command line. Type in exit and press Enter to go back to working as a “regular” user. Example of Using the Linux sudo Command If you’re using Ubuntu or a variation, such as Kubuntu or Edubuntu, then run “sudo -i” (again, without the quotation marks) to start working at the command line prompt as the root user. You will need to type in the password of the first Linux user created on your system (during installation) and press Enter after running the sud...