Log on to the remote server through SSH and modify the GCC version.

Source: Internet
Author: User

Log on to the remote server through SSH and modify the GCC version.

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.

SSH password-free login configuration in CentOS 6.0

How to Improve the SSH login authentication speed of Ubuntu

Enable the SSH service to allow Android phones to remotely access Ubuntu 14.04

How to add dual authentication for SSH in Linux

Configure the SFTP environment for non-SSH users in Linux

Configure and manage the SSH service on Linux

Basic SSH tutorial

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.