How to Edit My /Etc/Sysctl. Conf File? [Duplicate]

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?

1

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.

1
Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest