Home > Article > Operation and Maintenance > How to enter root privileges in Linux
How to enter root permissions in Linux: First use "Ctrl Alt T" to open the terminal and execute the "sudo passwd root" command; then enter the user password and set the root password; finally execute the "su" command and enter the command you just set The root password is enough.
#The operating environment of this tutorial: centos7 system, thinkpad t480 computer.
First open the terminal (Ctrl Alt T)
Here is the meaning of bwj@ubuntu:~$:
bwj is the user name, which is the name you gave yourself.
@ is the dividing symbol ubuntu is the host name, which is the name of the machine you are using ~ is the current directory,
"~" indicates the root directory
$ is the prompt. When entering root, it will become
#Enter sudo passwd root
(note the spelling of passwd), then enter the user password, and then Lets you set the root password and confirm again.
Next enter su
, and then enter the root password you just set to enter root.
# If you want to exit, just enter exit.
(Recommended learning: linux tutorial)
The above is the detailed content of How to enter root privileges in Linux. For more information, please follow other related articles on the PHP Chinese website!