Python 2 support ended on 1-January-2020, and many major projects already signed the Python 3 Statement that declares that they will remove Python 2 support. However many of us prefer to code on python interpreter for tiny code snippets, instead of making .py files. And when we fire command ‘python’ on the terminal, interpreter of python2 gets launched by default.

Which leaves us with no choice other than, explicitly typing python3. However, we can set python3 as default by firing two commands on terminal
echo "alias python='python3'" >> .bashrc source .bashrc
Now if we check in the terminal by just running the “python” command it would result in the following:

The interpreter of python 3 was launched, rather than an interpreter of python2. We basically wrote a permanent alias in .bashrc, which replaces command python as python3 and we reloaded the .bashrc file.
Recommended Posts:
- PyQt5 QCommandLinkButton - Setting Auto Default Property
- PyQt5 QCommandLinkButton - Setting Default Cursor Back
- Kali Linux - Default Passwords
- Python3 Intermediate Level Topics
- How to implement Dictionary with Python3?
- Python3 for GUI application | An Overview
- How to write Comments in Python3?
- Python2 vs Python3 | Syntax and performance Comparison
- Automate the Conversion from Python2 to Python3
- Convert String to Double in Python3
- Introduction to Python3
- Python3 - if , if..else, Nested if, if-elif statements
- Why PyPy3 is preffered over Python3?
- Different Input and Output Techniques in Python3
- New '=' Operator in Python3.8 f-string
- Positional-only Parameter in Python3.8
- Itertools in Python3
- How to print spaces in Python3?
- How to use Variables in Python3?
- Guide to install TuriCreate in Python3.x
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

