Centos editing interface and GUI logon Switch Settings
Enter the command vi/etc/inittab.
Change 5 to 3 in the last row.
Save and exit.
Meanings of numbers:
#0-halt (donotsetinitdefadefatothis) Stop (no initdefault)
# 1-Singleusermode single-user mode
# 2-Multiuser, withoutNFS (Thesameas3, ifyoudonothavenetworking) multiple users without NFS (equivalent to 3 if you do not have a network)
# 3-Fullmultiusermode full multi-user mode
#4-unused idle
#5-X11 graphic interface
# 6-reboot (donotsetinitdefadefatothis) Restart (no initdefault)
Id: 5: initdefault: ---- modify the parameters here
Basic operations of vi
A) Go to vi
After the system prompts you to enter the vi and file name, you will be taken to the vi full screen editing screen:
$ Vi myfile
Note that after entering vi, you are in command mode. You must switch to Insert mode to Enter text. People who use vi for the first time will want to move the cursor first with the upper and lower right keys. As a result, the computer keeps beeping and getting angry with themselves. So after entering vi, do not tamper with the mouse, switch to "Insert mode!
B) switch to Insert mode to edit the file
Click "I" under "command mode" to enter "Insert mode". Then, you can enter the text.
C) Insert switchover
You are currently in "Insert mode", and you can only enter text all the time. If you find that you have entered an error! To move the word back with the light mark key, you must first Press ESC to switch to command mode and then delete the text.
D) Exit vi and save the file
Under "command mode", click ":" colon to enter "Last line mode". For example:
: W filename (enter "w filename" to save the article with the specified filename)
: Wq (enter "wq" to save the disk and exit vi)
: Q! (Enter q !, Force exit vi without saving the disk)