Installing Accessing Linux Kernel Documentation Centos 7

Kernel is the most important part of an operating system. Linux kernel is an open source monolithic operating system kernel which was conceived and created in 1991 by Linus Torvalds. A very interesting and important aspect of the Linux operating system is the /proc file system. The /proc file system is a mechanism provided, so that kernel can send information to processes.  This is an interface provided to the user, to interact with the kernel and get the required information about processes running on the system.  The /proc file system also allows you to change some parameters of the running system (kernel) with immediate effect. As system administrators, it is important to be able to access documentation about the kernel from the system itself. In this article, we will show you how to access documentation on the Linux kernel and the /proc file system from within the operating system itself.  Let’s Get started Installing Accessing Linux Kernel Documentation Centos 7.

So, let’s get started.

Installing Accessing Linux Kernel Documentation

On a Red Hat or Centos system, we need to install the kernel-doc package to gain access to the kernel documentation. Whereas on a Debian or Ubuntu system, the kernel documentation is installed with the kernel source code. Web-based documentation can be obtained from https://www.kernel.org/doc

We’ll now install the kernel-doc package on our Centos 7 /Red Hat 7 system.

[root@arkit-centos7 ~]# yum list kernel-doc

Available Packages
kernel-doc.noarch 3.10.0-693.11.1.el7 updates

[root@arkit-centos7 ~]# yum install kernel-doc -y

Installed:
kernel-doc.noarch 0:3.10.0-693.11.1.el7

Complete!

The kernel-doc package installs the documentation in the path /usr/share/doc/kernel-doc-3.10.0/Documentation/

[root@arkit-centos7 ~]# ls -ld /usr/share/doc/kernel-doc-3.10.0/Documentation/

This the Documentation/directory contains many text files along with sub-directories which contain more text files. These text files, in turn, contain information about different aspects of the Linux kernel. For example, the file /usr/share/doc/kernel-doc-3.10.0/Documentation/kernel-parameters.txt contains information on a consolidated list of the kernel parameters. This file also contains information on how to modify the values of these parameters.

Sample Document

Given below is a snippet of the file

"This document may not be entirely up to date and comprehensive. The command
"modinfo -p ${modulename}" shows a current list of all parameters of a loadable
module. Loadable modules, after being loaded into the running kernel, also
reveal their parameters in /sys/module/${modulename}/parameters/. Some of these
parameters may be changed at runtime by the command
"echo -n ${value} > /sys/module/${modulename}/parameters/${parm}". "

File is an interesting read and we urge you to take the time to look through it as it contains valuable insights on some of the kernel parameters that we tune during our system administration tasks.

Accessing documentation for the /proc file system

The documentation for the /proc file system resides in the /usr/share/doc/kernel-doc-3.10.0/Documentation/filesystems/ directory in the file /usr/share/doc/kernel-doc-3.10.0/Documentation/filesystems/proc.txt

[root@arkit-centos7 ~]# ls -lh /usr/share/doc/kernel-doc-3.10.0/Documentation/filesystems/proc.txt

This file contains information about different files and directories found inside the /proc file system in a neatly formatted book-like format, Installing Accessing Linux Kernel Documentation. Given below is a snippet of the file

[root@arkit-centos7 ~]# less /usr/share/doc/kernel-doc-3.10.0/Documentation/filesystems/proc.txt
Table 1-1: Process specific entries in /proc
..............................................................................
File Content
clear_refs Clears page referenced bits shown in smaps output
cmdline Command line arguments
cpu Current and last cpu in which it was executed (2.4)(smp)
cwd Link to the current working directory
environ Values of environment variables
exe Link to the executable of this process
fd Directory, which contains all file descriptors
maps Memory maps to executables and library files (2.4)
mem Memory held by this process
root Link to the root directory of this process
stat Process status
statm Process memory status information
status Process status in human readable form
wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan
pagemap Page table
stack Report full stack trace, enable via CONFIG_STACKTRACE

Conclusion

In this quick article, we showed you how to install documentation for the Linux kernel on your Red Hat or Centos system and we also mentioned a couple of the files you might be interested in. Installing Accessing Linux Kernel documentation is very easy process. We hope that you take the time to install and read through the documentation to be able to better understand how different parts of the kernel work together to run a fully functional operating system.

Related Articles

RHEL 7 / Centos7 Booting Process Explained

Learners Guide Written by Arkit

Recover forgotten root password from Ubuntu

Official Docs

Thanks for your wonderful Support and Encouragement

Sahil Suri

I am a system administrator who loves to learn and share my knowledge with the community. I've been working in the IT industry since 2011.

Leave a Reply

Your email address will not be published. Required fields are marked *