Understanding the /proc filesystem

If you cd into the /proc directory of any Linux distro and take a look around, you'll be excused for thinking that there's nothing special about it. You'll see files and directories, so it looks like it could just be another directory. In reality, though, it's very special. It's one of several different pseudo-filesystems on the Linux system. (The definition of the word pseudo is fake, so you can also think of it as a fake filesystem.)

If you were to pull the primary operating system drive out of a Linux machine and mount it as the secondary drive on another machine, you'll see a /proc directory on that drive, but you won't see anything in it. That's because the contents of the /proc directory is created from scratch every time you boot a Linux machine, and then it's cleared out every time you shut down the machine. Within /proc, you'll find two general classes of information:

  • Information about user-mode processes
  • Information about what's going on at the kernel-level of the operating system

We'll look at user-mode processes first.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.123.120