You are on page 1of 7

Binary refers to :-

Binary file, composed of something other than human-readable text

Executable, a type of binary file that contains machine code for the computer to execute

Binary code, the digital representation of text and data

Binary files are usually thought of as being a sequence of bytes, which means the binary digits (bits) are
grouped in eights. Binary files typically contain bytes that are intended to be interpreted as something
other than text characters. Compiled computer programs are typical examples; indeed, compiled
applications are sometimes referred to, particularly by programmers, as binaries. But binary files can also
mean that they contain images, sounds, compressed versions of other files, etc
A hex editor or viewer may be used to view file data as a sequence of hexadecimal (or decimal, binary or
ASCII character) values for corresponding bytes of a binary file.

"System Binaries" are machine executable files and libraries as against Source Code which is human
readable and requires to be compiled to produce the machine runnable "System Binary".

Binaries are files that contain compiled source code (or machine code). Binary files are the files which
contain compiled source code (or machine code). They are also called executable files because they can
be executed on the computer.

/bin.

Other /bin directories.

/sbin.

/lib.

/opt.

Linux discriminates between 'normal' executables and those used for system maintenance and/or
administrative tasks. The latter reside either here or - the less important ones - in /usr/sbin. Locally
installed system administration programs should be placed into /usr/local/sbin.

Programs executed after /usr is known to be mounted (when there are no problems) are generally
placed into /usr/sbin. This directory contains binaries that are essential to the working of the system.
These include system administration as well as maintenance and hardware configuration programs. You
may find lilo, fdisk, init, ifconfig, etc.... here.

Another directory that contains system binaries is /usr/sbin. This directory contains other binaries of use
to the system administrator. This is where you will find the network daemons for your system along with
other binaries that (generally) only the system administrator has access to, but which are not required
for system maintenance and repair. Normally, these directories are never part of normal user's $PATHs,
only of roots (PATH is an environment variable that controls the sequence of locations that the system
will attempt to look in for commands).

The /bin directory contains binaries for use by all users. The ‘/bin’ directory also contains executable
files, Linux commands that are used in single user mode, and common commands that are used by all
the users, like cat, cp, cd, ls, etc. According to the FHS the /bin directory should contain /bin/cat and
/bin/date (among others). The ‘/bin’ directory doesn’t contain directories.

Other /bin directories

You can find a /bin subdirectory in many other directories. A user named Amy could put her own
programs in /home/amy/bin. Some applications, often when installed directly from source will put
themselves in /opt. A samba server installation can use /opt/samba/bin to store its binaries.
/sbin

The /sbin contains binaries to configure the operating system. The ‘/sbin’ directory also contains
executable files, but unlike ‘/bin’ it only contains system binaries which require root privilege to perform
certain tasks and are helpful for system maintenance purpose. e.g. fsck, root, init, ifconfig, etc. Many of
the system binaries require root privilege to perform certain tasks.

/lib

The ‘/lib’ directory contains shared libraries which are often used by the ‘/bin’ and ‘/sbin’ directories. It
also contains kernel module. These filenames are identable as ld* or lib*.so.*. For example, ld-linux.so.2
and libfuse.so.2.8.6. Below is an example of the partial contents of /lib.

$ ls /lib/libc*

/lib/libc-2.5.so /lib/libcfont.so.0.0.0 /lib/libcom_err.so.2.1

/lib/libcap.so.1 /lib/libcidn-2.5.so /lib/libconsole.so.0

/lib/libcap.so.1.10 /lib/libcidn.so.1 /lib/libconsole.so.0.0.0

/lib/libcfont.so.0 /lib/libcom_err.so.2 /lib/libcrypt-2.5.so


1) /lib/modules: The ‘/lib/modules’ stores kernel modules and has a directory for each installed kernel.
Typically, the Linux kernel loads kernel modules from /lib/modules/$kernel-version/. Modules are meant
to use extra hardware support without making a new kernel.

2) /lib32 and /lib64: We currently are in a transition between 32-bit and 64-bit systems. During
compilation time of libraries, you’ll encounter through the directories named ‘/lib32’ and ‘/lib64’ which
will clarify register size to be used. A 64-bit system may have compatibility for 32-bit binary.

/opt

The term ‘opt’ is short for optional. Its main purpose is to store optional application software packages.
In many cases this is software from outside the distribution repository. Add-on applications from
individual vendors should be installed in ‘/opt’. In some systems ‘/opt’ is empty as they may not have any
add-on application. A large package can install all its files in /bin, /lib, /etc subdirectories within
/opt/$packagename/. If for example the package is called wp, then it installs in /opt/wp, putting binaries
in /opt/wp/bin and man pages in /opt/wp/man.

The /sbin contains binaries to configure the operating system. The ‘/sbin’ directory also contains
executable files, but unlike ‘/bin’ it only contains system binaries which require root privilege to perform
certain tasks and are helpful for system maintenance purpose. e.g. fsck, root, init, ifconfig, etc. Many of
the system binaries require root privilege to perform certain tasks.

The ‘/lib’ directory contains shared libraries which are often used by the ‘/bin’ and ‘/sbin’ directories. It
also contains kernel module. These filenames are identable as ld* or lib*.so.*. For example, ld-linux.so.2
and libfuse.so.2.8.6. Below is an example of the partial contents of /lib.

The term ‘opt’ is short for optional. Its main purpose is to store optional application software packages.
In many cases this is software from outside the distribution repository. Add-on applications from
individual vendors should be installed in ‘/opt’. In some systems ‘/opt’ is empty as they may not have any
add-on application. A large package can install all its files in /bin, /lib, /etc subdirectories within
/opt/$packagename/. If for example the package is called wp, then it installs in /opt/wp, putting binaries
in /opt/wp/bin and man pages in /opt/wp/man.

You might also like