Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
Cross-posted: unix.stackexchange.com/questions/22263/… –  Marco Ceppi Oct 8 '11 at 4:02
    
I've already notified the mods. So I am waiting for them to delete this post. –  Framester Oct 8 '11 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. –  Eliah Kagan Nov 15 '11 at 17:38

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.