1. Create a new user:
Step1: Add a new user
useradd -r -m -s /bin/bash username
Step2: Configure new user password
passwd username
Step3: Add ROOT permission to the newly added user
vim /etc/sudoers
and then add:
username ALL=(ALL:ALL) ALL
In addition, if you add a user directly with useradd, there may be no folder under home, and the shell cannot Display of autocompletion. If this problem occurs, just modify /bin/sh under /etc/passwd to /bin/bash.
2. Enter the UBUNTU graphical interface
Modify /etc/X11/default-display-manager
If the value is /usr/sbin/gdm, (ubuntu12.04 is /usr/sbin/lightdm), enter the graphical interface If the value is false, enter the console (command line mode ).
If you want to enter the graphical interface from the console, you can enter the command sudo gdm or sudo startx on the console.
If you want to enter the console from the graphical interface, you can enter the command sudo init 1 on the terminal, but it doesn't seem to work.
Insert a little knowledge: XDM is "X Display Manager", which starts the X Window server and manages the login, session, and window manager (KDE, Gnome)
of the graphical client program .
KDE and Gnome also provide their own implementations of xdm, called kdm and gdm respectively.
Edit the grub boot menu and do the following
command:
sudo gedit /etc/default/grub
find this line
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and
change it to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"
Enter the command:
sudo update-grub
automatically after booting Enter tty1.
Press CTRL+ALT+F1~6 to switch from the desktop environment to the character interface
Press CTRL+ALT+F7 to switch from the character interface environment to the desktop environment.