ubuntu

Permamnent PATH variable

Often when we install something we need to add the path of newly install software to the PATH environment variable.

In linux we can do that in following way:

For example I want to add the ‘/usr/local/go/bin‘ to environment variable path.

To do so,  we can do this by adding following line in the bottom of file/etc/profile (for a system-wide installation).  Or, in the file$HOME/.profile:

export PATH=$PATH:/usr/local/go/bin

We have to logout and log back in for changes to take effect.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s