Linux are two ways to enter root mode

  First open terminal (Ctrl + Alt + T)

 

   Here to explain bwj @ ubuntu: ~ $ meaning of this sentence:

bwj a username, that is, from your own name. 

@ Symbol is divided 

ubuntu is the host name, which is the name of the machine you are using

 - is the current directory, " ~ " represents the root directory 

$ is a prompt when entering root, will become #

  Now introduces the first method: sudo (temporary)

  

  After entering the instruction may display sudo input

sudo 
 - b: executing instructions in the background
 - H: Help
 - H: the HOME environment variable to the new identity of the HOME environment variable
 - k: the end of the password expiration date, you need to enter a password that is executed next time sudo
 - L: Column at present the user with an executable instruction can not be executed
 - the p-: ask to change the password prompt
 -s <shell> : Executes the specified shell
 -u <user> : to specify the user as a new identity
 - v: to extend the validity of the password 5 minutes
 -V: display version information

 

  Here we enter the sudo -i, then enter your user password, it will enter the root mode.

  However, this method lasts only five minutes, I want to use sudo -v extension of time may be extended for a further five minutes.

  The second method: root (non-transitory)

  Enter sudo passwd root (note the spelling passwd), then enter the user's password, then let you set the root password, and confirm again.

   

 

   Then enter su, then just set the root password to get into the root.

 

   After the exit you want to enter the exit.

Guess you like

Origin www.cnblogs.com/bwjblogs/p/11795917.html