How to edit my /etc/sysctl.conf file?
1. You can add this line using nano or vim from terminal (ctrl+alt+t):
sudo nano /etc/sysctl.conf
where you then scroll down and add the line by hand then press ctrl+x to end editing. You will be asked if you want to save, confirm that by pressing y and then once return to save.
Same way you can reverse your changes.
2. You can add it as well this way:
echo "net.ipv4.icmp_echo_ignore_all=1" | sudo tee -a /etc/sysctl.conf
For reversing this refer to solution 1.
Related videos on Youtube
Mokum
I am a ubuntu enthousiast, learning every day how linux works. Also interested in grub 2 to use different or more distros all to learn more about linux.regards Harry.
Updated on September 18, 2022Comments
-
Mokum over 1 year
In one of the labs for learning Linux system administrator I have to do :
Now change the value by modifying
/etc/sysctl.conf
and force the system to activate this setting file without a reboot.Check that this worked properly.
here is what i must do:
Add the following line to
/etc/sysctl.conf
:net.ipv4.icmp_echo_ignore_all=1
and then do:
$ sysctl -p
how to do this and with which text editor?
-
Scott Stensland over 6 yearsview current settings before doing file edit by issuing
sysctl -a|grep icmp_echo
-
Mokum almost 8 yearsvery usefull Videonauth, thanx i solved it anyway with nano