1. Execute and display the value of the system prompt environment variable PS1
echo $PS1 #显示提示符格式
2. Change the value of the user variable prompt
ls -a #查看
vi .bash_profile #修改
PS1="[\u@@@\h]****" #重新赋值
source .bash_profle #生效
vi editor
modified result
Executing the bash command will restore the original environment
After the test, I found that the bash command can only be restored temporarily. To restore it permanently, it is necessary to modify the PS1 back in the vi editor.