Setting up Aliases

To set up certain ersions as default, you should use alias option.

For instance, if your current version of python is 2.6 and you want to set it to be 3.6 as default, yu can run:

  alias python=python3

Open another terminal, check for python version using the following command and you will see that it is python 3.6:

  python--version

You can do the same for any other package. However, for this chages to be permanent, you need to make changes in .bashrc file.

In this example we will set python and pip to be new versions by default:

  sudo apt-get update
  sudo vi ~/.bashrc
  alias python='/usr/bin/python3.6'
  alias pip='usr/bin/pip3'

Save the cnahges and open new terminal and check for versions.