Sysctl Command Explanation

Source: Internet
Author: User

Turn

Personal General sysctl-p or sysctl-a more use

Sysctl The kernel parameters that are configured and displayed in the/proc/sys directory. You can use Sysctl to set up or reset networking features such as IP forwarding, IP fragment removal, and source routing checks. Users only need to edit the/etc/sysctl.conf file to manually or automatically perform the functions controlled by sysctl.

Command format:

Sysctl [-n] [-e]-W variable=value

Sysctl [-n] [-e]-P <filename> (default/etc/sysctl.conf)

Sysctl [-n] [-e]-A

The meaning of common parameters:

-W temporarily changes the value of a specified parameter, such as

Sysctl-w net.ipv4.ip_forward=1

-a displays all system parameters

-P loads the system parameters from the specified file, which is loaded from the/etc/sysctl.conf if not specified

If you just want to temporarily change the value of a system parameter, you can do it in two ways, for example, to enable the IP routing forwarding feature:

1) #echo 1 >/proc/sys/net/ipv4/ip_forward

2) #sysctl-W net.ipv4.ip_forward=1

Both of these methods may immediately turn on routing, but if the system restarts, or the

# Service Network Restart

command, the value you set is lost and you can modify the/etc/sysctl.conf file if you want to permanently retain the configuration

Change Net.ipv4.ip_forward=0 to Net.ipv4.ip_forward=1

Sysctl Command Explanation

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.