Linux under Shell display-bash-4.1 does not show path resolution

Source: Internet
Author: User

1, Reason analysis:

No. Bash_profile This file can be displayed by configuring this file recovery path.

2. Configuration steps:

(1), Vim ~/.bash_profile Add the following command here:

Export ps1= ' [\[email protected]\h \w]\$ '

(2), after saving to execute the source ~/.bash_profile

Configuration is complete.

3. Explanation/etc/profile ~/.bash_profile ~/.profile

First, when you log in to Linux, start the/etc/profile file, and then start the ~/.bash_profile, ~/.bash_login, or ~/.profile in the user directory.

Order of execution: ~/.bash_profile--->~/.bash_login--->~/.profile

If ~/.bash_profile exists, ~/.BASHRC--->/ETC/BASHRC--->~/.bash_logout are also executed.

(1)/etc/profile: This file system sets the environment information for each user, and when the user first logs on, the file is executed and the shell's settings are collected from the configuration file of the/ETC/PROFILE.D directory

(2)/ETC/BASHRC: This file is executed for each user running the bash shell and is read when the bash shell is opened.

(3) ~/.bash_profile: Each user can use this file to enter the shell information dedicated to their own use, when the user logs on, the file is only executed once.

(4) ~/.BASHRC: This file contains bash information dedicated to your bash shell, which will be read when you log in and every time you open a new shell

(5) ~/.bash_logout: Executes the file each time you exit the system.

Linux under Shell display-bash-4.1 does not show path resolution

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.