Ask Your Question

How to restart service in fedora 26 ?

asked 2017-09-22 02:26:13 -0600

Anand K gravatar image

updated 2018-11-04 04:07:22 -0600

hhlp gravatar image

Hi All,

I am working on Fedora26 vm, I want to restart my service automatically after machine restart, tried this "sudo chkconfig --level 2345 Service-Agent on" command for service restart, it does not work, Please let me know service automatically restart command.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-22 05:37:57 -0600

updated 2017-09-22 05:38:40 -0600

In Fedora 26 the init system was replaced by systemd and therefore also the commands to manage services. The basic command to manage services with systemd is systemctl.
In your case you would have to enter the command as follows to enable the service on startup.

systemctl enable Service-Agent

To disable it again, use the command as follows.

systemctl disable Service-Agent

To start/stop/restart the service, one would have to use the commands as follows.

systemctl start Service-Agent
systemctl stop Service-Agent
systemctl restart Service-Agent

Of course you also can query the status.

systemctl status Service-Agent

For a more comprehensive overview, please visit the Fedora systemd page.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2017-09-22 02:02:55 -0600

Seen: 3,552 times

Last updated: Sep 22 '17