Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am very new to Ubuntu, struggling to find the proper command to install Zend Server on my Ubuntu 9.10 Server.

After downloading the ZF Server and extracting it, I try to run this command:

install_zs.sh 5.3

This is the ls of the extracted ZF archive:

install_zs.sh  README  upgrade_zs_php.sh  zend.deb.repo  zend.rpm.repo

But it says command not found. Any idea?

share|improve this question
    
A good protip here is to press tab to autocomplete file names in the terminal of your current directory. –  Jonno_FTW Apr 25 '10 at 16:48
1  
Basically, when you try to run a command, the shell tries to prepend a known path to it, so that you can run a command like pwd from any directory without having to specify which one. The shell will run the first program it finds that matches your name. If you are running something NOT on a known path, you have to specify the path. . is the current directory, so ./file manually prepends the current directory to the call to file so that shell doesn't have to try and figure out which file you want. –  mechko Apr 25 '10 at 17:08

3 Answers 3

When executing an executable or script that isn't in your system's "PATH" environment variable, you have to provide the full path to it. "." is an alias for the full path of your current working directory, so ./install_zs.sh 5.3 should work.

I'd like to strongly suggest you give this, or some similar *nix shell documentation a read-through, as maneuvering around the shell blindly is never, ever, ever a good idea.

share|improve this answer

Normally the current directory is not searched for executables. If the shell script is executable then you can use ./install_zs.sh 5.3 to run it, otherwise use sh install_zs.sh 5.3.

share|improve this answer

I found the answer: I had to chmod 755 the file: install_zs.sh, and after I executed without the prefix 'sudo'

share|improve this answer

Your Answer

 
discard

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.