Linux在终端里面切换root用户

Linux在终端里面切换root用户

记录一个小知识点,如何在Linux的Terminal中切换root用户:

命令: su -

输入上述命令,回车根据提示输入root用户的密码。

[ryan@red-hat-enterprise-linux ~]$ su -
Password: 
[root@red-hat-enterprise-linux ~]# 
[root@red-hat-enterprise-linux ~]# 
//输入exit退出root用户
[root@red-hat-enterprise-linux ~]# exit
logout
[ryan@red-hat-enterprise-linux ~]$ 
原文地址:https://www.cnblogs.com/lzhryan/p/10714059.html