0% found this document useful (0 votes)
5 views16 pages

File Structure in Li Unx

The document outlines the structure of the Linux file system, detailing various directories such as the root directory, user binaries, device files, shared libraries, and configuration files. It explains the purpose of each directory, including where system logs, temporary files, and user commands are stored. Additionally, it describes the role of the root user and the root partition in managing the Linux operating system.

Uploaded by

rjeevabharathi7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

File Structure in Li Unx

The document outlines the structure of the Linux file system, detailing various directories such as the root directory, user binaries, device files, shared libraries, and configuration files. It explains the purpose of each directory, including where system logs, temporary files, and user commands are stored. Additionally, it describes the role of the root user and the root partition in managing the Linux operating system.

Uploaded by

rjeevabharathi7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

FILE STRUCTURE IN

LIUNX
Linux File System
❑ The OS stores data on disk drives using a structure called a
file system, consisting of files, directories, and the
information needed to access and locate them.
❑ There are many different types of file systems, and
improvements have been made to filesystems with new
releases, each given a different name, such as ext3, ext4,
xfs, NTFS, FAT, etc.
❑ Linux file system store information in a hierarchy of
directories and files.
File Structure in Linux
A Linux file system consists of organized files stored on a disk
drive or partition. A partition is a designated memory segment
that holds data. Our computer can have memory partitions,
each typically housing its file system.

For data access general purpose computer systems store data,


in a manner, on hard disks (HDD) or similar storage devices.
Maintaining the file system is essential for file retrieval and
organization to save time. Various reasons exist for managing
the file system.
Root Directory and User Binaries

The Root Directory (/) /bin - User Binaries /sbin - System Binaries
The root directory is the main The /bin directory stands for user The /sbin directory stands for
directory, or parent directory, of binaries. It holds the standard system binaries. It holds the root
Linux. Every single file and user commands information, user commands information and
directory starts from the root such as the executable files of can only be accessed by the root
directory. many basic shell commands like user for system maintenance
ls, cp, cd, etc. These programs purposes.
are mostly in binary format and
can be accessed by both the root
and standard user.
/dev - Device Files
Types of Device Files

• Character specific files: Used for serial


communication, such as /dev/null which is a
"black hole" where garbage output is
redirected.

The /dev directory holds the information about the • Block specific files: Used for parallel
hard disk and other devices connected to the communication, such as /dev/sda1 which
system. It contains special files that represent the represents the first partition of the base
physical devices on the computer. machine hard disk.
/lib - Shared Libraries
System Libraries (32-bit) System Libraries (64-bit)
The /lib directory holds the 32- The /lib64 directory stands for
bit shared libraries that support system libraries. It holds 64 bit
the binaries located under the OS information that supports
/bin and /sbin directories. These the binaries located under the
shared libraries are essential for /bin and /sbin.
the proper functioning of the
system.
/var - Variable Data Files

The /var directory is where variable data files


are stored. This includes system log files,
package and database files, email, print
queues, lock files, temporary files, and runtime
data for processes started since the last boot.
/etc - Configuration Files /mnt - Temporary Mount Directory
The /etc directory stands for Edit to Configure. All the The /mnt directory stands for mount directory. It is a
configuration files are stored here. This also contains temporary mount directory where system admins can
startup and shutdown shell scripts used to start/stop mount filesystem.
individual programs.

/run - Temporary runtime Files /sys - Virtual file System


The /run directory contains temporary files that are The /sys is a virtual file system that contains a set of
created by system services and daemons. virtual files that provide an interface to the Linux
kernel. It contain kernel information about the
hardware.
/tmp - Temporary Files /srv - Service Data

/tmp - Stands for temporary files. It holds temporary Stands for service data. It contains server specific
files created by system and users. Files under this services related data information. The /srv directory
directory are deleted when system is rebooted. contains data for services provided by the system. For
example, if you run a HTTP server, it's a good practice
to store the website data in the /srv directory.

/media - Removable Media /opt - Optional Software

Stands for Removable media Devices. Temporary Stands for optional software, contains add-on
mount directory for removable devices. When you application from individual vendors. Traditionally, the
connect a removable media such as USB disk, SD card /opt directory is used for installing/storing the files of
or DVD, a directory is automatically created under the third-party applications that are not available from the
/media directory for them. You can access the content distribution's repository. Add-on applications should
of the removable media from this directory. be installed under either /opt or /opt/. It is default
location for 3rd party package information.
/usr - User System Resources

1 /usr - User Binaries and Program Data


The /usr directory stands for User binaries and program data. It contains binaries/executable files,
libraries, documentation, and source code for second-level system programs. Most of the files
contained therein are read-only for the normal user.

2 /usr/bin - Basic User Commands


The /usr/bin directory contains basic user commands.

3 /usr/sbin or /usr/local/sbin - Administrator Commands


The /usr/sbin or /usr/local/sbin directories contain additional commands for the administrator.

4 /usr/lib and /usr/lib64 - System Libraries


The /usr/lib directory contains 32-bit system libraries for the /usr/bin and /usr/sbin directories, while
the /usr/lib64 directory contains 64-bit system libraries.

5 /usr/include - C and C++ Program Headers


The /usr/include directory contains header files for C and C++ programs.
/boot - Boot Loader Files
The /boot directory contains the files of the kernel and boot

image, in addition to LILO and Grub. Kernel initrd, vmlinuz,

and Grub files are located under /boot.


Home Directories

/home /root
Home directory of standard or normal users. • Home directory of root user.
(Ex: /home/username)
Note: /root is root user home directory which is not
same as /.
/proc - Process
• The /proc directory is NOT a real file system but a virtual file system that is created dynamically by
Linux to provide access to certain types of hardware information and information about the
running processes.
• Any time a process is created in Linux, a corresponding files goes to /proc.
• Each and every process have individual process-ID. By default it have read only permission.
• This process executed in RAM memory. It also contains kernel information.
What Is "root" on Linux?
What Is "root" on Linux?
1. Root Partition (/)

• The root partition (/) is the top-level directory in a Linux filesystem, containing essential system files.

2. Root User

• The root user is the superuser with full system access, used for administrative tasks.

3. Home Directory of Root User (/root)

• The root user's home directory is /root, a private workspace for storing personal files and configurations.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy