Linux command line basis

1. For global configuration file and user profile awareness

Are stored in global configuration etc directory such as / etc / profile file, / etc / bashrc .sh files and files in the directory /etc/profile.d/

User configurations are stored in the user's home directory, .bashrc and .bash_profile files as root user, these two files are hidden, and .bash_profile by calling bashrc file, you can use the source .bashrc so that changes take effect immediately

2. For interactive and non-interactive shell and shell understanding, saying that white is a shell to interact with us, such as when we want to enter a user login, and then shell called us to enter a password. Non-interactive shell script is executed directly

Interactive login shell profile execution order of / etc / profile -> /etc/profile.d/*.sh -> ~ / .bash_profile -> ~ / .bashrc -> / etc / bashrc

Non-interactive sequence landings ~ / .bashrc -> / etc / bashrc -> /etc/profile.d/*.sh

 

2. / is the root directory, ~ is the home directory Indicates the directory itself, cd ~ / cd ~ and effect in expressing return to the current user's home directory, use the pwd command to view the current path

Guess you like

Origin www.cnblogs.com/romin/p/11297642.html