Ubuntu16 virtual machine installation and root user configuration

I used VMware installation

  1. Create a new virtual machine, select typical
    Insert picture description here
  2. Choose to install the operating system later
    Insert picture description here
  3. Select the corresponding version Ubuntu64 bit
    Insert picture description here
  4. Set the virtual machine name and hard disk location
    Insert picture description here
  5. The disk size is allocated according to the needs
    Insert picture description here
  6. Custom hardware
    Insert picture description here
  7. The hardware needs to be configured according to your needs (I will use it for development in the future, so I will give more)
    firstly the memory
    Insert picture description here
    and then the CPU (to be virtualized in the future, so I check the support for CPU virtualization) to
    Insert picture description here
    choose the ISO image to use File The
    Insert picture description here
    network connection is selected according to the needs (I chose the default NAT)
    Insert picture description here
    and other settings can be defaulted
  8. Complete the configuration
    Insert picture description here
  9. Start the virtual machine
    Insert picture description here
  10. Choose language, install Ubuntu
    Insert picture description here
  11. I don't want to check it, just continue
    Insert picture description here
  12. The installation type is selected by default (you can choose other if you want to partition by yourself)
    Insert picture description here
  13. Install now, continue
    Insert picture description here
  14. Time zone selection
    Insert picture description here
  15. Keyboard layout, default, continue
    Insert picture description here
  16. Set your own username and password
    Insert picture description here
  17. Then, wait for the installation (a long time)
    Insert picture description here
  18. Installation is complete, now restart
    Insert picture description here
  19. Just log in
    Insert picture description here

At this point the installation is over, the following is the configuration of the root user

root user configuration

  1. Open terminal
    Insert picture description here
  2. Set root user password
    sudo passwd root
    
    Insert picture description here
  3. Switch root user, enter the password to enter
    su root
    
    Insert picture description here
  4. Set root to boot
    sudo gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
    #添加以下内容后保存退出
    user-session=ubuntu
    greeter-show-manual-login=true
    all-guest=false
    
    Insert picture description here
  5. Modify the graphical interface login
    sudo gedit /root/.profile
    #将最后一行前面加上 tty -s &&
    
    Modify it to look like this, save and exit
    Insert picture description here
  6. Then restart
    sudo reboot
    
  7. Then you can log in as the root user
    Insert picture description here
  8. Landed successfully
    Insert picture description here

Guess you like

Origin blog.csdn.net/qq_39906884/article/details/89706090