【linux系统参数修改命令】

  linux系统参数修改命令

  linuxsysctl

  linux-yvmf:~ # man sysctl

  Reformatting sysctl(8), please wait…

  SYSCTL(8)                                                              SYSCTL(8)

  NAME

  sysctl - configure kernel parameters at runtime

  SYNOPSIS

  sysctl [-n] [-e] variable …

  sysctl [-n] [-e] [-q] -w variable=value …

  sysctl [-n] [-e] [-q] -p <filename>

  sysctl [-n] [-e] -a

  sysctl [-n] [-e] -A

  DESCRIPTION

  sysctl  is  used  to modify kernel parameters at runtime.  The parameters

  available are those listed under  /proc/sys/.   Procfs  is  required  for

  sysctl(8) support in Linux.  You can use sysctl(8) to both read and write

  sysctl data.

  PARAMETERS

  variable

  The name of a key to read from.  An example is kernel.ostype.  The

  '/' separator is also accepted in place of a '.'.

  variable=value

  To  set  a key, use the form variable=value, where variable is the

  key and value is the value to set it to.  If  the  value  contains

  quotes  or  characters which are parsed by the shell, you may need

  to enclose the value in  double  quotes.   This  requires  the  -w

  parameter to use.

  -n     Use  this option to disable printing of the key name when printing

  values.

  -e     Use this option to ignore errors about unknown keys.

  -N     Use this option to only print the names. It  may  be  useful  with

  shells that have programmable completion.

  -q     Use this option to not display the values set to stdout.

  -w     Use this option when you want to change a sysctl setting.

  -p     Load   in   sysctl   settings   from   the   file   specified   or

  /etc/sysctl.conf if none given.

  -a     Display all values currently available.

  -A     Display all values currently available in table form.

  [html]

  EXAMPLES(示例)

  /sbin/sysctl -a

  /sbin/sysctl -n kernel.hostname

  /sbin/sysctl -w kernel.domainname="example.com"

  /sbin/sysctl -p /etc/sysctl.conf

  FILES(命令对应的系统参数文件)

  /proc/sys /etc/sysctl.conf

  SEE ALSO

  sysctl.conf(5)

  修改完成后,需要执行sysctl -w保存,否则重启后参数失效。

 

转载于:https://www.cnblogs.com/52bokeyuan1314/p/3343005.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值