Chapter 4 The /Proc Filesystem; A Virtual Filesystem - Red Hat LINUX 7.2 Reference Manual

Hide thumbs Also See for LINUX 7.2:
Table of Contents

Advertisement

Section 4.1:A Virtual Filesystem
4 The /proc Filesystem
The /proc directory contains virtual files that are windows into the current state of the running Linux
kernel. This allows the user to peer into a vast array of information, effectively providing them with
the kernel's point-of-view within the system. In addition, the user can use the /proc directory to
communicate particular configuration changes to the kernel.

4.1 A Virtual Filesystem

In Linux, everything is stored in files. Most users are familiar with the two primary types of files, text
and binary. However, the /proc directory contains files that are not part of any filesystem associated
with your hard disks, CD-ROM, or any other physical storage device connected to your system (except,
arguably, your RAM). Rather, these files are part of a virtual filesystem, enabled or disabled in the
Linux kernel when it is compiled.
By default, when a Red Hat Linux system starts up, a line in /etc/fstab is responsible for mount-
ing the /proc filesystem.
none
The status of whether or not /proc is currently mounted can be determined by typing the mount
command with no arguments. This will display all of your current mounts, and a line similar to this
should appear in the list if /proc is mounted:
none on /proc type proc (rw)
If you would like to mount /proc manually, type this command:
mount -t proc proc /proc
The /proc virtual filesystem is a switch in the configuration of the Linux kernel, one that is turned
on by default. If, for whatever reason, you would like to completely disable /proc on your system,
de-select
/proc file system support
config, or xconfig when rebuilding your kernel. Alternatively, you can simply comment out the
/proc line in /etc/fstab to prevent it from being mounted.
The best way to understand /proc as a virtual filesystem is to list the files in the directory. The
following is only a partial excerpt of such a list:
[root@bleach /]# ls -l /proc
-r--r--r--
-r--r--r--
-r--r--r--
-r--r--r--
dr-xr-xr-x
/proc
proc
within the
1 root
root
1 root
root
1 root
root
1 root
root
2 root
root
defaults
configuration section of config, menu-
File system
0 May
0 May
0 May
0 May
0 May
0 0
3 11:42 cmdline
3 11:42 cpuinfo
3 11:42 devices
3 11:42 dma
3 11:42 driver
59

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LINUX 7.2 and is the answer not in the manual?

This manual is also suitable for:

Linux 7.2

Table of Contents