How to ask systemd to not start a system service on boot?start a service a at bootime in systemdHow can we mask service whose unit file is located under /etc/systemd/system?init service failing to enable once a systemd service file is generatedWhy is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullysystemd: finish the execution of custom shell script before starting nginxStopping systemd unit together with another. Starting worksConfused why systemd service doesn't start at bootStart systemd service with a “system” user to execute a bash scriptProblem starting Gunicorn Web Service using Systemd

Could there be a material that inverts the colours seen through it?

AMPScript Lookup From Child Business Unit

Why does SSL Labs now consider CBC suites weak?

How do I adjust encounters to challenge my lycanthrope players without negating their cool new abilities?

Was the dragon prowess intentionally downplayed in S08E04?

Why do the lights go out when someone enters the dining room on this ship?

Can I say: "When was your train leaving?" if the train leaves in the future?

Where to find every-day healthy food near Heathrow Airport?

How does this Martian habitat 3D printer built for NASA work?

Is it safe to use two single-pole breakers for a 240v circuit?

Offered a new position but unknown about salary?

Help understanding this line - usage of くれる

Why was my Canon Speedlite 600EX triggering other flashes?

Substring join or additional table, which is faster?

Extract the characters before last colon

Acronyms in HDD specification

Should generated documentation be stored in a Git repository?

Should I communicate in my applications that I'm unemployed out of choice rather than because nobody will have me?

What information exactly does an instruction cache store?

Smooth function that vanishes only on unit cube

Find the unknown area, x

Is this a group? If so, what group is it?

White foam around tubeless tires

Polynomial division: Is this trick obvious?



How to ask systemd to not start a system service on boot?


start a service a at bootime in systemdHow can we mask service whose unit file is located under /etc/systemd/system?init service failing to enable once a systemd service file is generatedWhy is systemd stopping service immediately after it is started?Instruct to execute an unit after completing another unit successfullysystemd: finish the execution of custom shell script before starting nginxStopping systemd unit together with another. Starting worksConfused why systemd service doesn't start at bootStart systemd service with a “system” user to execute a bash scriptProblem starting Gunicorn Web Service using Systemd






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








5















I don't want to remove the service, I just want to avoid its start on boot. I still need the option to start it manually later (with the systemctl start <service> command).



I tried to use systemctl disable <service>. It doesn't work, because it removes the service.



There is another possibility. In its service file,



[Install]
#WantedBy=multi-user.target


could be commented out (and then, systemctl daemon-reload). It works in the case of my own services, because their service files was written by me.



However, the service files belonging to distribution, are in /lib/systemd/system. Files in this directory are managed by the OS, i.e. they would be overwritten by updates, other parts of the system might assume that these are unmodified, and so on. Simply editing system files out of the /etc is a bad practice, and I don't want to do that. I don't want to edit configuration files in my /lib.



What to do?










share|improve this question



















  • 1





    use systemctl disable <service>

    – eblock
    May 3 at 10:35






  • 5





    Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

    – eblock
    May 3 at 10:52











  • @eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

    – peterh
    May 3 at 10:59












  • Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

    – 炸鱼薯条德里克
    May 3 at 11:40












  • @炸鱼薯条德里克 systemctl --all most definitely is a valid command.

    – Stephen Kitt
    May 3 at 11:41

















5















I don't want to remove the service, I just want to avoid its start on boot. I still need the option to start it manually later (with the systemctl start <service> command).



I tried to use systemctl disable <service>. It doesn't work, because it removes the service.



There is another possibility. In its service file,



[Install]
#WantedBy=multi-user.target


could be commented out (and then, systemctl daemon-reload). It works in the case of my own services, because their service files was written by me.



However, the service files belonging to distribution, are in /lib/systemd/system. Files in this directory are managed by the OS, i.e. they would be overwritten by updates, other parts of the system might assume that these are unmodified, and so on. Simply editing system files out of the /etc is a bad practice, and I don't want to do that. I don't want to edit configuration files in my /lib.



What to do?










