In my opinion, if you want to create many aliases, best solution is:
- Create a hidden file (I called it
.bash_aliases
) in your /home/"user_name"
- In this file you have to put all the aliases that you want to use in terminal. I.e mine is:
alias ll='ls -l'
alias la='ls -A'
alias mydu='du -s * .[^.]* | sort -n'
alias apti='sudo apt-get install'
alias aptr='sudo apt-get remove'
alias aptu='sudo apt-get update'
alias aptg='sudo apt-get upgrade'
alias down='sudo ifconfig wlan0 down'
alias up='sudo ifconfig wlan0 up'
alias managed='sudo iwconfig wlan0 mode managed'
alias monitor='sudo iwconfig wlan0 mode monitor'
alias usb='sudo mount /dev/sdc1 /mnt'
- In your
/home/"user_name"/.bashrc
file, put the following lines:
# More alias definitions in ~/.bash_aliases
if [ -f ~/.bash_aliases ];
then
. ~/.bash_aliases
fi
I put this line in the end of the file, but just for clarity.