One liner for uncomment the second line of the file

Started by kalpana, Oct 21, 2023, 05:16 AM

Previous topic - Next topic

kalpana

I am using pulse secure as VPN.
I want to uncomment one line of code in the file resolve.conf

This is the original content
search . rs.de min.de
nameserver 127.0.0.52
nameserver 121.237.0.21
nameserver 121.237.1.12

I am able to do that by
sudo nano /etc/resolv.conf

This is what i want
search . rs.de min.de
#nameserver 127.0.0.52
nameserver 121.237.0.21
nameserver 121.237.1.12

However is there a one line command that can add # the to the second line
(I now have to open the file with nano and then do it manually)