share|improve this question



















  • 1





    use systemctl disable <service>

    – eblock
    May 3 at 10:35






  • 5





    Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

    – eblock
    May 3 at 10:52











  • @eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

    – peterh
    May 3 at 10:59












  • Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

    – 炸鱼薯条德里克
    May 3 at 11:40












  • @炸鱼薯条德里克 systemctl --all most definitely is a valid command.

    – Stephen Kitt
    May 3 at 11:41













5












5








5








I don't want to remove the service, I just want to avoid its start on boot. I still need the option to start it manually later (with the systemctl start <service> command).



I tried to use systemctl disable <service>. It doesn't work, because it removes the service.



There is another possibility. In its service file,



[Install]
#WantedBy=multi-user.target


could be commented out (and then, systemctl daemon-reload). It works in the case of my own services, because their service files was written by me.



However, the service files belonging to distribution, are in /lib/systemd/system. Files in this directory are managed by the OS, i.e. they would be overwritten by updates, other parts of the system might assume that these are unmodified, and so on. Simply editing system files out of the /etc is a bad practice, and I don't want to do that. I don't want to edit configuration files in my /lib.



What to do?










share|improve this question
















I don't want to remove the service, I just want to avoid its start on boot. I still need the option to start it manually later (with the systemctl start <service> command).



I tried to use systemctl disable <service>. It doesn't work, because it removes the service.



There is another possibility. In its service file,



[Install]
#WantedBy=multi-user.target


could be commented out (and then, systemctl daemon-reload). It works in the case of my own services, because their service files was written by me.



However, the service files belonging to distribution, are in /lib/systemd/system. Files in this directory are managed by the OS, i.e. they would be overwritten by updates, other parts of the system might assume that these are unmodified, and so on. Simply editing system files out of the /etc is a bad practice, and I don't want to do that. I don't want to edit configuration files in my /lib.



What to do?







systemd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 3 at 10:41







peterh

















asked May 3 at 10:24









peterhpeterh

4,559113462




4,559113462







  • 1





    use systemctl disable <service>

    – eblock
    May 3 at 10:35






  • 5





    Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

    – eblock
    May 3 at 10:52











  • @eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

    – peterh
    May 3 at 10:59












  • Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

    – 炸鱼薯条德里克
    May 3 at 11:40












  • @炸鱼薯条德里克 systemctl --all most definitely is a valid command.

    – Stephen Kitt
    May 3 at 11:41












  • 1





    use systemctl disable <service>

    – eblock
    May 3 at 10:35






  • 5





    Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

    – eblock
    May 3 at 10:52











  • @eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

    – peterh
    May 3 at 10:59












  • Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

    – 炸鱼薯条德里克
    May 3 at 11:40












  • @炸鱼薯条德里克 systemctl --all most definitely is a valid command.

    – Stephen Kitt
    May 3 at 11:41







1




1





use systemctl disable <service>

– eblock
May 3 at 10:35





use systemctl disable <service>

– eblock
May 3 at 10:35




5




5





Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

– eblock
May 3 at 10:52





Why would systemctl disable remove a service? I never had that issue, disabling always worked for me. However, editing drop-in files in /etc/systemd/system is actually the desired way, at least that's what I learned.

– eblock
May 3 at 10:52













@eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

– peterh
May 3 at 10:59






@eblock Yes, it removes the service. After a systemctl disable <service>, you won't be able to see it in systemctl --all any more. You can enable it again if you wish, and the you can start it, but not this is what I want. I only want it to not start on boot (thus, to remove from the wishlist of multi-user.target). Solving the problem on your way would be a workaround, not the solution. However, if there is no better option, I will need to do that.

– peterh
May 3 at 10:59














Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

– 炸鱼薯条德里克
May 3 at 11:40






Check the output of systemctl disable <service> and the existence of that unit file under /lib. Normally it wouldn't be removed, if it really get removed, then you'll not be able to enable or start it again. systemctl --all doesn't seem to be a valid syntax for systemctl .

– 炸鱼薯条德里克
May 3 at 11:40














@炸鱼薯条德里克 systemctl --all most definitely is a valid command.

