/bin contains commands that may be used by both the system
administrator and by users, but which are required when no other
filesystems are mounted (e.g. in single user mode). It may also contain
commands which are used indirectly by scripts.
There should be no subdirectories within /bin.
Command binaries that are not essential enough to place into
/bin should be placed in /usr/bin, instead. Items that
are required only by non-root users (the X Window System, chsh, etc.)
are generally not essential enough to be placed into the root partition.
Required files for /bin:
General commands:
The following commands have been included because they are essential,
except for a few commands being present because of their traditional
placement in /bin.
If /bin/sh is Bash, then /bin/sh should be a symbolic or
hard link to /bin/bash since Bash behaves differently when
called as sh or bash. pdksh, which may be the
/bin/sh on install disks, should likewise be arranged with
/bin/sh being a symlink to /bin/ksh. The use of a
symbolic link in these cases allows users to easily see that
/bin/sh is not a true Bourne shell.
The de-facto standard location of the C-shell is /bin/csh. A
C-shell or equivalent (such as tcsh), if available on the
system, should be located at /bin/csh. /bin/csh may be
a symbolic link to /bin/tcsh or /usr/bin/tcsh.
Note: The [ and test commands are built into most
commonly used Bourne shell (/bin/sh) replacements. These two
commands do not have to be placed in /bin; they may be placed in
/usr/bin. They must be included as separate binaries with any
UNIX or UNIX-like system attempting to comply with the POSIX.2
standard.
Restoration commands:
These commands have been added to make restoration of a system possible
(provided that / is intact).
{ tar, gzip, gunzip (link to gzip), zcat (link to gzip) }
If system backups are made using programs other than gzip and
tar, then the root partition should contain the minimal
necessary restoration components. For instance, many systems should
include cpio as it is the next most commonly used backup utility
after tar.
Conversely, if no restoration from the root partition is ever expected,
then these binaries may be omitted (e.g., a ROM chip root, mounting
/usr through NFS). If restoration of a system is planned
through the network, then ftp or tftp (along with
everything necessary to get an ftp connection) should be available on
the root partition.
Non-vital restoration commands may appear in either /bin or
/usr/bin on different systems.
Networking commands:
These are the only necessary networking binaries that both root and
users will want or need to execute other than the ones in
/usr/bin or /usr/local/bin.