Understanding the Linux File System / Structure
Dear All
This is my first post to Linux.co.uk and I'm a virtual novice to the world of Linux.
I have just installed openSUSE 10.3 and all went well.
However, as good as KDE maybe, I need to explore the power behind KDE namely the CLI.
I'am happily working my way through numerous books exploring the
CLI with no problems. However I don't understand the file systems
structure. The books talk about /etc this and /sbin that. At the moment
it all appears to be a random spread of directories with no structure.
Is there any information showing the file systems struture I could refer to?
Info such as, applications are generally installed here, user files are put here, logs are here etc.
Any assistance would be greatly appreciated.
A slighty baffled - Tracyisland
Hello,
Welcome to linux.co.uk!
In linux, everything can be found under the system root, or '/'. It
doesn't matter if you have 5 hardrives with 10 partitions, everything
appears as a folder underneath '/'.
Each linux distro is slightly different in it's implementation, but there are some standards:
/home/[username] - All user files contained here. Anything that
you've worked on, your firefox/thunderbird/kmail profiles live here.
/etc/ - All configuration files live here. Everything from the apt
source lists (/etc/apt/sources.lst), the firehol config
(/etc/firehol/firehol.conf) to the X-system config
(/etc/X11/xorg.conf).
/bin/ - Essential binary files in the system. Usually small utilities like chmod, cp and rm.
/usr/ - Shareable data (but read only). Tends to be non-essential
stuff (not having it won't necessarily kill your system immediately,
but probably will make it un-bootable...), software installed on the
system, any program documentation.
/var/ - variable stuff.. program caches, libraries, temporary space, printer spool space, and system logs
/sbin/ - system binaries. Without these your system won't boot. Or do much of anything..
/tmp/ - temporary file storage. Wiped regularily.
/dev/ - Devices. In Linux (Unix) almost everything is a file. This
includes devices. If you wanted to mount a hardrive, you'd probably
mount /dev/sda1/ (or similar)
/lib/ - essential system libraries (drivers/kernel modules)
/mnt/ - a folder for you to mount temporary file systems
/opt/ - sometimes used for program data storage, sometimes used to install programs to
/root/ - home directory for the "root" user. (Root user is the
system admin, you can do *ANYTHING* as the root user. If you're logged
on as it, use with extreme caution. You won't get warned that you're
about to destroy your linux install...)
/proc/ - System process holders & status readouts
(sometimes):
/media/ - folder to mount removable drives to
Thats pretty much it, as far as I know. There may well be more
information floating around on the interweb, if you do a googlesearch.
HTH...
Sorry for my belated reply (I've been studying for a BGP exam that I hope to sit soon).
Anyway, thank you both for your replies. They have been very
helpful and much appreciated. Finally my SUSE box is starting to reveal
its secrets!! In the period since my original post I have now
successfully setup some shares using SAMBA and an FTP server too. All
via the CLI (not YaST). Next is a web proxy, Squid, then postfix or
sendmail.
Finally some links that I think beautifully exhibit the power of Linux -
www.fubra.com/blog/2007/04/first-mac-mini-bgp-routers-on-worlds.html
www.fubra.com/blog/2007/10/mac-mini-bgp-routers-part-2.html
Thanks again for all your help
FAB - Tracyisland

