How to Transfer Files Over Bluetooth on Arch Linux
Categories:
5 minute read
Bluetooth is a versatile wireless technology used for connecting devices and transferring data over short distances. Whether you’re sending photos to your laptop, moving music to your phone, or syncing files with another Linux system, Bluetooth can be a convenient option. On Arch Linux, Bluetooth support isn’t always configured out-of-the-box, but with the right packages and setup, it works just as well—if not better—than on other operating systems.
This guide will walk you through the installation, configuration, and file transfer process using Bluetooth on Arch Linux.
Why Use Bluetooth for File Transfer?
While there are faster methods for transferring large files (like USB drives or cloud services), Bluetooth still holds value, especially when:
- You don’t have a cable handy.
- You want a quick, wireless transfer between mobile and desktop.
- You need to send small documents or media files conveniently.
- You’re working with a device that doesn’t support network-based sharing easily.
Now let’s dive into how to get this working on Arch Linux.
Prerequisites
Before starting, ensure you have:
- A Bluetooth adapter (either internal or USB-based).
- Bluetooth enabled in your BIOS/UEFI settings (if applicable).
- Administrative privileges (
sudo
) to install packages and manage services.
Step 1: Install Required Bluetooth Packages
First, you need to install the core Bluetooth stack for Linux and some helpful utilities:
sudo pacman -Syu bluez bluez-utils blueman
What do these packages do?
- bluez: This is the official Linux Bluetooth protocol stack.
- bluez-utils: Includes command-line tools such as
bluetoothctl
,btmon
,btmgmt
, etc. - blueman: A GTK+ Bluetooth manager with GUI interface, helpful if you prefer not to use CLI.
Optionally, install obex
tools for file transfer support:
sudo pacman -S obexfs obexftp
Step 2: Start and Enable Bluetooth Service
Once installed, start the bluetooth
service and enable it to auto-start on boot:
sudo systemctl start bluetooth
sudo systemctl enable bluetooth
To verify it’s running:
systemctl status bluetooth
You should see something like Active: active (running)
.
Step 3: Pairing Devices via GUI (Blueman)
If you installed blueman
, launch the Bluetooth Manager:
blueman-manager
This interface will list available Bluetooth devices. To connect and pair:
- Make sure the target device (phone, laptop, etc.) has Bluetooth enabled and is discoverable.
- Right-click the device in Blueman and choose Pair.
- Confirm the pairing code on both devices.
- The device should now appear as Trusted.
If Blueman doesn’t recognize your adapter, ensure your user is part of the lp
and network
groups, and check dmesg
or journalctl
for hardware errors.
Step 4: Pairing Devices via Terminal (bluetoothctl)
If you prefer CLI or are working in a minimal environment, use bluetoothctl
:
bluetoothctl
Once inside the interactive shell:
power on
agent on
default-agent
scan on
Wait for your device to appear, then:
pair <device-mac-address>
trust <device-mac-address>
connect <device-mac-address>
Example:
pair 88:12:4E:56:9A:FC
trust 88:12:4E:56:9A:FC
connect 88:12:4E:56:9A:FC
To exit, type quit
.
Step 5: Sending Files to Another Device
If you want to send files from Arch Linux to another device, you’ll need a file transfer service like blueman-sendto
or use the obexctl
interface.
Method 1: Using Blueman (GUI)
- Open Blueman.
- Right-click the paired device.
- Choose Send a File.
- Select the file(s) you want to send.
- Confirm the transfer on the receiving device.
Method 2: Using bluetooth-sendto
(CLI)
Install gnome-bluetooth-3.0
if this tool is missing:
sudo pacman -S gnome-bluetooth-3.0
Then run:
bluetooth-sendto --device=<MAC> <file>
Example:
bluetooth-sendto --device=88:12:4E:56:9A:FC myphoto.jpg
A dialog may appear confirming the transfer.
Step 6: Receiving Files on Arch Linux
To receive files over Bluetooth, you must run a D-Bus session service capable of receiving OBEX file pushes.
Option 1: Using Blueman
- Open Blueman.
- Go to Plugins under the menu.
- Ensure “Transfer” and “OBEX Server” plugins are enabled.
- Set up the default save folder for received files (usually
~/Downloads
). - On the sending device, select Arch Linux from the Bluetooth list and initiate the file transfer.
You’ll see a prompt to accept or reject the incoming file.
Option 2: Using obexd
Manually
For headless systems, start the obexd
daemon manually:
/usr/lib/bluetooth/obexd
Alternatively, you can add this to your systemd startup or script if you frequently use it.
By default, incoming files are saved to ~/Downloads
.
Step 7: Troubleshooting Common Issues
1. Adapter Not Detected
Run
lsusb
orlspci
to confirm your adapter is recognized.Use
rfkill list
to ensure it’s not blocked:rfkill unblock bluetooth
2. Device Not Discoverable
Ensure your system is discoverable in
bluetoothctl
:discoverable on
3. File Transfer Fails
- Check if
obexd
is running. - Check D-Bus session logs with
journalctl --user -xe
.
4. Permission Issues
Ensure the user is in required groups:
sudo usermod -aG lp,network <yourusername>
Step 8: Automation Tips
If you frequently transfer files over Bluetooth, consider the following quality-of-life improvements:
Add
bluetoothctl
commands to a script for quick connection.Create a desktop launcher for
blueman-manager
.Use aliases in
.bashrc
for common commands like sending files:alias bt-send='bluetooth-sendto --device=88:12:4E:56:9A:FC'
Final Thoughts
Bluetooth file transfer on Arch Linux requires a bit of setup, but once configured, it’s as smooth and functional as on any other system. By installing the right tools and understanding how to pair devices, send, and receive files via both GUI and CLI, you can turn Arch into a reliable node in your local Bluetooth network.
It’s a great option for transferring files between desktop and mobile devices without needing USB cables, network shares, or cloud storage. Whether you’re using Blueman for a friendly interface or the terminal for headless operation, Arch Linux gives you the flexibility and control to make it work your way.
References
- Arch Wiki - Bluetooth
- BlueZ Official Documentation
man bluetoothctl
,man obexd
,man blueman
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.