Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
42 views

A Beginner's Guide To Disks and Disk Partitions in Linux

The document describes important Linux system directories and their purposes. The root directory / contains all other files and directories. The /bin and /sbin directories contain essential executable programs, while /boot contains kernel and boot files. Device files are stored in /dev, system configuration files in /etc, and user home directories in /home. Libraries are in /lib and temporary files in /tmp. The /usr and /var directories each contain numerous important subdirectories for programs, data, logs and more.

Uploaded by

Salim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

A Beginner's Guide To Disks and Disk Partitions in Linux

The document describes important Linux system directories and their purposes. The root directory / contains all other files and directories. The /bin and /sbin directories contain essential executable programs, while /boot contains kernel and boot files. Device files are stored in /dev, system configuration files in /etc, and user home directories in /home. Libraries are in /lib and temporary files in /tmp. The /usr and /var directories each contain numerous important subdirectories for programs, data, logs and more.

Uploaded by

Salim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Table 7-2: Linux System Directories

Directory

Description

Root directory that forms the base of the file system. All files and directories are contained logically in
the root directory, regardless of their physical locations.

/bin

Contains the executable programs that are part of the Linux operating system. Many Linux commands,
such as cat, cp, ls, more, and tar, are located in /bin.

/boot

Contains the Linux kernel and other files the LILO and GRUB boot managers need (the kernel and other
files can be anywhere, but it is customary to place them in the /boot directory).

/dev

Contains all device files. Linux treats each device as a special file; all such files are located in the device
directory /dev.

/etc
Contains most system configuration files and the initialization scripts (in the /etc/rc.d subdirectory)

/home

Conventional location of the home directories of all users. User naba's home directory, for example, is
/home/naba.

/lib

Contains library files, including the loadable driver modules, needed to boot the system

/lost+found

Directory for lost files. Every disk partition has a lost+found directory.

/mnt

A directory, typically used to mount devices temporarily, such as floppy disks and disk partitions. Also
contains the /mnt/floppy directory for mounting floppy disks and the /mnt/cdrom directory for
mounting the CD-ROM drive. (Of course, you can mount the CD-ROM drive on another directory as
well.)

/proc

A special directory that contains information about various aspects of the Linux system
/root

The home directory for the root user

/sbin

Contains executable files representing commands typically used for system-administration tasks.
Commands such as mount, halt, umount, and shutdown reside in the /sbin directory.

/tmp

Temporary directory that any user can use as a scratch directory, meaning that the contents of this
directory are considered unimportant and usually are deleted every time the system boots

/usr

Contains the subdirectories for many important programs, such as the X Window System, and the online
manual

/var

Contains various system files (such as logs), as well as directories for holding other information, such as
files for the Web server and anonymous FTP server

The /usr and /var directories also contains a host of useful subdirectories. Table 7-3 lists a few of the
important subdirectories in /usr. Table 7-4 shows a similar breakdown for the /var directory.
Table 7-3: Important /usr Subdirectories

Subdirectory

Description

/usr/X11R6

Contains the XFree86 (X Window System) software

/usr/bin

Contains executable files for many more Linux commands, including utility programs commonly
available in Linux, but is not part of the core Linux operating system

/usr/games

Contains some Linux games such as Chromium, and Maelstrom

/usr/include

Contains the header files (files with names ending in .h) for the C and C++ programming languages; also
includes the X11 header files in the /usr/include/X11 directory and the kernel header files in the
/usr/include/linux directory

/usr/lib

Contains the libraries for C and C++ programming languages; also contains many other libraries, such as
database libraries, graphical toolkit libraries, and so on

/usr/local

Contains local files. The /usr/local/bin directory, for example, is supposed to be the location for any
executable program developed on your system.

/usr/sbin

Contains many administrative commands, such as commands for electronic mail and networking

/usr/share

Contains shared data, such as default configuration files and images for many applications. For example,
/usr/share/gnome contains various shared files for the GNOME desktop; and /usr/share/doc has the
documentation files for many Linux applications (such as the Bash shell, mtools, and the GIMP image
processing program).

/usr/share/man

Contains the online manual (which you can read by using the man command)

/usr/src

Contains the source code for the Linux kernel (the core operating system)

Table 7-4: Important /var Subdirectories


Subdirectory

Description

/var/cache

Storage area for cached data for a applications

/var/lib

Contains information relating to the current state of applications

/var/lock

Contains lock files to ensure that a resource is used by one application only

/var/log

Contains log files organized into subdirectories. The syslogd server stores its log files in /var/log and the
exact content of the files depend on the syslogd configuration file: /etc/syslog.conf. For example,
/var/log/messages is the main system log file, /var/log/secure contains log messages from secure
services such as sshd and xinetd, and /var/log/maillog contains the log of mail messages.

/var/mail

Contains user mailbox files


/var/opt

Contains variable data for packages stored in /opt directory

/var/run

Contains data describing the system since it was booted

/var/spool

Contains data that's waiting for some kind of processing

/var/tmp

Contains temporary files preserved between system reboots

/var/yp

Contains Network Information Service (NIS) database files

You might also like