Several common configuration files in Bash

Source: Internet
Author: User

Several common configuration files in Bash

Login shells reads the following Startup file:

File

Content

/Etc/profile Global configuration files open to all users
~ /. Bash_profile A user's personal Startup file can be used as a personal global setting
~ /. Bash_login If~ /. Bash_profileBash tries to read the script if it cannot be found.
~ /. Profile If the two files~ /. Bash_profile, ~ /. Bash_loginBash reads this file. This is the default file.

NOTE:

 

  • Export PATH = $ PATH: directory # only change the current bash environment configuration. The next logon is invalid.
  • Source. bash_profile # change the global variable and use source to make it take effect.
  • . Bash_logout # The operations performed by the script, such as clearing, when exiting

 

Non-login shell reads the following files:

File

Content

/Etc/bash. bashrc Global configuration files open to all users
~ /. Bashrc A user's personal Startup file can be used as a personal global setting

You can see the. bash_profile script content:

 

# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then. ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATH

Bash script 15-minute advanced tutorial

Job control instances of Bash and KSH shell in 10 Linux/Unix

Abnormal shell script running in Ubuntu: difference between Bash and dash

Bash script for statement if statement and various test statements

What is the Bash Shell build in command?

This article permanently updates the link address:

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.