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!]
(written 2008-05-20)
23c2
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A162 - Web Application Deployment - Backups and File System Management [4063] Backups by crossover between network centres - setting up automatic scp transfers - (2013-04-13)
[4056] An overpractical test of our backup strategy! - (2013-03-30)
[2299] How much space does my directory take - Linux - (2009-07-20)
[1893] Some Linux and Unix tips - (2008-11-18)
[1801] Will your backups work if you have to restore them? - (2008-09-18)
[1765] Dialects of English and Unix - (2008-08-21)
[1439] Linux / Unix - layout of operating system files - (2007-11-20)
[1288] Linux run states, shell special commands, and directory structures - (2007-08-03)
[1023] Finding public writeable things on your linux file system - (2007-01-06)
[1013] Copy multiple files - confusing error message from cp - (2006-12-30)
[754] tar, jar, war, ear, sar files - (2006-06-10)
[735] Boys will be boys, saved by Ubuntu - (2006-05-27)
[703] Copying files and preserving ownership - (2006-04-28)
[593] Finding where the disc space has gone - (2006-02-06)
[554] What backup is adequate? - (2006-01-04)
[334] Symbolic links and hard links - (2005-06-02)
[153] Linux - where to put swap space - (2004-12-16)
Some other Articles
Old Sarum airfield brings back fond memoriesls command - favourite optionsLooking for files with certain characteristics (Linux / Unix)Easy conversion - image formats, currencies and distancesThe tourists guide to LinuxExchange Rates - PHP with your prices in your users currencyUsing cookies and sessions to connect different URLs - PHPSeeing how others do it - PHP trainingUsing a utility method to construct objects of different types - PythonA lack of technical content