Log on to the remote server by using ssh to modify the gcc version, and log on to the gcc version by Using ssh.
After we ssh to the remote server, if we do not have the sudo permission but need to modify the gcc version, we cannot directly delete/usr/bin/gcc, then ln-s/usr/bin/gcc-4.8/usr/bin/gcc.
In this case, we need to set in the home directory. First
Create another gcc soft connection at a location in the home Directory (the path is random, but the path must be in your own home (that is ~) Under)
$ Ln-s/usr/bin/gcc-4.8/home/bluecloudmatrix/gccln/gcc
At this time you knock gcc-v is still the old version, not the gcc-4.8, because the above new PATH/home/bluecloudmatrix/gccln is not added to the environment variable PATH, in the bash configuration file (~ /. Bashrc), pay attention to the order:
Export PATH =/home/bluecloudmatrix/gccln: $ PATH
If it is added to the end, it is still the old version after gcc is knocked, because the gcc found first prevails.
Finally, the modification is complete ~ /. Bashrc, do not forget
$ Source ~ /. Bashrc
This setting is enabled.
By the way, if the remote server you log on to does not have the gcc version you want, and you do not have sudo permissions, you cannot use the gcc version on this machine.