Main Content

The tourists guide to Linux

Archive - Originally posted on "The Horse's Mouth" - 2008-05-20 16:14:58 - Graham Ellis

When visitors come to this country for a touring holiday, they'll land at Gatwick and take in London, Stonehenge, Bath, Stratord-upon-Avon, York (pehaps) and Edinburgh. That will give them a flavour but none of the details (and of course they'll miss gems such as Melksham and Radstock). But they will get a flavour and want to come back

The Linux File system, even on a newly built system, has a very large number of files and directories ... but there are a few areas that you'll really want to be aware of. Let's have a quick look around, starting at the root.

Under /

/mnt - where other devices are mounted "casually"

/bin - "binary" - i.e. programs
Specifically - programs that are needed early in boot process

/etc - config files and info

/dev - devices

/home - user's home directories
Often mounted from a separate slice / partition
(slice is a p.c. alternative word to partition!)

/lib - "programmer's libraries"
BUT BE CAREFUL - they are dynamically loaded so you must keep 'em

/sbin "SYSTEM binary" - i.e. programs that only the admin needs
Specifically - programs that are needed early in boot process

/var - things that vary within the main system as it runs
(e.g. mail and print queues, system logs)

/usr - the main operating system - things that do NOT vary
This is HUGE. more to follow below!

/tmp - temporary file
A scratch area for anyone to use!

LETS GO DEEPER ;-)

In /usr ... you find a bit more of the same!

/usr/bin
/usr/sbin
/usr/etc
/usr/lib
/usr/tmp
Same as in root ... but not needed at early boot stage! (History - in the past, when discs were expensive, most of the OS was shared over the network on some installations and /usr was a mount point) and also ...

/usr/share
Things which don't change even between architectures - e.g. fonts, time zone definitions, manual pages ...

/usr/include
Programmer's include file

/usr/local
see further below!

LETS GO DEEPER ;-)

In /usr/local ...

... you find the things you have added locally to the operating system. That's great because you keep it all in one place and can back up from system "Trowbridge" and install on system "Chippenham" without having to do all the build work on Chippenham. You can also backup /usr/local, upgrade or reinstall the base OS, then restore the backup ... oh - and you can also save the need to back up the rest of /usr very often (and it's huge!) as it never changes!

/usr/local/bin
/usr/local/sbin
/usr/local/etc
/usr/local/lib
/usr/local/share
/usr/local/include

/usr/local/src
Sometime an "src" turns up for source code as do things like ...
/usr/local/apache2
/usr/local/tomcat
/usr/local/java
/usr/local/[other application name!]