1, Reason analysis:
No. Bash_profile This file can be displayed by configuring this file recovery path.
2. Configuration steps:
(1), Vim ~/.bash_profile Add the following command here:
Export ps1= ' [\[email protected]\h \w]\$ '
(2), after saving to execute the source ~/.bash_profile
Configuration is complete.
3. Explanation/etc/profile ~/.bash_profile ~/.profile
First, when you log in to Linux, start the/etc/profile file, and then start the ~/.bash_profile, ~/.bash_login, or ~/.profile in the user directory.
Order of execution: ~/.bash_profile--->~/.bash_login--->~/.profile
If ~/.bash_profile exists, ~/.BASHRC--->/ETC/BASHRC--->~/.bash_logout are also executed.
(1)/etc/profile: This file system sets the environment information for each user, and when the user first logs on, the file is executed and the shell's settings are collected from the configuration file of the/ETC/PROFILE.D directory
(2)/ETC/BASHRC: This file is executed for each user running the bash shell and is read when the bash shell is opened.
(3) ~/.bash_profile: Each user can use this file to enter the shell information dedicated to their own use, when the user logs on, the file is only executed once.
(4) ~/.BASHRC: This file contains bash information dedicated to your bash shell, which will be read when you log in and every time you open a new shell
(5) ~/.bash_logout: Executes the file each time you exit the system.
Linux under Shell display-bash-4.1 does not show path resolution