[Home]LinuxBox/WhereStuffIsKept

ec2-3-145-23-123.us-east-2.compute.amazonaws.com | ToothyWiki | LinuxBox | RecentChanges | Login | Webcomic

Mostly based on where /Debian and /DeadRat^H^H^H /RedHat? put stuff.

See also the [Filesystem Hierarchy Standard].


Important directories



 /
Everything.

 /home
Users' home directories. Usually the only place other than /tmp that users are allowed write access to is their home directory.

 /etc
System configuration files. With the exception of /etc/mtab, these are only changed by the user or the packaging system when installing, removing or re-configuring software (at least on /Debian).

 /sbin
/usr/sbin
Software for use by the root account only. Usually one contains symlinks to files in the other. Prepackaged distributions tend to put a few tens of megabytes of stuff in /sbin and a few kilobytes of links to it in /usr/sbin.
(On many distributions (e.g. Debian) /sbin and /bin contain just enough programs to get the /usr partition mounted, and /usr contains the rest - this lets you have a small / partition (small so it's unlikely to get corrupted, and just big enough for disaster recovery) and a large /usr partition, which was rather important before live-CDs became popular.
Incidentally, are you sure about the symlinks? There's no real reason for a program to be in both /sbin and /usr/sbin)

 /bin
/usr/bin
Software for use by everyone. Usually one contains symlinks to files in the other. Prepackaged distributions tend to put a gigabyte or two of stuff in /usr and its subdirs and a few kilobytes of links to it in /bin, lib etc.; some don't bother with the links.
(See above.)

 /lib
/usr/lib
Shared libraries and other files specific to the hardware architecture go here. One directory usually contains symlinks to the other.
(On distributions with a small root partition, /lib contains just enough libraries for the contents of /bin and /sbin to work)

 /usr/share
Shared files go here, if they are not specific to a particular hardware architecture. For example, icons, python modules and such.

 /boot
Kernel, bootloader configuration and other related data.

 /tmp
Temporary data, typically wiped on bootup.

 /var
Logs and information generated at runtime.

 /dev
Devices (e.g. /dev/hd* are things that for most intents and purposes look like files containing the raw data in your hard disk partitions)

 /proc
Dynamic information and stuff, including per-process information, stuff needed by device drivers, hardware information (processor, mobo and drive parameters), kernel image, ....  Much of it is human-readable. Users, don't edit! (unless you know what you are doing; mostly stuff from this is accessed by various tools like top and hdparm but it's worth having a look so you know what's there).

 /sys
New to Linux kernel 2.6, this represents the kernel's device hierarchy, and is beginning to replace /proc as the preferred way for programs to interface with the kernel. This is like MS Windows' Device Manager viewing by connection.



 /usr/src
When prepackaged distributions are asked to install sources, they typically put them here

 */X11/*
Configuration files and binaries for X software tend to be in a subdirectory called X11 or similar of one of the directories listed above.

 /etc/rc.d or /etc/init.d
Scripts that run on startup and when you switch runlevels go in here. Usually editing these scripts is not the intended method for configuring system startup; there are a number of very good manual pages on how to do it. (e.g. update-init.d on /Debian)

 /etc/defaults
Configuration for the init.d scripts (at least on /Debian).

 /etc/pam.d
Security configuration for programs that use /PAM (pluggable authentication modules).




Important files



IIRC, all of these have manual pages describing their syntax, as well as GUI tools for generating them. - MoonShadow
(PeterTaylor) Not that the manual pages always give you sufficient information to actually edit them safely. I've had bad experiences with /etc/fstab.

 /etc/fstab
What partitions get mounted where with what settings when you start the machine up and/or use the mount command

 /etc/mtab
What partitions are mounted where with what settings right now

 /etc/lilo.conf
Configuration file for LILO (linux loader). (NB You have to re-run /sbin/lilo for modifications to take effect. Do not do this unless you have a boot floppy/CD handy.)

 /etc/resolv.conf
List of nameservers the machine uses; also the search path (default DNS suffixes)

 /var/log/dmesg and /var/log/messages
The log files recording activity during the boot up process.

.
.
.
(add more here)

ec2-3-145-23-123.us-east-2.compute.amazonaws.com | ToothyWiki | LinuxBox | RecentChanges | Login | Webcomic
This page is read-only | View other revisions | Recently used referrers
Last edited November 12, 2005 7:46 am (viewing revision 10, which is the newest) (diff)
Search: