The following explanations are found in the online Help file that you see Using the Manbash command:
. bashrc-the individual Per-interactive-shell startupfile. This file mainly saves personal personalization settings, such as command aliases, paths, and so on. Here's an example: # User specific Aliasesand functionspath= "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" LANG =zh_cn. Gbkexport PATH LANG alias rm= ' rm-i ' Alias ls= '/bin/ls-f--color= Tty--show-control-chars ' example defines a path, a language, a command alias (always with the-I parameter when using the RM Delete command) and a color display when using the LS command to list the files. After each modification. BASHRC, use SOURCE~/.BASHRC (or. ~/.BASHRC) can immediately load the modified settings to make it effective.
The. BASHRC is typically called explicitly in the. bash_profile file. When you log on to Linux to start bash, you first read the ~/.bash_profile file, so that the ~/.BASHRC is executed, and your personalization settings are in effect.
It is now assumed that the a.sh file under the/home/heaventian/path is set to an executable file.
To add a command to another file:
SH a.sh
can also run the command. You only need to make the following settings:
VI ~/.BASHRC
Add the following statement inside:
Path= $PATH:/home/heaventian/
Save the file
And then
source. BASHRC
We can do it.