I recently bought a new Dell Inspiron 7437 and one of the first few things I did was to dual boot the pre-installed Windows with Ubuntu. My older laptop did not have Bluetooth, strange but true. This is why I never noticed that bluetooth is always on at each boot in Ubuntu.
Since, I hardly use Bluetooth, so why should I have Bluetooth enabled by default? It impacts the battery life a little after all.
While you can turn off Bluetooth in one click in Ubuntu, doing it in each session is a repetitive and frustrating task.
A simpler solution is to deactivate Bluetooth at start up in Ubuntu.
In this quick post, I’ll share with you how to disable Bluetooth by default at each start up.
Turn off Bluetooth by default in Ubuntu
Open a terminal and use the following command to open gedit with sudo:
sudo gedit /etc/rc.local
It will open the rc.local file. Just add the following line just before exit 0.
rfkill block bluetooth
Altogether, your rc.local file look like this:
That would be it. Restart the computer and you should see that Bluetooth has been disabled.
Of course you can turn it back on whenever you want by going to the system tray on the top panel or accessing the Bluetooth settings on Ubuntu.
Explanation of what you did here
This little section is just to give a brief explanation of what we did here. It’s not obligatory to read this section. You can skip to comment section for your suggestions or thanks :)
rc.local file is used to run various shell commands at start up time. These commands are user defined.
In a clean install, rc.local has no commands to run. What we did here was to add rfkill block bluetooth. rfkill is a tool to query the state of various switches, buttons and subsytem interfaces.
With this command in rc.localm we are basically soft blocking Bluetooth at each start up time.
I hope this explains the things a bit. And I hope you find this quick little tip helpful.