Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Linux filesystem trees

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue Jun 04, 2013 10:38 am    Post subject: Linux filesystem trees Reply with quote

The structure of Linux filesystems remains an ongoing knot of obfuscation that any expert must overcome: not only has its history left it arcane and convoluted but different distros, different install options, different apps, do things in different ways.

For example I would find it really useful to have a semi-graphical "where-to-find-it" map of all the stuff in my vanilla Debian install. Where does Evolution hold my emails and contacts, where should I install oddball apps I have downloaded and why, etc. etc.

Does this kind of resource exist?
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Tue Jun 04, 2013 11:17 am    Post subject: Reply with quote

Programs installed from outside of the package manager should be installed /usr/local for systemwide use, or in your home directory, ~/bin for executables, for your own use.

Individual apps are free to choose where to keep their data, permissions permitting.

You could look at http://tuxradar.com/content/take-linux-filesystem-tour
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Spangwiches



Joined: Thu Sep 22, 2011 3:50 am
Posts: 81

PostPosted: Tue Jun 04, 2013 12:44 pm    Post subject: Reply with quote

This is a handy overview. Not searchable as you wanted, but a good explanation of why the filesystem is the way it is.

http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard#Directory_structure

You may also be interested to hear that Arch Linux have recently done away with all the various /bin and /lib directories and merged them all into /usr/bin and /usr/lib which seems like a very sensible move

https://mailman.archlinux.org/pipermail/arch-dev-public/2012-March/022625.html
_________________
http://uoou.info/
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Tue Jun 04, 2013 2:04 pm    Post subject: Reply with quote

Spangwiches wrote:
You may also be interested to hear that Arch Linux have recently done away with all the various /bin and /lib directories and merged them all into /usr/bin and /usr/lib which seems like a very sensible move


Not if you want /usr mounted read-only or mounted on NFS. There are traditional reason for the separation of / and /usr and while not all of them still apply, some do.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Spangwiches



Joined: Thu Sep 22, 2011 3:50 am
Posts: 81

PostPosted: Tue Jun 04, 2013 2:41 pm    Post subject: Reply with quote

They cover that in the link.
_________________
http://uoou.info/
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue Jun 04, 2013 2:49 pm    Post subject: Reply with quote

Thanks for the pointers.

In addition to those in the Tuxradar graphic, my system also has:
lib32
lib64 (a link to /lib)
lost+found
media
opt
selinux
srv
tmp
var

Many of these are explained in the Wikipedia article, and the others are reasonably obvious.

These more or less answer the "what will I find in here?" question, bar such things as confusion over mailboxes: I have a mailbox file in /var/mail but it is some kind of system mailbox, not my regular one (which is in $HOME/.evolution).

But they do not answer the "where should I put it?" question. For example calibre installed into /opt by default - why? Where should, or could, I have put it? /bin or /usr/bin or /usr/sbin or... ?

And of course they are generic, not exact for any given distro.
_________________
Cheers,
Guy
The eternal help vampire


Last edited by guy on Tue Jun 04, 2013 2:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Tue Jun 04, 2013 2:51 pm    Post subject: Reply with quote

I see no mention of either NFS or read-only.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Tue Jun 04, 2013 2:54 pm    Post subject: Reply with quote

/opt tends to be used as a dumping ground for binary programs, things like adobe-flash. Calibre should be installed into /usr. The only programs installing into /{bin,sbin,lib} should be those required before the kernel mounts any filesystems.

Of course, the list of such "requirements" is ever growing and the cause of much heated discussion, particularly in view of the decision by the udev/systemd developers to roll everything into /usr and require an initramfs for any system that needs a separate /usr.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
guy
LXF regular


Joined: Thu Apr 07, 2005 1:07 pm
Posts: 1071
Location: Worcestershire

PostPosted: Tue Jun 04, 2013 2:56 pm    Post subject: Reply with quote

nelz wrote:
I see no mention of either NFS or read-only.

Nope. Should they be there, and if so why?

Just showed hidden files and found .ure to add to the list. Never even heard of it. It contains some kind off java config file and nothing else.
_________________
Cheers,
Guy
The eternal help vampire
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8457
Location: Warrington, UK

PostPosted: Tue Jun 04, 2013 4:40 pm    Post subject: Reply with quote

That response was to Spangwiches, regarding the Arch post.

There shouldn't be hidden config files in the root directory, but Java programs don't always seem to worry about such things Sad
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
johnhudson
LXF regular


Joined: Wed Aug 03, 2005 2:37 pm
Posts: 870

PostPosted: Tue Jun 04, 2013 10:08 pm    Post subject: Reply with quote

guy wrote:
I have a mailbox file in /var/mail but it is some kind of system mailbox, not my regular one (which is in $HOME/.evolution).


It is for the original Unix mail user agent which you will find in /bin. It only transmits plain text messages and is used to send system messages, such as those from syslog.
Back to top
View user's profile Send private message
Spangwiches



Joined: Thu Sep 22, 2011 3:50 am
Posts: 81

PostPosted: Thu Jun 06, 2013 11:54 am    Post subject: Reply with quote

Sorry nelz, you're right I must've read that somewhere else and assumed it was there.

I remember reading an explanation/alternative but sadly I don't remember what it was (since it's not something I care about (or even really understand)).
_________________
http://uoou.info/
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast