The Linux /usr/local Directory (Path)
The local directory (below /usr) is commonly used for the parent directory of Linux software programs that are installed “locally”.
Run the following command to see the contents of the local directory.
$ ls -la /usr/local
This directory is often empty immediately after installing Linux.
Linux Commands Training Tips: The Linux System Administration concepts, commands and tasks covered here apply to ALL other Linux distributions, including: Red Hat, Fedora, Ubuntu, Kubuntu, Edubuntu, Slackware, Debian, SUSE and openSUSE.
The Linux /usr/bin Directory (Path)
The /bin directory contains essential and commonly used binary files that are Linux command line utilities – and /usr/bin also contains files of this type, and symlinks to binaries (of the same name, and of different names) that are in the paths of /bin and /sbin.
For example, the zip command (binary) is used to “zip” up (combine) files and compress them into a single file.
The “bin” in the name of this directory stands for binary. It is NOT prefixed with “s” (like “sbin”) and by default, all of the Linux commands in it can be used by all users.
Viewing Files in /usr/bin with the Linux ls Command – Example
$ ls -l /usr/bin | less
Scroll down to see Linux binaries for the clear, eject, and find commands – and lots of others.
Press q to quit.
Now use the file pattern of “z* to list all the files beginning with “z” and notice the file named “zip” (if it has been installed on your system).
$ ls -l /usr/bin/z*
Tags: linux system