Linux Command prompt appears-- the solution of bash-4.2#
One day last week, when the configuration entered the Linux system, the system command prompt suddenly became a message of # bash-4.2# instead of a message of root hostname + path. I didn't know why this happened for a long time. Later, after looking up a lot of information on the Internet, I finally solved this problem because several configuration files of root under / root were lost. That's why root users become bash-4.2#, and the missing files are-- 1. Bash _ profile,2. Bashrc these files are necessary for every user.
Cp / etc/skel/.bashrc / root/
Cp / etc/skel/.bash_profile / root/
Use one of the two commands above to re-copy a copy to the / root directory, then log out of the root user, and log in again to return to normal.