Best way to deactivate Bluetooth on system startup? (with systemd and not upstart)
What is the best way to deactivate Bluetooth for every startup with systemd? There are a lot of examples, but all of them work with upstart and rc.local.
With Ubuntu 15.10 rc.local is disabled by default. I think it's for a reason, or isn't it?
So how can I deactivate the Bluetooth target/service correctly without the rc.local script?
Maybe reactivate rc.local an add the line "rfkill block bluetooth" is the proper way?
First, stop the service:
sudo systemctl stop bluetooth.service
Then, disable it:
sudo systemctl disable bluetooth.service
Check:
systemctl status bluetooth.service
Most of the methods above totally disable bluetooth, while probably many users just want their OS to remember their preference. The problem is that blueman-applet has an auto-power-on setting that automatically enables bluetooth each time the indicator starts. So if you you want Ubuntu to remember your preference open a terminal and type this:
$ gsettings set org.blueman.plugins.powermanager auto-power-on false
This way you can just disable bluetooth and the OS will remember it and won't automatically re-enable it next time you turn on or reboot your PC.
To disable it so it never tries to restart (as other apps may be trying to start it after you've disabled it and will show up with errors in the journal log) after stopping and disabling, you can sudo systemctl mask dbus-org.bluez.service
, this points the symlink to /dev/null. To restore it sudo systemctl unmask dbus-org.bluez.service
in systemd.
https://www.ibm.com/support/knowledgecenter/SSNW54_1.1.1/com.ibm.kvm.v111.admin/hpssdisabling.htm