How do I apply the changes from systemctl preset-all automatically without a reboot

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












systemctl preset-all changes which services are enabled or disabled. How can I (automatically) start and stop services to get the current machine into sync with the presets without manually starting and stopping services myself.



The aim is to get the machine into a state after running preset-all without a reboot that is the same as the state of the machine after a reboot.



e.g. if I enable service X in the presets and X wasn't previously running then I'd like it to start.







share|improve this question






















  • In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
    – sourcejedi
    Mar 16 at 8:16










  • It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
    – sourcejedi
    Mar 16 at 8:18











  • Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
    – demented hedgehog
    Mar 17 at 0:48














up vote
3
down vote

favorite












systemctl preset-all changes which services are enabled or disabled. How can I (automatically) start and stop services to get the current machine into sync with the presets without manually starting and stopping services myself.



The aim is to get the machine into a state after running preset-all without a reboot that is the same as the state of the machine after a reboot.



e.g. if I enable service X in the presets and X wasn't previously running then I'd like it to start.







share|improve this question






















  • In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
    – sourcejedi
    Mar 16 at 8:16










  • It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
    – sourcejedi
    Mar 16 at 8:18











  • Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
    – demented hedgehog
    Mar 17 at 0:48












up vote
3
down vote

favorite









up vote
3
down vote

favorite











systemctl preset-all changes which services are enabled or disabled. How can I (automatically) start and stop services to get the current machine into sync with the presets without manually starting and stopping services myself.



The aim is to get the machine into a state after running preset-all without a reboot that is the same as the state of the machine after a reboot.



e.g. if I enable service X in the presets and X wasn't previously running then I'd like it to start.







share|improve this question














systemctl preset-all changes which services are enabled or disabled. How can I (automatically) start and stop services to get the current machine into sync with the presets without manually starting and stopping services myself.



The aim is to get the machine into a state after running preset-all without a reboot that is the same as the state of the machine after a reboot.



e.g. if I enable service X in the presets and X wasn't previously running then I'd like it to start.









share|improve this question













share|improve this question




share|improve this question








edited Mar 16 at 1:09

























asked Mar 16 at 0:28









demented hedgehog

1163




1163











  • In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
    – sourcejedi
    Mar 16 at 8:16










  • It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
    – sourcejedi
    Mar 16 at 8:18











  • Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
    – demented hedgehog
    Mar 17 at 0:48
















  • In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
    – sourcejedi
    Mar 16 at 8:16










  • It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
    – sourcejedi
    Mar 16 at 8:18











  • Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
    – demented hedgehog
    Mar 17 at 0:48















In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
– sourcejedi
Mar 16 at 8:16




In principle, systemctl isolate your desired target graphical.target / multi-user.target or just default.target, which is symlinked to whichever you default to at boot time. In practice, isolate is a bag of horrors, it manages to kill gui sessions somehow among other things. AFAIK there is no good way to do what you want. Don't use presets if this is what you want; it's why Debian hasn't converted to rely on them despite multiple references to Debian in the documentation for presets. Don't use isolate, or be prepared for it to blow up.
– sourcejedi
Mar 16 at 8:16












It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
– sourcejedi
Mar 16 at 8:18





It's possible systemctl isolate multi-user is somewhat less buggy. If you're using a gui, you might try that, and then follow up with systemctl isolate graphical.target. And then you know bad things will likely happen to your gui, so you'll be running it from a text console or remote login.
– sourcejedi
Mar 16 at 8:18













Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
– demented hedgehog
Mar 17 at 0:48




Righto.. that's very interesting. This is for a headless box but I don't like what I hear. Thanks for the hard-to-find info...
– demented hedgehog
Mar 17 at 0:48















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430522%2fhow-do-i-apply-the-changes-from-systemctl-preset-all-automatically-without-a-reb%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f430522%2fhow-do-i-apply-the-changes-from-systemctl-preset-all-automatically-without-a-reb%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay