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)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A162 - Web Application Deployment - Backups and File System Management [153] Linux - where to put swap space - (2004-12-16)
[334] Symbolic links and hard links - (2005-06-02)
[554] What backup is adequate? - (2006-01-04)
[593] Finding where the disc space has gone - (2006-02-06)
[703] Copying files and preserving ownership - (2006-04-28)
[735] Boys will be boys, saved by Ubuntu - (2006-05-27)
[754] tar, jar, war, ear, sar files - (2006-06-10)
[1013] Copy multiple files - confusing error message from cp - (2006-12-30)
[1023] Finding public writeable things on your linux file system - (2007-01-06)
[1288] Linux run states, shell special commands, and directory structures - (2007-08-03)
[1439] Linux / Unix - layout of operating system files - (2007-11-20)
[1765] Dialects of English and Unix - (2008-08-21)
[1801] Will your backups work if you have to restore them? - (2008-09-18)
[1893] Some Linux and Unix tips - (2008-11-18)
[2299] How much space does my directory take - Linux - (2009-07-20)
[4056] An overpractical test of our backup strategy! - (2013-03-30)
[4063] Backups by crossover between network centres - setting up automatic scp transfers - (2013-04-13)
[4115] More or less back - what happened to our server the other day - (2013-06-14)
[4390] Checking MySQL database backups have worked (not failed) - (2015-01-10)
[4400] Commenting out an echo killed my bash backup script - (2015-01-19)
[4405] Backup procedures - via backup server - (2015-01-24)
[4481] Extracting data from backups to restore selected rows from MySQL tables - (2015-05-01)
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