Debian 11 Bullseye
Sponsored Link

Initial Settings : Set Command Alias2021/08/17

 
Set Command Alias for some commands that are often used.
[1] Apply to all users as defaults.
root@dlp:~#
vi /etc/profile.d/command_alias.sh
# create new file

# add alias you'd like to set

alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# reload

root@dlp:~#
source /etc/profile.d/command_alias.sh

[2] Apply to a user. ( a user [bullseye] applies for himself )
bullseye@dlp:~$
vi ~/.bashrc
# add to the end : add alias you'd like to set

alias ll='ls $LS_OPTIONS -l'
alias l='ls $LS_OPTIONS -lA'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
bullseye@dlp:~$
source ~/.bashrc

Matched Content