LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to make sense of Linux files (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-make-sense-of-linux-files-306174/)

jnsg 03-26-2005 12:39 AM

Trying to make sense of Linux files
 
Hi, I have recently started trying to get into Linux, I have Slack10 up and running on my laptop (so I can mess with it during downtime on campus) and I'm determined to use FVWM and customize it to my needs/tastes. One of the things that is still a little troubling for me right now, though, is the whole concept of how Linux arranges its files. Under Windows, all the system stuff was thrown in a directory, all the programs were in a directory, and all the documents were in a directory (essentially). I realize that Linux is a lot more open about its inner workings (though ironically more secure with them) so it makes sense that its files would be more scattered around. I can live with that, but the organization of files that I might actually be using is a bit too much for me. For instance, from what I have gathered so far, the executables for programs go in a single directory, and the configuration files go in another for instance.
Can anyone just give me a rundown of what the file structure is under Linux? And, when I install something (Firefox) which puts all its stuff in its own directory, where is the place to put it?
Thanks in advance for tolerance of my newbishness :)

tangle 03-26-2005 01:12 AM

This pretty much explains it.
http://www.linuxforum.com/linux-filesystem.php

jnsg 03-26-2005 01:55 AM

Ah, nice. Thanks, I'll get right to reading that.

EDIT:
OK, I don't want to sound impatient, because I do plan on reading through it all, but would I put the firefox directory in /opt then? (I'm mainly concerned with this program because it's the first step in making my first Linux system usable).

slakmagik 03-26-2005 03:00 AM

If it's just for you, you could stick it in $HOME. Otherwise, yeah, /opt is good. However, I think there's a way to get it distributed throughout the system with a /usr or /usr/local prefix. Whichever you want.

bin and sbin is where the executables live, lib where the libs are, etc where the configs, var where variable data (logs and spools and the like) live, tmp where temporary files go. /boot for the kernel. The root hierarchy for vital system stuff, a mostly repeated /usr for the user apps, a mostly repeated /usr/local for the add-on normal apps, a mostly repeated /opt for the large or weird packages. And so on. You'll get it. But reading the FHS, while strongly advised, shouldn't be required reading for a Firefox install. :D

Komakino 03-26-2005 04:17 AM

The linux approach makes sense...if you have all the libs in one place that means there's only one place for the loader to search when it needs a library. If you have all the binaries in one place then you can add that location to the path so you only have to type a program name to run it. The windows approach means you either have to have every directory in the path, or you have to navigate to a program's directory in order to run it.

muzza 03-26-2005 04:52 AM

I LOVE you're signature KomaKino

chbin 03-26-2005 05:27 AM

Actually once you learn the thedirectoy hiarchy it makes perfect sense. You can keep every clean and know where everything is. But yeah at first it seems overwhelming.

In windows they have the entire OS in WINDOWS folder... temp files, config files, libraries, executables, drivers, log files, random stuff. It's a complete mess. A file here, a file there. There is no standard place to put anything, especially installed programs which wind up completely spamming you system. Little here, a little there. Then eventually just to get back to a responsive system. Boot-disk... "format c:"

David Haas 03-26-2005 09:24 AM

jnsg--The file structure is, of course, logical, and stems from the "root" directory, which is thought of as the top one from which the others decend --like an upside-down tree. You should study the structure in a book, like "How Linux Works" by Brian Ward. One thing which is probably confusing you is that directories (folders in Windows) with the same name can be in various places in the directory/file tree. For example, bin directories can be /bin, /usr/bin, /usr/local/bin, etc. So, although executables are put in bin directories, they can be in fact in different bin directories. Where it's best to put executable files is somewhat standardized. The books will explain this for you. I hope this orients you somewhat.
David Haas (still a newbie)


All times are GMT -5. The time now is 06:58 AM.