The Linux File System
All users, including super user, have their
own directories where all private data such as documents, addresses or emails
are stored. The Ripper user can only change the central configuration files or
system directories that carry executable files. Learn more about access
permissions and how to change them to suit your needs to change file
In Linux you can choose whether you want to
manage files and folders with the file manager, or whether you want to use a
traditional command line. The latter is usually faster, but some commands
require deeper knowledge of the list of files, creating, deleting, or modifying
files. For more information about commands used to change files, see
“Working with files and directories”. File Manager provides a more intuitive
and graphical way to accomplish these tasks. Learn more about GNOME and KDE
file managers in the GNOME User Guide and KDE User’s Guide. Regardless of the
method you choose: The following sections provide basic information about the
file system and provide an overview of the default directory structure for
In Linux all files and directories resemble
a tree. The upper directory is called a root file system or only / (not to be
confused with the root user). / In Windows system maybe it will be C: . All
other directories in Linux are accessible from the root directory and organized
in a hierarchical structure.
Found Linux file system basics listed below
highlight some of the basic differences between Linux and the Windows / DOS
Unlike the Windows operating system, Linux
does not use backslashes for separate components for the path name; it uses a
backslash instead. For example, data can be stored for Windows users under C:
Documents Mail, while under Linux / Home / Osernam / Litters.
Plates, Engines / Hardware and Manuals
Linux does not use drive letters as Windows
does. On the Linux operating system, you can not tell from the perspective of
only one path name, partition, drive, device, network device, or
Installation and separation
Another important difference between
Windows / DOS and Linux is the concept of installing and removing partitions,
drivers, or directories. During the Windows boot process, the partitions detect
the drivers and assign them a drive letter. However, partitions in Linux
The devices are usually invisible in the
directory tree unless they are connected; this means that the directory tree is
integrated into the file system in a particular location. As a normal user, you
can not access data in a partition or device unless it is inserted. However, do
not worry – most of the time you do not have to manually connect partitions or
devices. During the installation of your system, you can identify which parts
will be installed automatically when you start the system. Removable devices
are usually detected automatically and installed by your system. Desktop
environments such as KDE or Gnome will tell you about the appearance of a new
It may seem complicated or cumbersome at
first sight this installation and separation concept, which provides a great
deal of flexibility: for example, it can be easily installed from another device
on the network in a directory and you can move in this directory as you think
on your local machine.
Sensitivity of the situation
Who distinguishes between the upper and
lower characters in the file system. For example, because of the file name
test.txt, TeST.txt or Test.txt will make a difference in Linux. This also
applies to directories: You can not access a directory named Messages by name.
As in the Windows operating system, files
on Linux can have a file extension, such as .txt, but you do not need to add.
When you start working with Shell, sometimes you are used to listing the
contents of a directory that makes it difficult for beginners to create
differences between files and folders, depending on the commands. Learn more
about some of Shell’s core orders in Shell Essentials. If you use the graphical
file manager in KDE or GNOME (see GNOME user guide and KDE user manual), files
and folders, depending on which display symbolizes the different icons you
Linux, like Windows, is also found in
hidden files with “normal” files. These are usually configuration
files that you do not want to see or access as a normal user. In Linux, hidden
files are referred to as a point (for example, .hiddenfile). (Chapter 1,
Getting Started with KDE Desktop, ? KDE User Manual) can now be rendered as the
manager of a row or shell appearance, you can use a particular command using
the command options “section As described in
File system controls
Because Linux is a multi-user system, each
file in the Linux file system belongs to a user and group. Only one file or
directory (or, of course, root) can be granted access to other users who own
it. Who basically distinguishes between three different types of access
permissions: write permission, read permission and execute permission. You can
access a file or a folder
if you have at least read permission to it. There are several ways to change
the access permissions of files and folders: either traditionally via the shell
or with the help of your desktop’s file manager (see Section “Changing
Access Permissions” (Chapter 1, Getting Started with the KDE Desktop,
?KDE User Guide)). If you have root privileges, you can also change the owner
and the group of a file or folder. Read how to do so in a shell in Modifying File Permissions
more detailed information about file system permissions refer to File Access Permissions. Apart from the
traditional permission concept for file system objects there are also
extensions available which handle permissions more flexibly. Read more in
Chapter Access Control Lists in Linux (?Reference).
2. The Directory Structure
The following table provides a short
overview of the most important higher-level directories you find on a Linux
system. Find more detailed information about the directories and important
subdirectories in the following list.
Table.1. Overview of a Standard
starting point of the directory tree.
files, such as commands that are needed by both the system administrator and
normal users. Usually also contains the shells, such as Bash.
Static files of the
Files needed to
access host-specific devices.
libraries and kernel modules.
Mount points for
Mount point for
temporarily mounting a file system.
Add-on application software packages.
Home directory for
the super user root.
Data for services
provided by the system.
with read-only data.
Variable data such
as log files
Only available if
you have both Microsoft Windows* and Linux installed on your system. Contains
the Windows data.
following list provides more
detailed information and gives some examples which files and subdirectories can
be found in the directories:
Contains the basic shell commands that may
be used both by root and by other users.
These commands include ls, mkdir, cp, mv, rm,
and rmdir. /bin also contains Bash, the default shell in
Contains data required for booting, such as
the boot loader, the kernel, and other data that is used before the kernel
begins executing user mode programs.
Holds device files that represent hardware
Contains local configuration files that
control the operation of programs like the X Window System. The /etc/init.d subdirectory contains scripts that are executed during the boot
Holds the private data of every user who
has an account on the system. The files
located here can only be modified by their owner or by the system
administrator. By default, your e-mail directory and personal desktop
configuration are located here.
Home Directory in a
If you are working
in a network environment, your home directory may be mapped to a directory in
the file system other than /home.
Contains essential shared libraries needed
to boot the system and to run the commands in the root file system. The Windows
equivalent for shared libraries are DLL files.
Contains mount points for removable media,
such as CD-ROMs, USB sticks, and digital cameras (if they use USB). /media generally holds any type
of drive except the hard drive of your system. As soon as your removable medium
has been inserted or connected to the system and has been mounted, you can
access it from here.
This directory provides a mount point for a
temporarily mounted file system. Root may mount file systems here.
Reserved for the installation of additional
software. Optional software and larger add-on program packages, such as the KDE
and GNOME desktop environments, can be found here.
Home directory for the root user. Personal data of root is located here.
As the s indicates, this directory holds utilities
for the superuser. /sbin contains binaries essential for booting,
restoring, and recovering the system in addition to the binaries in /bin.
Holds data for services provided by the
system, such as FTP and HTTP.
that require temporary storage of files use this directory. By default, the
data stored in /tmp I s deleted regularly.
Storing Files in /tmp
Do not store any
files in /tmp that you want to keep. This directory is
automatically cleaned up by the system and files are removed in the process.
/usr has nothing to do with users, but is the
acronym for UNIX system resources. The data in /usr is static, read-only data that can be
shared among various hosts compliant to the File system Hierarchy Standard
(FHS). This directory contains all application programs and establishes a
secondary hierarchy in the file system. /usr holds a number of subdirectories, such as /usr/bin, /usr/sbin, /usr/local, and /usr/share/doc.
Contains generally accessible programs.
Contains programs reserved for the system
administrator, such as repair functions.
In this directory, the system administrator
can install local, distribution-independent extensions.
Holds various documentation files and the
release notes for your system. In the manual subdirectory, find an
online version of this manual. If more than one language is installed, this
directory may contain versions of the manuals for different languages.
Under packages, find the documentation
included in the software packages installed on your system. For every package,
a subdirectory /usr/share/doc/packages/packagename is created that often
holds README files for the package and sometimes examples, configuration files,
or additional scripts.
are installed on your system /usr/share/doc also holds the howto subdirectory in which to
find additional documentation on many tasks relating to the setup and operation
of Linux software.
Whereas /usr holds static, read-only data, /var is for data which is
written during system operation and thus is variable data, such as log files or
spooling data. For example, the log files of your system are in /var/log/messages (only accessible for root).
Only available if you have both Microsoft
Windows and Linux installed on your system. Contains the Windows data available
on the Windows partition of your system. Whether you can edit the data in this
directory depends on the file system your Windows partition uses. If it is
FAT32, you can open and edit the files in this directory. For an NTFS file
system, however, you can only read your Windows files from Linux, but not
modify them. Learn more in Accessing
Files on Different Operating Systems on the same Computer”.