Making Python3 default in Ubuntu

Making Python3 default in Ubuntu

ยท

1 min read

I came into the python world at 2017, and ever since then, I have never thought of using Python2. Now in 2020, I just updated my OS to Ubuntu 20.04 and I have no idea what python2 is doing on my terminal, talkless of even being the default.

Alt Text


But this is how I made python3 my default:

๐Ÿ“Œ First I typed gedit ~/.bashrc on my terminal to open the .bashrc file on my text editor.

$ gedit ~/.bashrc

๐Ÿ“Œ And then I added alias python=python3 to the top of the .bashrc file and saved it.

That was it. ๐Ÿš€๐Ÿš€

Alt Text

What this means is that whenever I write python on my terminal, it sees it as python3