how add aliases for all users in my Mac OSX El Capitan? I try add folder /etc/profile.d/customization.sh*
*aliases hear
but it's not working. And *.sh script runing but not add aliases even in the current session this my script
alias dir='ls -l'
alias ll='ls -l'
alias la='ls -la'
alias l='ls -alF'
# cat /etc/profile.d/customization.sh
alias ls-l='ls -l'
alias o='less'
alias ..='cd ..'
alias ...='cd ../..'
alias cd..='cd ..'
alias rd=rmdir
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias md='mkdir -p'
alias vi=vim
chmod +x script is made
答案 0 :(得分:4)
我解决了这个问题。需要在结束文件/ etc / bashrc中添加别名
示例:
sudo nano /etc/bashrc
alias dir='ls -l'
保存文件并重启或注销