1

The default version of python in my Ubuntu 18.04 is 2.7. I've already used the command: alias python=python3

but it changes the python version temporarily, as soon as I close the terminal and re-opens it the version again changes to python 2.7.

Is there any permanent solution to this issue?

1 Answers1

1

See this existing question about creating a bash alias permanently:

How do I create a permanent Bash alias?

Essentially you want to edit the file ~/.bashrc and put that command somewhere (likely near the bottom) in there. The linked question is pretty old (2010) and mentions gedit but you don't have to use that text editor to modify the file, you can use whatever text editor you want.