The place on a Unix filesystem where users and many scripts alike expect to find a copy of the Bourne shell, a command line interpreter written by Stephen Bourne.

The phrase /bin/sh means all kinds of things to a Unix user, but mainly by convention, in the same way that things have meaning in natural language.

For instance, nobody would ever write a program called sh and not have it be a Bourne-shell compatible command line interpreter. It's just not done. As a matter of fact, command line interpreters can be recognised by their names: they all end in sh. So the sh carries meaning: it means we're dealing with a command line interpreter. At the time /bin/sh was first written, no such convention existed, of course.

The /bin part means 'I am in the root partition'. Traditionally, Unix systems had a separate / ('root') partition with tools essential for system administration and /usr with additional software for end users. From its prefix we can immediately see that /bin/sh is among the essential system utilities. SunOS confused this by making /bin a symlink to /usr/bin; Solaris has reintroduced a /sbin to store the critical system utilities. This is related to the fact that binaries in /bin are dynamically linked.

So the string /bin/sh is part of a language, the language of Unix filenames, which exhibits structure and meaning in a nontrivial way.

Log in or register to write something here or to contact authors.