2

While adding a new service to the /etc/systemd/system/ folder, I have accidentally edited the syslog.service file and lost its original content.

Can someone paste the original file content here for me?

Or does anybody know how to restore it? I found this answer, but I don't know which package I should reinstall, and can't find it by file on https://packages.ubuntu.com.

Many thanks for help!

1
  • 3
    Side note: if you have the installation ISO, you can mount the system partition from that somewhere, and that should include said file
    – cocomac
    May 28 at 6:11

1 Answer 1

5

My system is a 20.04.4 server. I do not know if desktop is the same:

$ cat /etc/systemd/system/syslog.service
[Unit]
Description=System Logging Service
Requires=syslog.socket
Documentation=man:rsyslogd(8)
Documentation=https://www.rsyslog.com/doc/

[Service]
Type=notify
ExecStart=/usr/sbin/rsyslogd -n -iNONE
StandardOutput=null
Restart=on-failure

# Increase the default a bit in order to allow many simultaneous
# files to be monitored, we might need a lot of fds.
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target
Alias=syslog.service
1
  • 2
    exactly the same here with 20.04 LTS
    – Farzan
    May 27 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.