teror4uks
teror4uks

Reputation: 186

add aliases on osx terminal for all users

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

Upvotes: 3

Views: 3191

Answers (1)

teror4uks
teror4uks

Reputation: 186

I am solved this problem. Need add aliases in the end file /etc/bashrc

example:

sudo nano /etc/bashrc

alias dir='ls -l'

save file and reboot or logout

Upvotes: 6

Related Questions