Skip to Main Content
Linux Pocket Guide
book

Linux Pocket Guide

by Daniel J. Barrett
February 2004
Beginner content levelBeginner
200 pages
5h 40m
English
O'Reilly Media, Inc.
Content preview from Linux Pocket Guide

Operating System Directories

/boot

Files for booting the system. This is where the kernel lives, typically named /boot/vmlinuz.

/lost+found

Damaged files that were rescued by a disk recovery tool.

/proc

Describes currently-running processes; for advanced users.

The files in /proc provide views into the running kernel and have special properties. They always appear to be zero sized, read-only, and dated now:

$ ls -l /proc/version
-r--r--r--   1 root   root    0 Oct  3 22:55 /proc/version

However, their contents magically contain information about the Linux kernel:

$ cat /proc/version
Linux version 2.4.22-1.2115.nptl ...

Mostly these files are used by programs. Go ahead and explore. Here are some examples.

/proc/ioports

A list of your computer’s input/output hardware.

/proc/version

The operating system version. The uname command prints the same information.

/proc/uptime

System uptime, i.e., seconds elapsed since the system was last booted. Run the uptime command for a more human-readable result.

/proc/nnn

Where nnn is a positive integer, information about the Linux process with process ID nnn.

/proc/self

Information about the current process you’re running; a symbolic link to a /proc/nnn file, automatically updated. Try ls -l /proc/self a few times in a row: you’ll see /proc/self changing where it points.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Pocket Guide, 2nd Edition

Linux Pocket Guide, 2nd Edition

Daniel J. Barrett
Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins

Publisher Resources

ISBN: 9780596806347Errata Page