The role of the./bashrc file under the directory

Source: Internet
Author: User

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.

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.