make a certain software version the default in ubuntu
Solution 1:
I think the best way to do this on Ubuntu is like that:
sudo update-alternatives --set php /usr/bin/php5.6
You may change the version according to your needs.
Solution 2:
There are a million things you can do instead of changing your $PATH.
One is to define an alias in your /home/YOUR_NAME/.bashrc file,
alias myphp=' /path/to/my/favorite/php '
Another one is to rename the version of php that you do not want, and to transform /usr/bin/php in a symbolic link to the version you wish to use:
sudo mv /usr/bin/php /usr/bin/php_5.3.10
sudo ln -s /path/to/php/you/want /usr/bin/php
Or you may use the Debian alternatives system. First, you install a php alternative,
sudo update-alternatives --install "/usr/bin/php" "php" "/pathto/your/favorite/php" 1
then you control that everything's fine by means of
sudo update-alternatives --display php
And much, much more.
Solution 3:
sudo update-alternatives --config php