Systemd lab issue

Hello,

I see below command edit different file:

  1. sudo vi /etc/systemd/system/sample.service

  2. sudo systemctl edit sample.service

Is it OK? I guess both commands should edit the same service.
First time I edited service by second command and I was able to start it. Status was Active.
But after first comand showed me completelly different file and without my changes.

And later during lab tasks I got below error message while trying to run command sudo systemctl daemon-reload:
Failed to reload daemon: The name org.freedesktop.PolicyKit1 was not provided by any .service files

Hi @oleksii.leshchenko ,
Please share the lab URL so we can check from our end.

Regards,

its ok to use both command but when u use first command you need to save the file using :wq and then because u edit the service section u need to reload using demon-reload command after that you start the service again it will work perfectly and smoothly