Page 1 of 11 123 ... LastLast
Results 1 to 10 of 106

Thread: Does the linux file structure work?

  1. #1
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Does the linux file structure work?

    I think its safe to say that most if not all users of this forum started of with some variation of windows and then at some point moved to linux.

    In windows the file structure is something like this:

    c:\
    Documents and Settings
    - user documents, funnily enough NOT that many settings!
    Program Files
    - where any/all program data goes when you install something
    Windows
    - has all the system folders and registry entries, basically everything that makes the computer work

    This is very simplistic but its what I learnt while using windows. Sure the windows folder has a messy hierarchy, impossible to find anything, etc! However, when you install something other than any settings entries (which may go in the registry), most of the data goes into the Program files folder.

    Now for linux:

    Under the / directory you have about 15 different folders. Some of them like /home, /media, /mnt, /tmp, /dev, /tmp, /opt, /boot provide very specific functions. However, you then have /bin, /etc, /lib, /sbin, /srv, /sys, /usr, and /var, which all seem to perform arcane and obscure tasks. To the untrained eye they could easily be the same folder. And its true, I've been using linux for a few years, and I have a vague idea of what goes on in the folders, but overall its more of a hindarance than anything else.

    Mind you I'm not expert, I've never even compiled a kernel, but I have used linux and these are some of the problems I have found.

    1. Lets say I install a program, if I do it with APT, or install a .deb package usually uninstalling it is a simple case of using apt-get or synaptic. However, when I compile a program from source (which is required by a lot of programs). I am left with a plethora of files spread out all over my hard drive. Why is this? Wouldn't it make more sense to have them all in one folder like in windows?

    I know this isn't windows and I should use a different mindset but what is the benefit of spreading it out like this?

    Deleting programs installed from source (unless checkinstall was used) is a MAJOR hassle, and after 2 years I have no idea what I installed when I first ran ubuntu.

    2. Editing system folders seems "safe". What I mean by this is that in Windows, most people know not to touch anything that is under the WINDOWS directory, its taboo, you know if you touch something there something WILL break. In ubuntu editing, menu.lst, sources.list, xorg.conf can all be essential. However, editing some other files can cause MAJOR problems. True this is more about what you know, but still wouldn't it make more sense to have one folder which is practically off limits, which only the super-advanced user would ever need to access?

    What I was envisioning is something like this structure:

    /boot - this is fine you need it!
    /dev - again a useful place to put devices
    /home - for all documents (NB: including program settings as it is easier to backup then)
    /media - what is the point of /media AND /mnt??
    /proc - this performs useful functions I've heard
    /tmp - every filesystem needs this direcotry.

    So there are the filesystem that are already there and all seem to perform useful functions. Now consolidating whats left:

    /programs - any time a new program is installed, either from source, apt, or as a .deb package it should come here. No questions asked ALL the files are placed here. If this is deleted the program is basically wiped clean from the system. users can mess around with this as deleting one program may not harm the system. Although I guess dependencies is a problem, however, I am not totally sure how that is looked after now, so I will leave that to discussions from more experienced users.

    /system - everything that is installed when the OS is FIRST installed. Most (if not ALL) users can stay away from this, except to edit the occasional menu.lst, etc.

    And thats it!

    What opinions do you guys have? I'm not saying we need to restructure the file system I just want a debate on this issue.

  2. #2
    Join Date
    Jun 2005
    Beans
    6,115

    Re: Does the linux file structure work?

    So you want the system file structure to be like windows then.
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  3. #3
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Does the linux file structure work?

    Not really, more like a hybrid. And like I said I don't WANT it to be like anything. I just want to understand why there are folder like /etc, /lib, and /bin which to me seems like they serve the same purpose. And I want to understand why a simpler structure won't work.

  4. #4
    Join Date
    Jun 2005
    Beans
    6,115

    Re: Does the linux file structure work?

    Well for me the linux filesystem makes perfect sense, as its the unix filesystem at its core.
    Its not that hard to figure out.
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  5. #5
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Does the linux file structure work?

    Would you care to explain why it makes perfect sense?

  6. #6
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: Does the linux file structure work?

    The reason for a separate /mnt and /media is that /media is for removable media, whereas /mnt is for 'permament' partitions.
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

  7. #7
    Join Date
    Jun 2005
    Beans
    6,115

    Re: Does the linux file structure work?

    Well come on, it doesnt take long to figure out:

    /bin= binaries
    /lib= libraries
    /share= shared files
    /user= the user directories
    /tmp= temporary files
    /media= hard drives
    /opt= optional
    /sys= system files...

    If you cant handle more then C:/program files you are using the wrong OS
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  8. #8
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Does the linux file structure work?

    I knew I'd strike a nerve with some of the more passionate users, but like I said this is merely a debate, I use ubuntu because it serves my purposes, and I like to be able to customize.

    Still your explanation Sunny is something I already know. I know WHAT the folders are for, I want to know WHY they are the way it is.

    If you cant handle more then C:/program files you are using the wrong OS
    so you are saying that unless a system is not inherently complicated its useless?

    like I said /media is fine as is /home and /tmp

    explain to me what is the use of /share, /lib, /bin?

    Thanks Barrucadu for clearing up difference between /mnt and /media, I actually already knew this from another thread, but again is there any point in having a different folder? Except perhaps to make it easier to keep track of whether something is permanent or temporary?

  9. #9
    Join Date
    Jun 2005
    Beans
    6,115

    Re: Does the linux file structure work?

    As I said the linux/unix filesystem is not complicated if you know it, even mac OSX has a similar file structure.
    The /bin binary directory is where most applications are stored
    the library /lib directory is where most of that applications core files are stored
    the share directory is where shared files are, simple enough to understand there.
    I feel the unix filesystem is great for what it does, it keeps the program files apart from the binaries so that if the libraries are corrupted somehow they are more easy to rectify.
    HOME BUILT SYSTEM! http://brainstorm.ubuntu.com/idea/22804/ Please vote up!
    remember kiddies: sudo rm -rf= BAD!, if someone tells you to do this, please ignore them unless YOU WANT YOUR SYSTEM WIPED

  10. #10
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Does the linux file structure work?

    Again that all makes sense but like I said removing a program is very difficult this way. And what is the difference between an applications "core files" and the "application"? Which files are "shared"? How are program files kept apart from binaries if you say most applications are stored in the binary direcotry? Also what are the other folders like /usr for?

Page 1 of 11 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •