home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] what is the purpose of the "-w" option of "sysctl" command?

  • Subject: Re: [OCLUG-Tech] what is the purpose of the "-w" option of "sysctl" command?
  • From: Rick Leir <rleir [ at ] leirtech [ dot ] com>
  • Date: Wed, 14 Mar 2018 15:32:09 -0400
Robert
I am not close to my console, so this is a guess..
What is in your
/usr/lib/sysctl.d/00-system.conf file?
Rick

On March 14, 2018 7:23:24 AM EDT, "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca> wrote:
>
>  just noticed something odd ... on my fedora 27 system, the man page
>for sysctl reads under PARAMETERS:
>
>    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.
>
>  hang on ... setting a variable "requires" the -w parameter? that's
>explained further down:
>
>    -w, --write
>       Use this option when you want to change a sysctl setting.
>
>  as i read that, "-w" is *required* to modify a sysctl variable at
>run-time, but i tested it with my favourite example:
>
>  # sysctl net.ipv4.ip_forward=0
>
>and that modified that variable just fine with no need for "-w":
>
>  # sysctl net.ipv4.ip_forward
>  net.ipv4.ip_forward = 0
>  #
>
>so what exactly is "-w" for?
>
>rday
>
>_______________________________________________
>Linux mailing list
>Linux [ at ] lists [ dot ] oclug [ dot ] on [ dot ] ca
>http://oclug.on.ca/mailman/listinfo/linux

-- 
Sorry for being brief. Alternate email is rickleir at yahoo dot com