Recommended directory in Linux for Installing / Copying Apps Games or LAMP – Linux File system Explained
Newbie’s to Linux often face the dilemma of where to install or put the binaries of any software app they wish to run on their Linux. If that app comes with a installer it’s ok but if not then It’s tough time , well here I would recommend some important points to consider while choosing the directories for installation of your Apps etc.
If you are using some package manager like Synaptic (Ubuntu) , YUm or apt-get then the locations are automatically chosen for you and are in most case /bin or /usr/bin for the executables .
If you are installing LAMP then install it to /opt or /etc directory and while you can keep the WEB ROOT at /var/www or in some other Linux’s at /srv/www
As I told you, Apps tend to be installed in /usr/bin
, /usr/local/bin
, or in some cases /opt
. If you’re developing your own software or modifying an existing package /usr/local/bin
is probably better as it signifies a user edited binary file
To Learn more about significance and usage of filesystem hierarchy of Linux , Download this PDF from pathname.com , or read it Online ( HTML) version here
Pictorial representation of Linux FileSystem
Here are two images, I found on the internet which explain the various Directories under Linux file system in brief within a small single page image.
(Click on image to Expand it )
Here is another one much colorful and Web2
Hope this helped you understand to some extent , meaning and importance of various directories under Linux root filesystem.
(Image credit goes to the creator, If you are the one just notify me in comments and I will update it here in Post )