#express Alias files are shortcuts where you give a variable a CLI command string.
- Create a .txt file in the
/home/{user}/
directory called.aliases
and open it up:cd /home/{user}/ touch .aliases sudo vim .aliases
- Enter in your list of
alias
commands in the current format:alias shortcut-name='cd /mnt/c/users/some-dude'
This text file will be executed by the terminal $SHELL each time it's booted up. 1
cd /home/{user}/ vim .bashrc
and enter this at the bottom of the file:
source ~/.aliases
-
This alias is usually in the same user directory as
.bashrc
config file by default. If you have a shell other thanbash
, likezsh
then make sure commands that reference.bashrc
file are changed accordingly. ↩