Most programs reside in bin directories.

Each UNIX system has literally hundreds of programs installed on it. Some programs are distributed with the operating system, and others are bought from third-party vendors. In addition, some programs (such as Emacs) are distributed “free,” and some may have been developed exclusively for your site.

Each program is stored like any other file on the UNIX system. The difference is that programs are executable files, meaning that they have special permission to be run as a command. Other than being executable, programs are just files like any other file installed on the system. (This doesn’t mean that you can read or edit all of them, since many executable files are stored in a nonreadable format called binary format . But you can list and copy them as you can other files.)

Programs are usually installed in a directory called bin — for example, in /bin, /usr/bin, /usr/local/bin, etc. When you type ls, you are really running the program /bin/ls. When you type grep, you are really running /usr/bin/grep.

Get WYNTK: UNIX System Admininistrator now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.