Linux kernel and kernel modules

Source: Internet
Author: User

The composition of the 1.Linux

consists of kernel and corresponding function module, kernel/boot/vmlinuz-"kernel version number" file, module file in/lib/modules/version number/directory (for. ko files)

In the/proc/sys/directory can modify the file to modify the kernel parameters (note that these files can not be opened with Vim to modify the only way to use redirection)

echo "www.luochen.com" >/proc/sys/kernel/hostname

You can change that, too.

sysctl-w kernel.hostname= "luochen.com" can take effect immediately, but cannot be permanently effective

2./etc/sysctl.conf files are permanently valid and need to be restarted

sysctl-p: Reread config file, immediately effective

SYSCTL-A: Show all kernel parameters and their values

3. Kernel Module Management

A.lsmod: View all loaded Modules

B.modprobe mod_name: Loading a module

C.modprobe-r mod_name: Uninstalling a module

D.modinfo mod_name: View specific information about the module

E.insmod/path/to/module_file: Load Module

F.rmmod mod_name: Removing modules

G.depmod/path/to/modiles_dir: Building Module dependencies

4. Kernel compilation

Features in the kernel, in addition to the core functions, at compile time, most of the features have three choices:

1. Do not use this function

2. Compile into kernel module

3. Compile into kernel

5. How to manually compile the kernel

A. Make Gconfig:gnome desktop environment needs to install the Graphics Development Library Group GNOME Software Development

Make KCONFIG:KDE desktop environment requires installation of the Graphics Development Library Group KDE software development

Here's another way to use it.

Make Menuconfig

B.make

C.make Modules_install

D.make Install

E. Restarting the new system

F. Manually compiling the kernel is to try not to use remote connections (compilation takes a long time and may be interrupted unexpectedly)

If you must use the screen command only remotely

yum-y Install screen installation screen   

Screen command:

Screen-ls: Displays the already established screen

Screen: Open a new display directly

CTRL + A, D: removing the screen

Screen-r ID: Revert back to a screen

Exit: Exit

G. Two compile-time cleanup, before cleaning, back up the configuration file, if necessary. config:

Make clean or

Make Mrproper





This article is from "Luo Chen's blog" blog, please be sure to keep this source http://luochen2015.blog.51cto.com/9772274/1651912

Linux kernel and kernel modules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.