Home / VPS & Dedicated / The /usr/bin directory in Linux

The /usr/bin directory in Linux

usr-bin-listing
In an earlier post, we gave you a brief overview of the Linux filesystem structure. The /usr/bin directory is the main directory for user executables. Essentially, any program you might want to run will usually have an executable in this directory. It is important to note, however, that unlike Windows, not all of the program’s files are in one directory. Only the executables are kept in /usr/bin.

The default Linux path on all distributions includes /usr/bin. Therefore, you do not need to type the entire path to execute a program. For example, if you want to run “top”, you just type “top” without needing to enter “/usr/bin/top”. When you install scripts and applications, however, they might still ask for the full path to the executable on your server. In that case, you would still need to prefix the command with “/usr/bin”.

There is a chance that the program you are looking for is installed elsewhere, like /usr/local/bin or /usr/sbin. The “which” command will reveal its true location. Simple type: “which top” or “which” followed by the command you need to locate. If you are not sure what the exact name is, you can try sorting through the directory like this:

cd /usr/bin
ls -al | grep make

This will output all executables with the word “make” anywhere in its name, such as qmake, makeconv, automake, and imake.

Check Also

servers

Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …