About the MAC. bashrc file Configuration

Source: Internet
Author: User

Before some of the bash operating habits on the server wanted to keep on the Mac, like the command to log on to the server on a springboard, I saved the command on the server so that I could log in to the server after a short command type.

For example, in the. bashrc file to add the following, the script login.sh is written by their own landing script. The script will differentiate the landing environment according to the input parameters. Then select the landing machine based on another parameter.

Alias Beta='~/login.sh beta'alias prod="~/login.sh prod" 

Then use the source command to update the resource file

source. BASHRC

You can then use the following command

Beta Machinenamekeywords

Now I need to apply this script to bash on my Mac machine. Discover that there is not such a. bashrc file on your Mac, and that some of the custom aliases on your Mac are stored in the. bash_profile file. As I met

Mac OS X is based on FreeBSD, so some tools ls, top, etc. are BSD that set, LS is not GNU ls, so even if the TERMINAL/ITERM2 is configured with color, but on the Mac-typed LS command will not be highlighted, you can install Coreutils to solve (brew install coreutils), but if the LS color is not picky, there is a simple way to output clicolor=1 in. Bash_profile:

Link Address: http://www.vpsee.com/2013/09/use-the-solarized-color-theme-on-mac-os-x-terminal/

So you can see in general where you want to add bash configuration, the tutorial is using the. bash_profile configuration. Instead of modifying this. bashrc file.

Reference documents:

The difference between Login-bash and Nonlogin-bash: http://www.cnblogs.com/qcly/p/3273373.html

About the MAC. bashrc file Configuration

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.