Unexpected behavior when editing resolv.conf with sed command

  • why is the sed command not actually replacing the nameserver ip ?
  • it’s not creating a new file, so what is it printing to sdtout after the command is executed that looks like it contains “nameserver 8.8.8.8” ?

also, this is the second time i ran this command with the same result, why is it not asking for sudo password this time ?

Another example from the last lab in this course, anyone knows?

ok, found the issues & solution -

Save file after using sed command - Unix & Linux Stack Exchange