On my PC Linux Mint "Victoria" is running and I would like to set aliases that apply equally to all users of my PC. This should be very easily done by creating an *.sh file in the directory /etc/profile.d. According to the file /etc/profile it should work since it refers to the /etc/profile.d directory:
Code: Select all
$ cat /etc/profile
[...]
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
Code: Select all
$ cat /etc/profile.d/aliases.sh
alias ll='ls -la'
alias g='grep'
alias ..='cd ..'
alias s='sudo'
alias update='sudo apt update'
Code: Select all
$ alias
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
Thanks a lot