Linux command: Kernel kernel module management, compiling/screen

Source: Internet
Author: User
Tags bz2

Kernel design style:

Redhat,suse

Core: Dynamic load kernel module in directory/boot/vmlinuz-version number

Kernel:/lib/modules/"kernel version number command directory"/

vmlinuz-2.6.32

/lib/modules/2.6.32/

Single Core: Linux

Core: KO (Kernel object)

Micro-kernel: windows,solaris (thread)


Kernel initialization process:

1, equipment detection

2. Driver initialization (May load driver module from INITRD (INITRAMFS) file)

3. Mount the root file system as read-only

4. Loading the first process init (pid:1)


How the user control accesses and monitors the kernel:

/proc,/sys

Pseudo file System

/proc/sys: Files in this directory a lot of things to read and write

/sys/: Some files can be written


To set kernel parameter values:

1. Use echo VALUE >/proc/sys/to/somefile to write parameters to the kernel file via echo input redirection

2. Sysctl-w kernel.hostname= "Xuelinux" to modify host name

These two methods can take effect immediately, but fail after reboot


If you want to be permanent, but not effective immediately, you need to modify the/etc/sysctl.conf configuration file

Once the modified file is complete, the following command can be executed immediately:

Sysctl-p

SYSCTL-A: Show all kernel parameters and their values


Kernel Module Management:

Lsmod: View all kernel modules

Modprobe mod_name: Loading a module Mod_name module name Usage:modprobe floppy

Modprobe-r mod_name: Uninstalling a Module usage:modprobe-r floppy

Modinfo mod_name: View specific information for a module Usage:modinfo floppy

Insmod/path/to/module_file: Loading module to specify the specific file path of the module

Rmmod mod_name: Removing a module

Depmod/path/to/modiles_dir: Generate the module's dependent files in the directory


Functions in the kernel in addition to the core functions, in the compilation is, most of the features have three options:

1, do not use this function;

2, compile into kernel module;

3, compile into the kernel;


Screen command:

Screen-ls: Displays the already established screen

Screen: Open a new display directly

CTRL + A and press D: Remove screen to run the screen behind

Screen-r ID: Restore back to a screen;

Exit: Exit the current screen


* How to compile kernel manually: Uname-r view kernel version


Make Gconfig:gnome desktop environment, need to install graphics development Library

Make KCONFIG:KDE desktop environment, need to install graphics development Library

Make Menuconfig:


First download the kernel files and extract them into the/USR/SRC directory.


[[email protected] ~]# LS see if the downloaded kernel compressed package exists

Anaconda-ks.cfg install.log linux1.jpg Public video document music

httpd-2.0.55 install.log.syslog linux-2.6.38.tar.bz2 template Picture Download desktop

[[Email protected] ~]# tar xf linux-2.6.38.tar.bz2 -c/usr/src/ Extract to the specified directory/usr/src

[[email protected] ~]# cd/usr/src into the directory

[[email protected] src]# ls

Debug Kernels linux-2.6.38

[[Email protected] src]# CD linux-2.6.38/ into the newly unzipped kernel directory

[[email protected] linux-2.6.38]# ls

Arch Crypto FS Kbuild maintainers README Security Virt

Block documentation include Kconfig Makefile reporting-bugs Sound

COPYING drivers init kernel mm samples Tools

CREDITS Firmware IPC lib net scripts usr

[[email protected] linux-2.6.38]# make Gconfig go to the Graphics configuration kernel interface, add or remove functions and devices within the kernel, select the desired kernel module Block or function


make to compile

Make Modules_install first compile the kernel module that was defined by the graphical interface

Make Install build installation


Two compile-time cleanup: Before cleaning up, if necessary, backup the configuration file first. config;

Make Gconfig into the graphics configuration kernel interface, adding or removing functions and devices within the kernel, selecting the required kernel modules or functions


Make clean cleanup before the compilation cache

Make Mrproper changes to the. config file before cleaning

make to compile

Make Modules_install first compile the kernel module that was defined by the graphical interface

Make Install build installation

The kernel is compiled with a reboot.

This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1881165

Linux command: Kernel kernel module management, compiling/screen

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.