Quickly Add Permanent Bash Alias
By: Cam Wohlfeil
Published: 2018-09-19 1045 EDT
Category: Solutions
Tags:
linux,
bash
To make my life easier on my development box, I used this super simple bash oneliner to set up permanent aliases: echo 'alias python='python3'' >> ~/.bashrc
. This writes a new line, containing the text within the quotes, to the bottom of the .bashrc file. This is loaded everytime bash is loaded (per user, not globally). After that, just reload the file like so: . ~/.bashrc
and you're good to go!
References