Click here to view code image
/
├─fakeetc
└─www
TIP
It is possible for processes that run as root to “break out” of a chroot
environment, so maybe chroot jail is not the most accurate term, but it is
commonly used. It is better to think of this as a means to do some isolated
testing but not truly secure testing.
Using Coreutils
You have already learned about some of the contents of a package of useful
command-line tools called GNU Coreutils. It includes some of the most
commonly used commands, like ls, mv, cp, rm, and cat. It also contains
a ton of lesser-known but incredibly useful tools. This package is installed by
default. Few people ever make use of its richness. You will want to explore it
more deeply. Coreutils contains so much, it is worthy of a chapter and maybe
a book of its own. What we can do here is point you to the GNU website
entry for Coreutils, at https://www.gnu.org/software/coreutils/, and also the
info page at info coreutils (there is no man page for Coreutils).
Reading the Contents of the Kernel Ring Buffer
with dmesg
Although it sounds fancy and ominous, the kernel ring buffer is actually quite
simple—at least conceptually. It records a limited set of messages related to
the operation of the Linux kernel. When it reaches a certain number of
messages, it deletes the oldest message every time a new message is written
to the list. Looking at the contents of the kernel ring buffer with dmesg can
be helpful in determining what is happening with your system. If you enter
the following, you will receive an incredibly long and scary-looking list of
data:
Click here to view code image
matthew@seymour:~$ dmesg
This is too much information to be really helpful. The best use of dmesg,
then, is to combine it with a filter and look for specific entries in the output.
You might search for a part of the system, like “memory,” or a specific