How to solve "command not found" on Ubuntu bash shell?
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?
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.
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
.
I found the answer: I had to chmod 755 the file: install_zs.sh, and after I executed without the prefix 'sudo'