Sunday, February 15, 2009

MacBook の HDD 交換: bash の設定編

シェルの環境設定
/etc/profile, ~/.bash_profile, ~/.bashrc の内容をそれぞれ下記のようにする

/etc/profile
# System-wide .profile for sh(1)

PATH="/bin:/sbin:/usr/bin:/usr/sbin"
export PATH

if [ "${BASH-no}" != "no" ]; then
        [ -r /etc/bashrc ] && . /etc/bashrc
fi


# Followings are my configuration
PATH="/usr/local/bin:/usr/local/sbin:$PATH"
export PATH


~/.bash_profile
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi


~/.bashrc
# aliases
alias ls="ls -Gv"
alias ll="ls -l"
alias la="ls -a"
alias rm="rm -i"

No comments:

Post a Comment