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