Several possible causes:
1 The user's home directory belongs to a group that has been renamed Root, and the solution uses root to perform Cd/home/;chown username:username username
2 The user's home directory was modified, this time if you want to modify the user's home directory, first switch to the root user, directly modify the/etc/passwd file, find your user name that line, modify it, but after the change to enter the system again when the user name may display-bash-4.1$, Here's how to fix it:
3 users have fewer home directories. Bash_profile and. BASHRC
The path is not shown in the Linux shell, and it is inconvenient to use it as a-bash-4.1#.
How do I change the shell to show the path?
The steps are as follows:
Vim ~/.bash_profile
(No tube. Bash_profile This file has a few, you can create a new one is also possible)
At the end add
Export ps1= ' [\[email protected]\h \w]\$ '
And then execute
SOURCE ~/.bash_profile
This way the shell can display the path.
Turn: Linux under Shell display-bash-4.1# does not show path resolution