O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Command Not Found Errors

To execute a UNIX command, utility, or shell script, simply type the command name at the shell prompt, including any options and arguments needed by the command. Some commands are built into the shell program, but most standard UNIX commands are program files stored in directories such as /bin, /usr/bin/, /etc/, /usr/local/bin, /sbin, and so on.

If you try to run a command, you might get an error like this:

$ myscript
myscript: not found
$ ./myscript
acme
pegasus
$

It’s common to see this not found error when you first begin writing your own shell scripts. If the script is in your current directory, run the file as ./scriptname. This might solve the problem.

If you still get a command not found error, check that you have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required