Skip to content

Instantly share code, notes, and snippets.

@AtulKhanduri
Last active May 14, 2016 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AtulKhanduri/5bfa0a096516bcdc57cba9e3a0b689e6 to your computer and use it in GitHub Desktop.
Save AtulKhanduri/5bfa0a096516bcdc57cba9e3a0b689e6 to your computer and use it in GitHub Desktop.
Linux Commands

Run commands as super user

By default root account is locked under Ubuntu Linux. Therefore, you cannot login as root or use su - command to become a superuser.

You can use below methods to run commands as Adminintrator:

Add sudo before each command

Avoid typing sudo each and every time

sudo -i => This will start /bin/bash as a root shell so that you can enter a root user command without using sudo command.

Login as root user

sudo bash or sudo -s

Change root user password

sudo passwd root => Give new password to root and use su - command to enter in root shell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment