Linux terminal appears "-bash-2.05b $" SOLUTION

Source: Internet
Author: User

In Linux, the display interface of the terminal is displayed at the first time:
Onejet20080605 (root )~ $ <Display normal>
However, when you start the system the next time, it becomes like this:
-Bash-2.05b $ <display abnormal>
In addition, the color display of the terminal is gone. It's really depressing. It doesn't matter. Now there is a solution:

1. First, check that your root directory (if you are using a root user to log on) has the following two files:
1./root/. bashrc
2./root/. bash_profile
Note that these two files are hidden.
 
2. If not, create these two files and add the following content to these two files:
/Root/. bashrc content:
#. Bashrc
# User specific aliases and functions
# Source global definitions
If [-f/etc/bashrc]; then
./Etc/bashrc
Fi
/Root/. bash_profile content:
#. Bash_profile
# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi
# User specific environment and startup programs
Export BASH_ENV = $ HOME/. bashrc

3. The two scripts above are also related to the/etc/bashrc file. If not, create the file 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 = '\ [\ 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'

As for what it means, I am not sure what PS1 means. I think it will help you. Let's talk about it :-)
Generally, the above three steps will succeed. You only need to reopen a terminal to see the effect. Of course, this is also related to/etc/hosts,/etc/passwd and other files, but it is generally the file above which has no or has an error.

Linux terminal command -- display file content

Command for playing music on the Linux terminal command line

Ubuntu Linux terminal beautification

Makes Linux terminals more convenient to use

Linux terminal color font

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.