Understanding the transitory /proc filesystem

Due Processes

Article from Issue 150/2013
Author(s):

The mysterious /proc virtual filesystem is a rich mine of information about everything in your system.

In productivity computing, typical users have limited use for the /proc directory. However, when you want information about all aspects of your system, including hardware, the processes running, and what is happening in the kernel, /proc is a concentrated source of fast and current information.

When learning Linux, you probably heard that everything is represented in the operating system as a file. Most of the files are text or binary, but others are more specialized, such as directories, or the contents of the /dev directory, which represent hardware devices and partitions. The /proc directory and its contents are another specialized type of file, making up a virtual or pseudo-filesystem.

What these terms mean is that /proc does not have a permanent existence on a hard drive the way an office suite data file or an application binary does. Instead, it is created as needed. If you look at the contents of /proc with the usual file management commands, you will see that everything has a current time stamp, and that most of the files have a size of 0 bytes. Presumably, too, /proc's special status explains why, if you use ls --color, either directly or as an alias for ls, the directories and other special types of files are not color-coded.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Command Line – Probing /proc

    The mysterious /proc virtual filesystem is a rich mine of information about everything in your system.

  • Exploring /proc

    The Linux /proc virtual filesystem offers a window into a running system – look inside for information on processes and kernel activity.

  • Go Programming

    The Go programming language combines type safety with manageable syntax and an extensive library. We take you through a programming example.

  • PSI

    Pressure Stall Information (PSI) is a new feature that gives users a better view of resource contention.

  • Ask Klaus!

    Klaus Knopper answers your Linux questions

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News