– Stephen Kitt
May 3 at 11:41





@炸鱼薯条德里克 systemctl --all most definitely is a valid command.

– Stephen Kitt
May 3 at 11:41










1 Answer
1






active

oldest

votes


















13














systemctl disable is the correct way to do this; it still allows starting a unit manually, even if it doesn’t appear in systemctl --all’s output — to list all startable units, you should run systemctl list-unit-files instead. To render a unit un-startable, you need to mask it.



$ sudo systemctl stop unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-05-03 13:12:41 CEST; 5s ago
Docs: man:unbound(8)
Main PID: 5320 (code=exited, status=0/SUCCESS)

$ sudo systemctl disable unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:unbound(8)

$ sudo systemctl start unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2019-05-03 13:13:14 CEST; 1s ago
Docs: man:unbound(8)
Process: 30513 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 30518 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 30525 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─30525 /usr/sbin/unbound -d


If you really want to, you can override system-provided services defined in /lib by adding files in /etc, and change their desired target; systemctl edit yourunit will do the right thing: it opens an editor, allowing you to override only the settings you care about, and it will store the result in the right place, as an override “snippet”. Updates made to non-overridden settings in the system-provided services (e.g. by package upgrades) will be taken into account transparently.






share|improve this answer

























  • If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

    – peterh
    May 3 at 11:26











  • Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

    – Stephen Kitt
    May 3 at 11:27







  • 2





    And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

    – peterh
    May 3 at 11:37











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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
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%2f516925%2fhow-to-ask-systemd-to-not-start-a-system-service-on-boot%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









13














systemctl disable is the correct way to do this; it still allows starting a unit manually, even if it doesn’t appear in systemctl --all’s output — to list all startable units, you should run systemctl list-unit-files instead. To render a unit un-startable, you need to mask it.



$ sudo systemctl stop unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-05-03 13:12:41 CEST; 5s ago
Docs: man:unbound(8)
Main PID: 5320 (code=exited, status=0/SUCCESS)

$ sudo systemctl disable unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:unbound(8)

$ sudo systemctl start unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2019-05-03 13:13:14 CEST; 1s ago
Docs: man:unbound(8)
Process: 30513 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 30518 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 30525 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─30525 /usr/sbin/unbound -d


If you really want to, you can override system-provided services defined in /lib by adding files in /etc, and change their desired target; systemctl edit yourunit will do the right thing: it opens an editor, allowing you to override only the settings you care about, and it will store the result in the right place, as an override “snippet”. Updates made to non-overridden settings in the system-provided services (e.g. by package upgrades) will be taken into account transparently.






share|improve this answer

























  • If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

    – peterh
    May 3 at 11:26











  • Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

    – Stephen Kitt
    May 3 at 11:27







  • 2





    And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

    – peterh
    May 3 at 11:37















13














systemctl disable is the correct way to do this; it still allows starting a unit manually, even if it doesn’t appear in systemctl --all’s output — to list all startable units, you should run systemctl list-unit-files instead. To render a unit un-startable, you need to mask it.



$ sudo systemctl stop unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-05-03 13:12:41 CEST; 5s ago
Docs: man:unbound(8)
Main PID: 5320 (code=exited, status=0/SUCCESS)

$ sudo systemctl disable unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:unbound(8)

$ sudo systemctl start unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2019-05-03 13:13:14 CEST; 1s ago
Docs: man:unbound(8)
Process: 30513 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 30518 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 30525 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─30525 /usr/sbin/unbound -d


If you really want to, you can override system-provided services defined in /lib by adding files in /etc, and change their desired target; systemctl edit yourunit will do the right thing: it opens an editor, allowing you to override only the settings you care about, and it will store the result in the right place, as an override “snippet”. Updates made to non-overridden settings in the system-provided services (e.g. by package upgrades) will be taken into account transparently.






share|improve this answer

























  • If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

    – peterh
    May 3 at 11:26











  • Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

    – Stephen Kitt
    May 3 at 11:27







  • 2





    And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

    – peterh
    May 3 at 11:37













