Dear friends and colleges ,

We have service under /etc/systemd/system

Service name is calc_live_servers.service

Since Restart=always is configured in calc_live_servers.service

Then when we kill the PID of the process or kill -9 , then service is restarted again and will be up

is it possible to kill the PID so service will not start again after we kill it in spite Restart=always?

The service calc_live_servers.service

Description=calc_servers Server
Requires=network.target remote-fs.target
After=network.target remote-fs.target

ExecStart=/usr/bin/calc_servers-start /etc/calc_servers/calc_servers.properties


Main target - is to stop the service by kill the PID without use systemctl stop <SERVICE NAME > and that because sometimes stopping the service not really stop it

1 Answer 1


Instead of killing PID, stop the service with sudo systemctl stop calc_live_servers - that is the way to stop a service. And if you don't want to have it running, disable the service with sudo systemctl disable calc_live_servers.

  • but as I said sometimes service not stopped , so this is the reason that we want to kill the PIS but after we kill it then service start again because Restart=always
    – user436442
    Commented Nov 10, 2020 at 10:28
  • Stop and kill then. Commented Nov 10, 2020 at 10:44
  • no so good in some case when I stop the service then pid will also killed before I killed it with kill command
    – user436442
    Commented Nov 10, 2020 at 11:17
  • you could killall process_name or ps ax | grep process_name OR pgrep process_name to find its PID. Commented Nov 10, 2020 at 14:48

You must log in to answer this question.