32. Bash Shell - load files at startup

The opening words

Bash startup configuration file can help us pre-loaded files and other scripts preset common and necessary variables.
Bash provides two types of boot files, a class is loaded when you log on, the other non-landing loads.
 

Log in Shell Startup Files

Log files loaded at startup are:

Global startup file

cat /etc/profile    # 全局启动文件,Debian(Ubuntu) 以及 Redhat(CentOS) 分发版

Print out the part of CentOS 7 distribution / etc / profile file
Part of print distribution Ubuntu 18 / etc / profile file

User-specific startup file

cat ~/.bash_profile    # RedHat(CentOS)分发版

Print CentOS 7 distribution ~ / .bash_profile part of the contents of the file

cat ~/.profile    # Debian(Ubuntu) 分发版

Print distribution Ubuntu 18 ~ / .profile part of the contents of the file

cat ~/.bash_login    # Debian(Ubuntu) 以及 RedHat(CentOS) 分发版

 

Non-landed Shell Startup Files

Boot files will be loaded when the user enters Bash Shell:

cat /etc/bashrc    # Redhat(CentOS) 分发版

Part of print CentOS 7 distribution / etc / bashrc file

cat ~/.bashrc    # Debian(Ubuntu) 与 RedHat(CentOS) 分发版

Part of print distribution CentOS 7 ~ / .bashrc file
Print distribution Ubuntu 18 ~ / .bashrc part of the contents of the file
 

I wrote the English version

32. Bash Shell - Startup Files
 

Quote

See also

Want to see the other contents of the manual? Visit the column belongs manual: " Linux Administrator's Guide: both simple and profound ."

Published 103 original articles · won praise 6 · views 5053

Guess you like

Origin blog.csdn.net/stevenchen1989/article/details/104121079