In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The sysctl command is used to dynamically modify kernel run parameters while the kernel is running, and the available kernel parameters are in the directory / proc/sys.
It includes some advanced options for TCP/ip stacks and virtual memory systems, which allow experienced administrators to improve eye-catching system performance. You can read and set more than five hundred system variables with sysctl.
Syntax:
Sysctl (option) (parameter)
Options:
-n: keywords are not printed when printing values
-e: ignore unknown keyword errors
-N: print name only
-w: use this when changing the sysctl setting
-p: load kernel parameter settings from the configuration file "/ etc/sysctl.conf"
-a: print all currently available kernel parameter variables and values
-A: prints all currently available kernel parameter variables and values in tabular form.
The meaning of common parameters:
-w temporarily change the value of a specified parameter, such as sysctl-w net.ipv4.ip_forward=1
-a displays all system parameters
-p loads system parameters from the specified file, or from / etc/sysctl.conf if not specified
If you just want to change the value of a system parameter temporarily, you can do it in two ways, such as enabling IP routing forwarding:
1) # echo 1 > / proc/sys/net/ipv4/ip_forward
2) # sysctl-w net.ipv4.ip_forward=1
Both of the above methods may turn on the routing function immediately, but if the system is rebooted or the # service network restart command is executed, the set value will be lost. If you want to keep the configuration permanently, you can modify the / etc/sysctl.conf file.
Change net.ipv4.ip_forward=0 to net.ipv4.ip_forward=1
1, the function of the sysctl command
Configure kernel parameters at run time
2. Examples of usage:
-w use this option to change a sysctl setting example: sysctl-w net.ipv4.ip_forward=1
-p load sysctl configuration file if no path is specified after-p, load / etc/sysctl.conf
Example: sysctl-p / etc/sysctl.conf
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.