Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Disable "auto enable" of a service

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
Snake94
Posts: 22
Joined: 2016-06-05 10:48

Disable "auto enable" of a service

#1 Post by Snake94 »

Good afternoon

I noticed that when I install a package that corresponds to a service, such as the apache web server, the service is automatically activated, as if I were doing a "systemctl enable apache2"
Is there any way to disable said "auto-enabled service"?
I honestly do not like that in my system services are activated automatically just by installing a package.

Thank you.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable "auto enable" of a service

#2 Post by Head_on_a_Stick »

Snake94 wrote:I honestly do not like that in my system services are activated automatically just by installing a package
+1

I presume that you are asking how to disable the default and already know to run `systemctl disable foo.service`?

The only answer I can give you is to switch to Arch, Alpine Linux or OpenBSD instead because they don't auto-enable services on installation.

I would be interested to hear of any method to allow that under Debian though.
deadbang


User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable "auto enable" of a service

#4 Post by Head_on_a_Stick »

^ That's just a GUI frontend for `systemctl` (I think), but it is very nice :)

There may be some dpkg option buried away somewhere but I can't get to the Debian box atm.

EDIT: here's Debian's version of that GUI:

https://packages.debian.org/stretch/systemd-ui
deadbang

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Disable "auto enable" of a service

#5 Post by bw123 »

Snake94 wrote:
I honestly do not like that in my system services are activated automatically just by installing a package.
I was annoyed by it at first, because on sysV there used to be some that were, and some that were not and we all got along pretty well? I am pretty sure you can still do that if you want, but it would be up to the package to provide the /etc/default/ file for setting it up that way?

But really, just think how much time it would take when building a system to enable them all. It might be cool to have a way to toggle it off and on, but I really think the way it is now makes good sense.
resigned by AI ChatGPT

User avatar
Snake94
Posts: 22
Joined: 2016-06-05 10:48

Re: Disable "auto enable" of a service

#6 Post by Snake94 »

Head_on_a_Stick wrote:
Snake94 wrote:I honestly do not like that in my system services are activated automatically just by installing a package
+1

I presume that you are asking how to disable the default and already know to run `systemctl disable foo.service`?

The only answer I can give you is to switch to Arch, Alpine Linux or OpenBSD instead because they don't auto-enable services on installation.

I would be interested to hear of any method to allow that under Debian though.
Thanks for response.

Archlinux is nice (I used archlinux for years on desktop) but is unstable, Arch is not fine for workstation if you want a stable system and for servers better not to mention, Alpine I've never used it, and OpenBSD/FreeBSD are very very nice for system administration/servers, but I use debian on my class laptop... *BSD on my laptop hardware runs very slow.

I do not really understand the reason for activating a service automatically, so much work is writing "systemctl enable foobar.service"?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Disable "auto enable" of a service

#7 Post by Head_on_a_Stick »

Snake94 wrote:I do not really understand the reason for activating a service automatically, so much work is writing "systemctl enable foobar.service"?
Well, as bw123 notes it does make sense in the context of a low-maintenance Debian stable system — why would you install a package if you do not want the corresponding service enabled?
deadbang

User avatar
Snake94
Posts: 22
Joined: 2016-06-05 10:48

Re: Disable "auto enable" of a service

#8 Post by Snake94 »

Head_on_a_Stick wrote:
Snake94 wrote:I do not really understand the reason for activating a service automatically, so much work is writing "systemctl enable foobar.service"?
Well, as bw123 notes it does make sense in the context of a low-maintenance Debian stable system — why would you install a package if you do not want the corresponding service enabled?
Just to have more control of my system, anyway, I understand what you want to say.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Disable "auto enable" of a service

#9 Post by bw123 »

for example, which ones should be 'off' and which should be ON, how about cron/anacron? What about sshd? what about display manager? sound support? Who gets to decide what should be default on?

How in the world could you make it work for everybody, when the only real choices are automatically 'on' or 'off' ?
resigned by AI ChatGPT

User avatar
Snake94
Posts: 22
Joined: 2016-06-05 10:48

Re: Disable "auto enable" of a service

#10 Post by Snake94 »

bw123 wrote:for example, which ones should be 'off' and which should be ON, how about cron/anacron? What about sshd? what about display manager? sound support? Who gets to decide what should be default on?

How in the world could you make it work for everybody, when the only real choices are automatically 'on' or 'off' ?
Every service must be disabled for default like archlinux and other systems IMHO

Post Reply