Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 just installed "visit", a scientific visualization software, on Ubuntu 12.04 using the commands given in the visit install notes for Unix given here. To be precise, my commands were entered from the directory I installed the .tar file and the install script (/usr/Downloads), and were

chmod 755 visit-install2_7_1 

./visit-install2_7_1 2.7.1 linux-x86_64-ubuntu11 ../Documents/visit

echo "set path = ($path /Documents/visit/bin)" >> .cshrc

Now, when I enter the command "visit" in the CLI it produces the error "visit: command not found". I'm not exactly a Linux guru, so what is the general fix for something like this? If you'll notice in the commands above, the search path is set (I'm not really sure what this is); could this be the source of the problem? I am only able to open the software by cd'ing to the visit/bin directory and running ./visit, which I don't think should be necessary.

share|improve this question
Chances are you're using bash instead of c shell so exporting the path into .cshrc won't actually do anything. – Flyk Feb 9 '14 at 17:10
@kalina The visit-install2_7_1 executable is a bash file, is that what you mean? I'm actually not sure what .cshrc is, it was just part of that command given in the install notes. – bcf Feb 9 '14 at 17:13
up vote 6 down vote accepted

The problem is likely with last line you followed in your instructions:

echo "set path = ($path /Documents/visit/bin)" >> .cshrc

This only applies if you're using C Shell. As a Ubuntu user the chances are that your default shell is bash.

Since you're getting a "command not found" error when trying to run your application, you can assume that your current $PATH variable doesn't include the folder /Documents/visit/bin. You can check this by running the following command:

echo $PATH

This will likely return something along the lines of:


To do the equivalent with bash you'll want to follow the instructions in this question over on Stack Overflow: How to permanently set $PATH on Linux?

Alternatively... follow these steps:

  1. Edit .bashrc or .profile (in your home directory) with your favourite editor
  2. Find a line that states export PATH=, if you find one, skip to step 4
  3. Add a line at the bottom of the file that states export PATH=$PATH
  4. Add :<path/to>/visit/bin to the end of the line you found in step 2, or added in step 3, where <path/to> is the folder you installed visit into

You only need to add this line in either .bashrc or .profile, there's no need to add it to both.

share|improve this answer
another option is to create a symlink..... $> sudo ln -s /Documents/visit/bin/visit /usr/bin/ – mail-nv Feb 9 '14 at 17:23
@WolfgangVogl that's a terrible idea... – Braiam Feb 9 '14 at 17:28
why do you think @ Braiam - i've seen this in many cases - is there a reason to avoid? – mail-nv Feb 9 '14 at 17:39
@kalina I just used your alternate steps since the SO ones didn't seem to work and I'm still having the problem. The command I entered in .bashrc is export PATH=$PATH:/Documents/visit/bin, is that correct? The export PATH= wasn't in there originally so I added it. Any thoughts? Thanks for writing this up, by the way! – bcf Feb 9 '14 at 17:40
Hey! It was indeed there, but I just had to restart the shell for it to work. Thanks again for taking the time for helping me out! – bcf Feb 9 '14 at 18:07

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.