Score:0

CentOS: How to keep previous service state on reboot

cn flag

Is there unit setting I can change so a service will stay stopped after reboot if it was stopped before reboot?

Currently service starts with OS startup even if it was stopped

CentOS9

Score:0
cn flag
systemctl disable --now whatever.service

Will remove the unit from targets, preventing start at boot. --now will also stop it.

Default enabled state of a unit can be set in a couple ways. By administrator or distro policy, see systemd.preset Or, by editing the unit (systemctl edit whatever.service) and changing the Install section.

in flag
This will however always prevent the start, regardless of the state prior to the boot.
Boppity Bop avatar
cn flag
I cant find anything relevant on `install` section. all the copy-pasted *blogs* just use WantedBy and may be CreatedBy without much of explanation. So how do I change install section?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.