The settings of the root user when the ubuntu system logs in for the first time

overview

This document mainly describes the first-time user settings Ubuntuafter the system is installed and logged in as a common user . rootIncluding switching to rootuser, setting rootuser password, etc.

system version

Ubuntu 20.04

switch to root user

1. Using sudo sucommands

 sudo su

At this point, the system prompts you to enter the password of the current user, and you can switch to rootthe user after entering it.

2. Set rootuser password

 sudo passwd root

At this time, enter the user password that needs to be set root, and then enter it again to confirm.

3. Switch to rootuser

 su root

At this time, enter rootthe user password to switch to rootthe user.

Guess you like

Origin blog.csdn.net/LJX_ahut/article/details/131315255