I'm new to running ubuntu as a desktop. I've managed a linux (non ubuntu) server for quite a while now. But, I've just been barely getting by. I am scared I'll mess something up and cpanel/whm is my go-to.
I know a little bit (command wise).. but my first question on this community is about the file system.
I've googled, and looked at questions on this forum.. but I can't find any that specifically deal with what I'm asking for. If they exist and this question is a duplicate, I greatly apologize.
My question:
Where do I store things on the file system? Specifically downloaded applications/programs.
I know I can put files anywhere I want but I want to adhere to commonly used practices.
Let me give an example.
I download skype and apache web server. Skype shouldn't be available to every user on the system.. just me. Apache should be a system service available to everyone.
- Should I install skype to my /home/me/ directory (or a subdirectory of that)
- Should it be installed in system apps location (where is that? /bin? /usr/bin?)
- So apache is installed… (in some location). Do each users public html folder go in their /home/username/public directory? or a created /home/username/public_html directory? or does it go where apache is installed
- Unrelated.. where should I put downloaded media (music, movies, etc)? Can other users access these by default?
- If I install a program through software center or apt-get, where do they go automatically? Does the package determine this
- Is there some document available I can read that talks about where ubuntu (or linux in general, i guess) puts stuff? My google attemps lead to explanations of ubuntu filesystem instead of where things go inside of the filesystem. A link would be appreciated.
Please be as specific as possible relating to my numbered questions. Thanks in advance.. I'm loving this so far!
-Scott
Best Answer
You shouldn't install Skype manually. Just download and install the ".deb" package.
The apps are stored normally in /usr/bin or /usr/lib http://ubuntuforums.org/archive/index.php/t-818509.html
/usr/bin
This directory contains the vast majority of binaries on your system. Executables in this directory vary widely. For instance vi, gcc,
gnome-session and mozilla and are all found here.
/usr/lib
This directory contains program libraries. Libraries are collections of frequently used program routines.
It should go where apache is installed (normally the www directory). However, you can follow this guide if you want to achieve something else: http://httpd.apache.org/docs/2.4/howto/public_html.html
Follow this guide if you want to learn more about the "how" and "where" of an apache installation: http://httpd.apache.org/docs/2.4/install.html
/usr/local
The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs. The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.
It's normally in
/home/$username/Downloads
. Other users can't access these files.Further information: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/home.html
From tldp
Yes it does. As already mentioned it should be in /usr/bin or /usr/lib. However, if you are installing applications manually it's often best practice to use
/opt
. http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/opt.htmlhttps://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/
https://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html
https://en.wikibooks.org/wiki/LPI_Linux_Certification/Create_Partitions_And_Filesystems
https://en.wikibooks.org/wiki/LPI_Linux_Certification (in general - LPIC information)