How do I become superuser on Ubuntu Linux using su/sudo?

| 0 Comments| | 05:34
Categories:

To become root user type:

sudo -i    (same as sudo su -)

OR

sudo -s    (same as sudo su)

The -i option tells sudo to run the shell specified by the root user’s password database entry as a login shell. If you pass the -s to the sudo command, it runs the shell specified by the SHELL environment variable if it exists or the shell defined by the invoking user’s password database entry.

To exit from sudo session of root user, type any one of the following command:

# logout    (only ① works)

OR

# exit

ref: How do I become superuser on Ubuntu Linux using su/sudo?

Leave a Reply

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *