欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

how to become a superuser on Linux Ubuntu

程序员文章站 2022-05-31 21:57:17
...

If you login with your common user,but after a while you want to change the shell to superuser.you can do like this

sudo -s

then provide your password
After successful login in,the $ prompt would change to # to indicate that you logged in as root user on Ubuntu

also there are many other commands.Let me introduce them in detail
1:
whoami can let user verify the identities

whoami

2:
you can also use this command to login as root on Ubuntu

sudo -i 

then type your password and you will find that your shell prompt change from $ to #
3
If you want to exit from your sudo session of root user,type any one of the following exit command or logout command

logout
exit