2

Possible Duplicate:
How do I set a user environment variable? (permanently, not session)

How can I permanently modify the PATH variable in Ubuntu? Is it possible to do it without modifying any files?

I currently use export PATH=${PATH}:/usr/local/cuda/bin but each time I open a new terminal I have to type it again.

4 Answers4

5

Your PATH comes from a text file (usually ~/.bash_profile). There really isn't a way to edit it without changing your profile short of doming something like

echo 'PATH=$PATH:/usr/local/cuda/bin' >> ~/.bash_profile
D.Shawley
  • 151
3

Usually I just throw that exact command you have in my ~/.bash_profile.

1

put this line into you .bashrc or .profile file in ~/ Then it is loaded whenever you start your console session

three
  • 111
  • 3
0

You can't do it with just a command.

You have to edit the bashrc file for either the system installation or your personal one for permanent changes to take effect.

tpg2114
  • 123