On some systems I find that python
is not a defined command, but python3
is. Since Python 2 is no longer supported, and will hopefully become scarcer in dependencies, we can assume that python
represents the latest installed Python.
Assuming python3
is defined, we can define our alias in a permanent way by:
- Open config:
vim ~/.bashrc
- Add the line
alias python='python3'
- Save and exit (
:wq
) - Run
. ~/.bashrc
from home.