2

I have an embedded system. An old linux OS runs on it. When i enter "uname -r" command i get the version information as "3.3.8-3.4".

I want to modify some of network kernel parameters (increase tcp receive buffer size etc.) in /proc/sys. But sysctl command does not exist in this old linux kernel version. Also sysctl.conf does not exist under /etc directory

I tried changing kernel parameter files manually but system does not allow this operation even for super user.

How can i modify kernel parameters in this linux version?

mehmet riza oz
  • 541
  • 6
  • 18

1 Answers1

2

You can use /proc/sys. For example the following command:

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

... is basically the same as

sysctl -w net.ipv4.ip_forward=1

However, you'll need to make sure on your own that parameters will be set on boot.

hek2mgl
  • 152,036
  • 28
  • 249
  • 266
  • i tried it and it works, thank you. but there is something i don't understand. what is the meaning of the echo here? i can't modify any of files under /proc/sys with vi, cat or any other program but echo modifies them. is it a feature of echo or something else? – mehmet riza oz Mar 04 '16 at 23:22
  • It was a typo. It should be ip_forward, not ip_forwarding. Corrected that – hek2mgl Mar 05 '16 at 08:57