乔部落格

世界上有10种人:认识二进制的和不认识二进制的

sysctl命令详解

joe posted @ 2010年4月24日 17:50 in Unix/Linux with tags sysctl , 2266 阅读

原文:http://blog.chinaunix.net/u/7816/showart_123332.html

sysctl配置与显示在/proc/sys目录中的内核参数。可以用sysctl来设置或重新设置联网功能,如IP转发、IP碎片去除以及源路由检查等。用户只需要编辑/etc/sysctl.conf文件,即可手工或自动执行由sysctl控制的功能。
命令格式:

    sysctl [-n] [-e] -w variable=value
    sysctl [-n] [-e] -p <filename> (default /etc/sysctl.conf)
    sysctl [-n] [-e] -a

常用参数的意义:
-w   临时改变某个指定参数的值,如
sysctl -w net.ipv4.ip_forward=1
-a   显示所有的系统参数
-p   从指定的文件加载系统参数,如不指定即从/etc/sysctl.conf中加载
如果仅仅是想临时改变某个系统参数的值,可以用两种方法来实现,例如想启用IP路由转发功能:

    1) #echo 1 > /proc/sys/net/ipv4/ip_forward
    2) #sysctl -w net.ipv4.ip_forward=1

以上两种方法都可能立即开启路由功能,但如果系统重启,或执行了

    # service network restart

命令,所设置的值即会丢失,如果想永久保留配置,可以修改/etc/sysctl.conf文件
将 net.ipv4.ip_forward=0改为net.ipv4.ip_forward=1

cleaning companies i 说:
2019年10月13日 21:30

Envision having more hours to Loosen up. Imagine on its way home to be able to sparkling clear. Our washing system continues to be developed and also perfected regarding over 9 Decades. We very own latest washing tools to completely clean your villas, rentals every nook in strictly hygienic way. From porches to be able to garage and also bedroom to be able to living location and cooking area, we assist full devotion to produce your villas glow in sunlight and twinkle in nights making use of their clean and also tidy physical appearance.

siberyan health 说:
2020年4月16日 19:07

There are a few advantages from the regular carry out body health stop by with your physician. One of the very important many benefits is preventing disease. Preventive health and wellness checks tend to be especially for people with chances factors just for different health risks. A leader health stop by can also assist in the original detection and additionally treatment from the health condition, which is normally valuable most definitely in events of tumors.

healthy n balanced 说:
2020年4月16日 19:07

Today the Kent State Health Work group has begun preparing a strategic cover the community to cope with these situations. A wide selection of community classes have began meeting monthly in order to create this software plan. There is four succeed groups, one for each one of the key sectors of focus. I am involved in the Substance Physical or mental abuse workgroup on your behalf of one in every of my prospects, Kent Second time beginners School Area.

sikkim health 说:
2020年4月16日 19:07

Like noted above I propose you that clinical providers become involved with city groups to try population tier health management ways of improve your health for the community. One good sort of involvement certainly is the Community Health and wellness Needs Comparison project simply being implemented on the local health and wellness department and additionally non-profit hospitals.

clean tech laws 说:
2020年4月16日 19:08

The proper security exam is very important to campus security and safety. However this survey about security company directors / criminal court chiefs indicates that the majority college administrators isn't going to allow all of these assessments that should be done. Two factors that cause this refusal certainly is the fear about liability exposure and therefore the chance of the fact that audit may require transformations in software systems.

bank ruptcy law merc 说:
2020年4月16日 19:08

Advantages for choosing of particularly handy webpages that provide you with resources for selecting the best tax regularions books just for either sales agreement or taking up through regularions school your local library. They really are organized to grant local regularions schools, assert tax regularions, ongoing taxation news, college textbooks, casebooks, regularions reviews, regularions journals, taxation law page abstracts, resource pages and posts (online sites that have numerous types of tax regularions resource connections) and additionally tax tutorial law right from many U . S . law high schools (right from Northwestern Class of Law to New You are able to University Class of Regularions).

maid agency dubai 说:
2020年5月04日 21:24

On the subject of making some sort of maid connected with honor speech there are numerous frequently enquired questions to help which just about every maid connected with honor should know. I'm gong to see answers to some of those frequently enquired questions in this posting. Once you've got read them you can be better placed to ready a good maid connected with honor dialog.

wall painting servic 说:
2020年5月04日 21:25

Ensure that your Oxford painter and decorator isn't going to rush this paint task! Re-coating far too fast in addition to rolling in a paint that's not thoroughly dried could potentially cause problems which might be difficult to help amend. If colour is applied spanning a finish that is not yet dry the stream in the goods re-wets the base coat on the paint.

dial a maid dubai 说:
2021年6月08日 15:02

Subsequently after entering all the project allocated area, cleaners use their equipment as well packages within the fixed space, so of the fact that diseases won't be able to spread. Most of the cleaning technique is certainly planned and additionally systematic.

CBSE 2nd Class Model 说:
2022年9月14日 13:58

Every year, the Central Board of Secondary Education (CBSE) releases exam materials with sample questions for students studying in Hindi and English at all regional schools. CBSE 2nd Class Model Paper This year, the CBSE also released sample papers for the second grade that are organised by subject for the term 1, term 2, term 3, and term 4 exams that are held at the board and school levels.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter