LoginSignup
0
0

More than 3 years have passed since last update.

Linux系统中切换到root用户的方法

Posted at

使用root权限执行命令

$ sudo [命令]

临时进入root用户

& sudo -i
输入当前用户的密码即可进入root用户

永久切换到root用户

首先需要重置root用户密码

$ sudo password root

切换到root用户

$ su
输入root用户密码

退出root用户

# exit

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0