Besides /bin and /sbin/, which are the other directories in Linux where executable files are stored? I am aware the whereis command is used to find location of the files, but I can't find any other directory besides these two.
2 Answers
Please note that executables can also be located in /opt//bin and in /opt//sbin. Further, there are often in /usr/libexec also.
Some executables files are stored in /usr/bin
(and /usr/sbin
). This is usually installed scripts and apps. You should store your own scripts in /usr/local/bin
if you want to execute them from the whole system (or /usr/local/sbin
). See https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
-
2Note that you can execute from virtually any location, e.g. Documents, as long as the x bit is set and you have access. Apr 14, 2016 at 20:48
/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin