–dry-run
Just print what would be done. Currently supported by verbs halt, poweroff, reboot, kexec, suspend, hibernate, hybrid-sleep, suspend-then-hibernate, default, rescue, emergency, and exit.
Ok, so because disable isn’t in the list of supported verbs, the --dry-run option doesn’t work.
How else can we test disabling service’s?
Timeshift is one way to test service disabling, I’m not sure but I believe using timeshift for testing is somewhat hard on the disk drive.
Let’s see if I got this part correct.
If one finds later that what was disabled is actually needed, just use ‘enable’ and ‘start or reboot’ to regain it?
Or will I run into needing to re-install something?
There tends to be a certain precision with language in software. Read the Debian Packaging Guide or Freedesktop Specifications and you’ll see what I mean.
My point: disable means just that. It does not mean uninstall, remove, purge, reboot, shutdown, start, or anything else other than disable. So that means to undo it, you enable.
You might want to look into a virtual machine or a container so you have a little playground to test things like this.
For example, disable and mask or start and enable.
I am not able to reference containers as I do not use them.
But, when you use a virtual machine hypervisor such as GNOME Boxes or VirtualBox you are creating a machine that resides within the hypervisor. It does not touch your physical partitions.
I use virtual machines all the time to test new versions, commands or whatever.
One mistake and you can delete the VM and start over.
One mistake on your physical partitions may often result in a complete reinstall depending on the damage.
Others will recommend different virtual machine software and all have their own value depending on your needs.
By the way, if it is not already enabled, you need to enable Virtualization in BIOS in order to use the software and play around with VMs.
Both are similar concepts. Basically you’d be running a separate operating system within your existing operating system.
Kind of like @rubi1200 says below, you can totally mess up the entire operating system within them and you could just delete it and start over without it ever affecting your host system.
I think this is essential for any command line tool you use.
This is a perfect example of why I feel the manpages aren’t written to help others and were written only as a reference tool for it’s author.
Why not use a more generally understandable descriptive phrase like “The only verbs that will work with this option are”.
Using less generally understood phrases add to the learning curve when phrases more easily understood would make the learning less frustrating.
–dry-run isn’t alway’s interchangable with the more widely used -s.
In systemctl, -s mean’s nothing near a simulated run or dry run.
So yea, read the manpages, hopefully you “just know” what is meant.
“Currently supported by verbs” is the same as “The only verbs that will work with this option are” with one extremely subtle difference: the first one leaves it open to the possibility that other verbs could be supported in the future.
I’ve seen many times in both open source and proprietary software where what seem like incredibly obvious things to me are simply not obvious to the developers. That or they haven’t had the resources to dedicate to that particular issue. Or it’s such a low priority concern relative to the bigger picture items. There’s countless reasons.
But if you want it fixed, one good way is to fix it yourself. Patches welcome, as they say!
On my Ubuntu 24.04 install I use GNOME Boxes; simple but effective
On Kubuntu 24.04 I have VirtualBox: more options for finer-grained control
I usually download the ISO to a temp folder and then point the software to that place, add my options for RAM, disk space etc. and then the software starts the ISO as if you were running a live USB.
Once installed, you are using a full version of whatever you try out and you start and stop as you would for a normal install on bare metal.
Never used it but I believe it is the same concept, a means to install and run virtual machines.
Not on Ubuntu (you could probably build it from upstream source though, but the snap version is the one maintained by Canonical and the one used in millions of businesses so it gets the most attention and quality checks)…
If I run that command, will it install things like firefox and other default snaps?
I have a decision to make here.
Everywhere I look, I see a debate about snaps.
I need to research snaps for myself and not go on what other people are saying about snaps.