1、根据这篇文章:
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
简单的说就是:
.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
Mac OS X — an exception
An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling .bash_profile instead of .bashrc. Other GUI terminal emulators may do the same, but most tend not to.
而糟糕的是,MAC是一个例外,它会执行bash_profile,但不会去管.bashrc
===============================
2、好了,解决方案是
编辑一下.bash_profile:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
===============================
3、加上最需要的两个命令
alias ll='ls -lG'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
export PATH="/usr/local/share/npm/bin:$PATH"
export NODE_PATH=/usr/local/share/npm/lib/node_modules
export PYTHONPATH=/usr/local/lib/python3.3/site-packages
一个是ll,因为用习惯了centos所以ll很好用,ls也加上color。剩下的是两个PATH
===============================
4、总得来说就是,你需要在bash_profile里写入
CLICOLOR=1
LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='[ 33[01;32m]u@h[ 33[00m]:[ 33[01;36m]w[ 33[00m]$ '
#enables colorfor iTerm
export TERM=xterm-color
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
-----------------------------
然后在bashrc里写入
alias ll='ls -lG'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
简单的说就是:
.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells.
Mac OS X — an exception
An exception to the terminal window guidelines is Mac OS X’s Terminal.app, which runs a login shell by default for each new terminal window, calling .bash_profile instead of .bashrc. Other GUI terminal emulators may do the same, but most tend not to.
而糟糕的是,MAC是一个例外,它会执行bash_profile,但不会去管.bashrc
===============================
2、好了,解决方案是
编辑一下.bash_profile:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
===============================
3、加上最需要的两个命令
alias ll='ls -lG'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
export PATH="/usr/local/share/npm/bin:$PATH"
export NODE_PATH=/usr/local/share/npm/lib/node_modules
export PYTHONPATH=/usr/local/lib/python3.3/site-packages
一个是ll,因为用习惯了centos所以ll很好用,ls也加上color。剩下的是两个PATH
===============================
4、总得来说就是,你需要在bash_profile里写入
CLICOLOR=1
LSCOLORS=gxfxcxdxbxegedabagacad
export PS1='[ 33[01;32m]u@h[ 33[00m]:[ 33[01;36m]w[ 33[00m]$ '
#enables colorfor iTerm
export TERM=xterm-color
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
-----------------------------
然后在bashrc里写入
alias ll='ls -lG'
alias ls='ls -G'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'