• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Questons about the Linux directory structure

LastStop

Senior member
Can someone give me a brief explanation of the directory stucture of Linux? Where would I put my personal files such as mp3's pictures. I know I can probably put them anywhere but what's the proper location? Thanks.
 
If the files belong only to you (i.e., are not shared on the network with every user) then

/homes/<your linux account name>/anydirectoryyouwant...

If they are shared out on your network then it's not so clear-cut.
 
Eh, I have my mp3s on their own partition, mounted to /mnt/music. Only users in group audio have access.
My pictures are in my home directory, ~/images.

Just don't put them somewhere like /sbin or anything 😉

BTW, on every distro I've seen it's /home, not /homes.

 
Originally posted by: Derango


Well...yes it does. You don't want to put MP3s in /etc/ for example.

Ahem

um

of course not....

that would be

um

stupid........

I'll be back in a second.......
 
Originally posted by: Derango
Originally posted by: Abzstrak
the 😉 meant it was a joke..


it doesn't matter where you put things

Well...yes it does. You don't want to put MP3s in /etc/ for example.

for those of us just starting out on linux...
would you care to explain why?
 
for those of us just starting out on linux...
would you care to explain why?

The each directory in the basic Linux directory structure has a 'purpose', to help things work between distributions and be semi-standardized.

/bin is for essential utils needed during boot, before the network may be up.
/sbin is for admin utils that are needed before the network is up
/usr/bin is for day to day use tools that aren't needed until /usr is mounted and the network is up
/usr/sbin/ is for admin utils that aren't needed until /usr is mounted and the network is up
lib directories are generally for the same purpose as the bin directories except they have shared libraries (i.e. dlls) instead of executables
/usr/local is for programs compiled just for the local host.
/etc is for configuration files
/var is for frequently changing files, mostly logs, mail and news spools.
/home is for user home directories
/proc is for process information, in Linux it's been expanded to hold a lot of kernel variable information
/tmp is for temporary files, this can be put on another partition to avoid filling up the / partition, or if you have the memory it could be a ramdisk or virtual memory filesystem.

There's documentation in the LSB that probably explains things better than I can.

A lot of the reasoning takes into account situations that a lot of people won't even think of, like mounting /usr and/or /home over the network via NFS is popular for a lot of reasons. Hell if you really want you can mount the whole root filesystem via NFS and not have a local hard disk.
 
As Nothinman said, besides distribution consistency, the standards are mostly motivated by large network considerations - particularly distinguishing between shared/unshared and static/variable types of directories in order to make big networks more secure and efficient. The current FHS standards are here. You can download the docs a page up.
 
Back
Top