First, modify the default boot interface
Most users now default to the graphical interface, but this misses a good time to learn about the server startup process. We can go back to the command line interface with the relevant commands
Init 2 back to character interface
If you want to enter the command line interface by default, you need to edit the /etc/inittab file and modify the * in the id:*:initdefault field.
Let's look at the contents of the/etc/inittab file first:
Cat/etc/inittab
The contents are as follows:
The meaning of each number in the figure:
0: Turn off the machine
1: Single-user form, only root for maintenance
2: Multi-user, cannot use net file system
3: Full multi-user
4: Safe Mode
5: Graphical
6: restart
Modify I D:*:initdefault * For the specified number, start the default entry to the specified run state, for example id:5:initdefault enters the graphical interface by default.
Second, modify the command line prompt
The command prompt is in the format environment variable PS1 , modify PS1, command prompt changes
However, this modification does not take effect permanently, when we need to modify the ~/.BASHRC file to export ps1= "custom format" add to this file
Linux Learning-boot interface and command prompt