modifying kernel parameters

Source: Internet
Author: User

Core:/boot/vmlinuz-version

Kernel module:/lib/modules/version

Kernel design: Linux as a single core, modular design

Loaded in module command: Insmod, modprobe

Kernel official website: www.kernel.org

How user space accesses and monitors the kernel:/proc,/sys

Pseudo File System:

/proc/sys: Many of the files in this directory are readable and writable

/sys: Some files can be written


Methods for setting kernel parameter values

The first method of modifying the kernel:

echo VALUE >/proc/sys/dirctory/file

Modify the kernel host name: echo "server name" >/proc/sys/kernel/hostname

The second method of modifying the kernel:

Sysctl-w kernel.hostname= "server name" before this method point represents the kernel directory, which later represents the file


The above two methods of modification, after rebooting the system will be invalid

Methods for permanently modifying kernel parameters:

Modified:/etc/sysctl.conf

This file will not take effect immediately after modification and execution of SYSCTL-P will be effective immediately and permanently.

SYSCTL-A: Show All kernel parameters

Common Kernel Parameters:

/proc/sys/net/ipv4/ip_forward


====================================================

Module path:/lib/modules/

View modules loaded by the current system: Lsmod, Modinfo

Loading a module: Modprobe mod_name

Uninstalling a module: Modprobe-r mod_name

View module Details: modinfo mod_name This command to see the details of the module

Load module: Insmod/mod_path This command requires the input module path

Unload module: Remod mod_name

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

1, do not use this function; 2, compile into kernel module; 3, compile into kernel


This article is from the "Burning Brain" blog, so be sure to keep this source http://rsddn.blog.51cto.com/10840178/1827914

modifying kernel parameters

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.