This question already has an answer here:

A new Question today :).

I've downloaded Sublime Text 2 for Linux (x32). Now I want to add it to the PATH-Variable. How does this work?

Greets,

Baldoius

share|improve this question

marked as duplicate by Takkat, Radu Rădeanu, Mitch, Warren Hill, Alvar Nov 25 '13 at 13:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 8 down vote accepted

You can add only a directory path to path variable.Run the below commands on terminal to add a directory path to the PATH-Variable,

su root
PATH=$PATH:/path/to/the/directory

To add the path permanently, add the following line at the end of ~/.bashrcfile

sudo gedit ~/.bashrc

Add the below line at the end,

export PATH=$PATH:/path/to/the/directory
share|improve this answer