9

In one of the labs for learning Linux system administrator I have to do :

  1. Now change the value by modifying /etc/sysctl.conf and force the system to activate this setting file without a reboot.

  2. 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?

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Mokum
  • 336

1 Answers1

13

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.

Videonauth
  • 33,355
  • 17
  • 105
  • 120