Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux

Save power and enhance your privacy on Arch Linux by disabling Bluetooth when not in use Learn how to easily disable the Bluetooth service through GNOME or with shell functions, and enable it again when needed

Disabling Bluetooth on Arch Linux can help conserve power and improve security. Use the command "sudo systemctl disable bluetooth" to turn off Bluetooth entirely, or use "sudo systemctl stop bluetooth" to stop the currently running Bluetooth instance. If you're not planning on using Bluetooth, it's best to disable the service to avoid unnecessary power consumption and potential security risks.

Disabling Bluetooth on your desktop environment is a simple task, usually achieved through a checkbox or slider control. However, turning it back on can happen accidentally if you're not careful. To ensure Bluetooth remains disabled, it's best to disable it altogether. By doing so, the hardware cannot be restored through your desktop environment, making your computer behave as if it never had Bluetooth in the first place. Luckily, disabling Bluetooth is uncomplicated once you know how, and it's just as easy to enable it again when needed. This guide applies to all modern systemd-based Linux distributions, including Arch.

Turning Bluetooth Off in GNOME

To quickly turn off Bluetooth in the GNOME desktop environment, access your GNOME System Menu by clicking the right-hand end of the top bar. If Bluetooth is configured and operational, you'll see a highlighted Bluetooth button in one of the accent colors of your current desktop theme. However, if Bluetooth is not operational, the button will be greyed out. Simply click the Bluetooth button to toggle Bluetooth on and off.

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


To turn on Bluetooth, simply click the button once and it will be ready to use. If for any reason it needs to be turned off, clicking the button again will disable the functionality.

Disabling Bluetooth on Arch Linux

Arch Linux has been a systemd-based distribution for several years now, allowing for easy management of Bluetooth through the systemctl command. With sudo privileges, the Bluetooth daemon can be directly stopped, started, enabled, or disabled as needed.

To turn off Bluetooth, simply open a terminal window and enter the following command:

sudo systemctl disable bluetooth

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


Despite disabling the Bluetooth daemon or service from launching during boot-up, any running instance of the service will continue to run until the computer is restarted. This means that after a reboot, Bluetooth will remain disabled.

To immediately disable Bluetooth without rebooting, simply enter the following command:

sudo systemctl stop bluetooth

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


If you access the GNOME System Menu, you'll notice that the Bluetooth button is inactive and cannot be activated. Clicking on it will not trigger any action.

Enabling Bluetooth on Arch Linux

Restoring Bluetooth functionality is just as easy. We use the same systemctl command with different options. Not surprisingly, instead of disable we use enable.

sudo systemctl enable bluetooth

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


To ensure that the Bluetooth service is initiated during boot up, specify it to Arch Linux. If you wish to start the service immediately, run this command: "sudo systemctl start bluetooth". Upon opening the GNOME System Menu, you will notice that the Bluetooth button is highlighted again, indicating that the service is now active. You can conveniently switch Bluetooth on or off by clicking the Bluetooth button as usual.

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux


Creating Bash Shell Functions for Easier Command Execution

One common issue with using long commands in Bash is mistyping them. To avoid this, a better solution is to create Bash shell functions. This will not only make executing commands easier, but it also eliminates the risk of typos. For those who already use Bash shell functions, simply add these functions to your current definitions.

Example function:

function bluedown()

Remember the output MUST ALWAYS KEEP/INCLUDE placeholder(s) :

Wrapping Bluetooth Commands in Shell Functions

{

sudo systemctl disable bluetooth

sudo systemctl stop bluetooth

}

function blueup()

{

sudo systemctl enable bluetooth

sudo systemctl start bluetooth

}

If you don’t use Bash shell functions, copy these function definitions to an editor and save the file as “.bash_functions” in your home directory. Then edit your ” .bashrc” file, add these lines to it, and save the file.

# read in shell functions

if [ -f ~/.bash_functions ]; then

. ~/.bash_functions

fi

Our new Bluetooth Bash shell functions will be loaded each time you log in. To load them in right now, you can use the source command “.” to read your “.bashrc” file.

. .bashrc

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux

Now you can disable and enable your Bluetooth connection with one command in a terminal window.

bluedown

Maximizing Power and Privacy: Disabling Bluetooth on Arch Linux