13












13








13







systemctl disable is the correct way to do this; it still allows starting a unit manually, even if it doesn’t appear in systemctl --all’s output — to list all startable units, you should run systemctl list-unit-files instead. To render a unit un-startable, you need to mask it.



$ sudo systemctl stop unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-05-03 13:12:41 CEST; 5s ago
Docs: man:unbound(8)
Main PID: 5320 (code=exited, status=0/SUCCESS)

$ sudo systemctl disable unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:unbound(8)

$ sudo systemctl start unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2019-05-03 13:13:14 CEST; 1s ago
Docs: man:unbound(8)
Process: 30513 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 30518 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 30525 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─30525 /usr/sbin/unbound -d


If you really want to, you can override system-provided services defined in /lib by adding files in /etc, and change their desired target; systemctl edit yourunit will do the right thing: it opens an editor, allowing you to override only the settings you care about, and it will store the result in the right place, as an override “snippet”. Updates made to non-overridden settings in the system-provided services (e.g. by package upgrades) will be taken into account transparently.






share|improve this answer















systemctl disable is the correct way to do this; it still allows starting a unit manually, even if it doesn’t appear in systemctl --all’s output — to list all startable units, you should run systemctl list-unit-files instead. To render a unit un-startable, you need to mask it.



$ sudo systemctl stop unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fri 2019-05-03 13:12:41 CEST; 5s ago
Docs: man:unbound(8)
Main PID: 5320 (code=exited, status=0/SUCCESS)

$ sudo systemctl disable unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:unbound(8)

$ sudo systemctl start unbound
$ sudo systemctl status unbound
● unbound.service - Unbound DNS server
Loaded: loaded (/lib/systemd/system/unbound.service; disabled; vendor preset: enabled)
Active: active (running) since Fri 2019-05-03 13:13:14 CEST; 1s ago
Docs: man:unbound(8)
Process: 30513 ExecStartPre=/usr/lib/unbound/package-helper chroot_setup (code=exited, status=0/SUCCESS)
Process: 30518 ExecStartPre=/usr/lib/unbound/package-helper root_trust_anchor_update (code=exited, status=0/SUCCESS)
Main PID: 30525 (unbound)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/unbound.service
└─30525 /usr/sbin/unbound -d


If you really want to, you can override system-provided services defined in /lib by adding files in /etc, and change their desired target; systemctl edit yourunit will do the right thing: it opens an editor, allowing you to override only the settings you care about, and it will store the result in the right place, as an override “snippet”. Updates made to non-overridden settings in the system-provided services (e.g. by package upgrades) will be taken into account transparently.







share|improve this answer














share|improve this answer



share|improve this answer








edited May 3 at 11:31

























answered May 3 at 11:15









Stephen KittStephen Kitt

185k26427508




185k26427508












  • If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

    – peterh
    May 3 at 11:26











  • Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

    – Stephen Kitt
    May 3 at 11:27







  • 2





    And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

    – peterh
    May 3 at 11:37

















  • If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

    – peterh
    May 3 at 11:26











  • Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

    – Stephen Kitt
    May 3 at 11:27







  • 2





    And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

    – peterh
    May 3 at 11:37
















If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

– peterh
May 3 at 11:26





If I see it correctly, systemctl edit actually creates some override file, is it true? I think, overriding WantedBy to am empty string would a nice solution, without the duplication of the configuration from the /lib. Is it possible?

– peterh
May 3 at 11:26













Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

– Stephen Kitt
May 3 at 11:27






Yes, that’s correct. But the correct solution really is systemctl disable. (systemctl start can start a unit which doesn’t appear in systemctl --all.)

– Stephen Kitt
May 3 at 11:27





2




2





And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

– peterh
May 3 at 11:37





And system list-unit-files has also the disabled entries... wonderful. Somewhere I've read this: "Systemd is a quite good OS, only it requires some improvement in its boot mechanism." ;-)

– peterh
May 3 at 11:37

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f516925%2fhow-to-ask-systemd-to-not-start-a-system-service-on-boot%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company