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

Understanding the Linux File System / Structure

3.5
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
New Forums

We are now in the process of phasing out this Forum in favour of the new Forums at forum.linux.co.uk. Please consider posting any requests to the new Forum. (you will need to re-register with the new forum I'm afraid)

Poll
3G Netbook
If linux.co.uk were to offer a Netbook with a SUPPORTED 3G connection, would you be interested?




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






 ,
Site Navigator
 
Data Recovery Raid
Your RAID system crashed on you, leaving you, minus your data. Get it back!
Inkjet Printer Inks
Save time and buy all your inkjet printer inks here.
IT Support
Professional IT support right when you need it. Full computer network support - provide by skilled professionals.
IT Services
Strategic IT Services, support and Consultancy for the Financial Services community from Etonbridge Consulting
IT Support Bristol
IT Services and IT Support provider based in Bristol. Computer maintenance with server support as standard.
wireless mobile internet
Compare wireless mobile internet deals on Mobile Broadband Genie, the independent UK price comparison website.
Introduction to Linux
Comprehensive 5 day introductory course in London, 8-12 March/10-14 May. Covers installation, command-line, Gnome, power tools, Shell scripting, Office Applications and more.
IT Support
Managed Perfectly by Littlefish The highest ranking MSP in the UK
IT Support - Netzen
IT Support & IT Outsourcing, Netzen is an IT Support company with offices in London, Bristol & Bath. We provide Linux Support, Apple Mac support.
IT Support
For The Best IT Support In London Make Our IT Department Your IT Department. Microsoft Gold Certified Partner.
IT SERVICES
Award winning IT Services from London provider Wavex offering support, advice, and training
IT Support
A full range of services, from hosting, data recovery and day-to-day support through to Board-level IT advice through our virtual IT Director offering.
Data Recovery
Professional data recovery services