LinuxCentOS shell display-bash-4.1 $ solution for not displaying the user name path

Source: Internet
Author: User
In LinuxCentOS, shell displays-bash-4.1 $ solution to the problem where the user name path is not displayed: a new user is added under CentOS. after logon, the shell script information is as follows: instead of the username @ hostname combination we often see, it looks uncomfortable. Solution :... linux CentOS shell display-bash-4.1 $ solution to the problem where the path of the user name is not displayed: a new user is added under CentOS. after logging in, the shell script information is as follows: instead of the username @ hostname combination we often see, it looks uncomfortable. Solution: The cause of the problem is that the. bash_profile is not configured. you can configure this file to solve the problem. 1. enter [plain] vi ~ in Terminal ~ /. Bash_profile 2. if there is no. bash_profile, you can add it yourself. Then add the following content to the file: [plain] export PS1 = '[\ u @ \ h \ W] \ $' Note 'is a character in English. 3. enter the following command to make the change take effect: [plain] source ~ /. Bash_profile. in this way, the shell will display the familiar username @ hostname format, for example:
Related Article

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.