Updated: by Computer HopeOn every system, the account is a special that has rights. As root (or with root ) is necessary for many tasks. If you need to perform tasks as the root user, make sure that you fully understand the commands you are running, and what consequences they have. A single careless or malformed command, run as root, can make the entire unusable. Do your research, and always double-check every command before pressing Enter.
Logging in as rootThe root account is similar to any other account in that it has a ('root') and a. If you know root's password, you can use it to log into the root account from the.There is a special command named (for 'super user,' or 'switch user'), that allows you to temporarily run commands as the root account.
From the command line, type: suEnter the password once prompted for the password. If successful, you are switched to the root user, and can run commands with full system privileges.Be careful while logged in as root; it is easy to forget that you are currently the root user, and you might inadvertently run a command thinking you are only a mere mortal. One way to remind yourself if you are root or not is to check your. Many systems end their command prompt with a dollar sign (' $') if you are logged in as a normal user, but with a pound sign (' #') if you are root.Or, you can use the command to determine the account you are using.When finished with your administrative tasks, you can run the or logout command to return to your standard user account.When logging in as root, it is often useful to use a single dash after the su command, like this: su -This command simulates a complete root login. It executes all of the root user's initialization and sets all as if the root user were logged into a fresh shell session.
Register Now To Root Your Device. Rooting lets you take full advantage of your phone or tablet. With just simple steps, you can block advertisements, remove bloatware.
Depending on what task you need to perform, and how the root account is configured, this form of the su command might be optimal for you. Running commands as root without the root passwordIt is possible, and often preferable, to run commands as root without logging into the root account by using the command, which stands for 'superuser do'. If you prefix a command with sudo, you are prompted for your password (not the root password), and your name is checked against a special file called sudoers. If your account is listed there, your command will be run with root privileges.Using sudo makes it much more difficult to forget that you are root since you are not logged into the root account, and are never going to forget to log out. Also, typing sudo every time you run a potentially destructive command reminds you to be extra careful and double check yourself.If you need to add a user to the sudoers list, you should use the command that requires root privileges to run, and allow you to safely edit the sensitive sudoers file.