Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a project on my school's linux servers. I have a program deep in a directory, we'll say it's /afs/

What do I setenv the PATH variable to so that I can run the program in that directory? It is currently set to /usr/local/bin:/usr/bin:/bin so obviously I want to add to the end of that.


share|improve this question
up vote 4 down vote accepted

csh/tcsh you say?

setenv PATH ${PATH}:/my/additional/path

Update: Fixed my error of forgetting to escape the colon. Thanks Dennis.

share|improve this answer
I did so, specifically setenv PATH $PATH:/afs/‌​datalab-handout/datalab-handout but I keep getting the error Bad : modifier in $ (/). – Rowhawn Sep 8 '10 at 2:54
@Rowhawn: You need to escape the colon: setenv PATH $PATH\:/more/dirs or use braces around the variable: setenv PATH ${PATH}:/more/dirs – Dennis Williamson Sep 8 '10 at 3:10
Updated. Thanks Dennis. – Spiff Sep 8 '10 at 4:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.