After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?

  

During Linux system operation, the terminal interface prompts -bash-2.05b$ after booting, which causes the terminal to be unable to display in color. How should I deal with this problem? The following small series will introduce you to the Linux terminal prompt -bash-2.05b$ solution, I hope to help you.

display interface surface Linux terminal when the first time now:

onejet20080605 (root) ~ $ "normal display"

terminal displays the next boot :

-bash-2.05b$ "The display is not normal"

And the color display of the terminal is gone.

Solution:

First, confirm your root directory (if you are using the root user to log in) have the following two files:

1, /root/.bashrc

2, /root/.bash_profile

Note that these two files are hidden files.

Second, if not, create these two files and add the following to these two files:

/root/.bashrcContent:

# .bashrc

# User specific aliases and functions

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

/root/.bash_profileContent:

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

. ~/.bashrc

fi

# User specific environment and startup programs

export BASH_ENV=$HOME/.bashrc

III, by the above two Look at the script, also related to the /etc/bashrc file, if not, it is also created, its contents are as follows:

/etc/bashrc content:

# /etc/bashrc

# System wide functions and aliases

# Environment stuff goes in /etc/profile

# Uncomment if you liked the old colourfull prompt

# PS1=&lsquo ;\\[\\033[1;33m\\]\\u\\[\\033[1;37m\\]@\\[\\033[1;32m\\]\\h\\[\\033[1;31m\\]\\w\\[ \\033[1;36m\\]\\$ \\[\\033[0m\\]’

PS1=‘\\[\\033[0;34m\\]\\h (\\[\\033[0; 31m\\]\\u\\[\\033[0;34m\\]) \\[\\033[0;32m\\]\\w $ \\[\\033[0m\\]’

VIM=“/Usr/share/vim”

alias ls=‘ls --color=tty -F -b -T 0’

After the above three steps will generally succeed, you only have to Open a terminal To see the effects. Of course, this is related to /etc/hosts, /etc/passwd, etc., but generally which of the above files are not or have gone wrong.

The above is a solution for the emergence of -bash-2.05b$ on Linux terminals. This problem may be related to the loss of /root/.bashrc, /root/.bash_profile and /etc/bashrc files. Recreate it.

Copyright © Windows knowledge All Rights Reserved