Personal tools
You are here: Home Forums Help and Advice (Reg) Understanding the Linux File System / Structure

Understanding the Linux File System / Structure

4.0
Up to Help and Advice (Reg)

Understanding the Linux File System / Structure

Posted by tracyisland at June 29. 2008

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

Re: Understanding the Linux File System / Structure

Posted by Johnathon Tinsley at June 29. 2008

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...

Re: Understanding the Linux File System / Structure

Posted by Gareth Bult at June 29. 2008

More details here;
http://www.pathname.com/fhs/

Re: Understanding the Linux File System / Structure

Posted by tracyisland at June 29. 2008

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

Powered by Ploneboard
Tell us about yourself!
How many computers do you administer?







Votes : 33 Results
Polls
 
Data Recovery Laptop
All is not lost if your laptop crashed and you lost data. Give it to the data recovery specialists.
Printer Cartridges
Printer cartridges are much cheaper when you buy them here.
printing ink
Don't worry about running out of ink when printing. Order online or freephone before 4pm for same day dispatch! Free delivery!
Remote support >
Connect offers the best support for IT related issues. Give them a call.
DEDICATED Hosting
Do use a hosting service that contributes to being 'green'.
BEST BROADBAND PROVIDER
It makes sense that when you choose the best broadband provider, you will get the best service.
Reverse Phone Lookup
Type in any phone number to instantly find out owner's name, address and more.
Laptop
Visit CheckCost UK to compare, review and buy latest computers, laptops, scanners, printers, hard drives, LCD monitors and many more.
Software
Visit Ecost Software to find your favourite brands like Adobe, Apple, Microsoft, Autodesk, Codegear, Corel, Symantec and more.
IT SUPPORT
Award winning IT Services from London provider Wavex offering support, advice, and training