3

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.

3
  • Cross-posted: unix.stackexchange.com/questions/22263/… Oct 8, 2011 at 4:02
  • I've already notified the mods. So I am waiting for them to delete this post.
    – Framester
    Oct 8, 2011 at 14:20
  • I'm not so sure this should be deleted. It has an answer that should work out-of-the-box on Ubuntu systems and some other Unix-like systems, but by no means all. Each user's .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 private bin 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. Nov 15, 2011 at 17:38

1 Answer 1

3

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! :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .