The question Choose gcc and g++ version answers how to do it, but I could not figure out, if it only affects me or also all the other users of the system as I have to use sudo
. I share a server (11.04) with other people and I am the only one who has to use gcc 4-4.
1 Answer
Set up personal links:
cd ~
mkdir bin
cd bin
ln -s /usr/bin/gcc-4.4 gcc
ln -s /usr/bin/g++-4.4 g++
Then, run this whenever you start a new shell, or add it to your .bash_profile, or whatever:
PATH=~/bin:$PATH
And you're done! :)
.profile
file in Ubuntu (and some other OSes, but not all and not, I don't think, even most) contain code to check for the existence of a user's privatebin
directory and add it to the path, on login. So the answer here doesn't go into detail about how to add that directory, whereas the answers at the original question do go into much greater detail.