Ask Your Question

How to restart service in fedora 26 ?

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

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 -0500

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


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

Seen: 1,409 times

Last updated: Sep 22 '17