I just can't figure a way to change my Bluetooth device name.
Is there any command?
It seems the option was removed from the Bluetooth control panel, but you should still be able to change the name via the command line:
sudo hciconfig hci0 name 'Device Name'
Once you run the command, you should be able to verify the change by bringing up the Bluetooth control panel again and checking the device name.
You can't change bluetooth device name from control panel in ubuntu yet. Here is the bug report, which provides this workaround:
If you want to change the bluetooth device name permanently, you have to create a file called
/etc/machine-infowhich should have the following content:PRETTY_HOSTNAME=device-name
After this, restart the Bluetooth service:
sudo service bluetooth restart
Or reboot.
What I did (on 12.04):
/var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config~# service bluetooth restart)/etc/bluetooth/main.conf ?)I am using Blueman Bluetooth Manager. There is an option to change a computer's BT name in:
Adapter → Parameters
To change the bluetooth host name permanently, on Ubuntu 14.04 or later:
Open a terminal with CTRL-ALT-T
Edit /etc/bluetooth/main.conf replacing "%h" with the computer name you want. "%h" always seems to represent "ubuntu" on my systems for some reason.
gksudo gedit /etc/bluetooth/main.conf
For example change Name = %h-%d to Name = gruber-%d
`
Remove /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/config to make your system forget the old name. The xx:xx:xx:xx:xx:xx has a hexadecimal value unique to your bluetooth hardware.
sudo rm /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/config
Restart the bluetooth service
sudo service bluetooth restart
(Under 15.04 or later:)
sudo systemctl restart bluetooth.service
You can check the new name by opening the Bluetooth settings. The last two steps are from Marx's answer.
The default Bluetooth package (bluez) comes with a command-line utility bluetoothctl that can set/reset the broadcast name (the "controller alias").
To change the broadcast name to new-name:
bluetoothctl system-alias new-name
To remove the alias, setting the broadcast name back to your computer's name:
bluetoothctl reset-alias
This will modify the appropriate settings in /var/lib/bluetooth automatically. MakeUseOf has a nice introduction on what you can do with bluetoothctl.
You can change the name of a bluetooth remote device on your PC :
check the MAC adress of the device in the bluetooth settings. It looks:
XX:XX:XX:XX:XX:XX
open the Terminal and type:
sudo gedit /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config/info
if it asks for the password, type it (you won't see it)
modify (only) the value corresponding to 'Name'
Name=modified_name_as_you_like_it
The change will not be instantaneous !
Restart the service (or the PC), using the command:
sudo service bluetooth restart
On Ubuntu 20.04 you can do this from the settings.
Settings > About > Device Name
Reboot your computer for the changes to take effect.
On Ubuntu 24.04. See this answer: Changing bluetooth device name
In summary:
bluetoothctl has a prompt that is accessed simply by running the command.
Its commands can also be used without accessing the prompt, but that way there is no autocompletion.
There is a distinction between external devices (mouse, keyboard, gamepad, etc.), and the host controllers (built-in BT card, external USB BT adapter, etc.).
With bluetoothctl is possible to change both device and controller alias, the process can be summed up in 3 steps:
The commands are:
bluetoothctl to access its promptlist to list the available controllers
select 00:11:22:33:44:55 to select the controller to modify
TAB, in my case is the only 1 address availablesystem-alias "new alias for my BT controller" to modify the controller aliasbluetoothctl to access its promptdevices to list the available devices
devices Connectedconnect AA:BB:CC:DD:EE:FF to select the devices to modify
TABset-alias "new alias for my BT device" to modify the device aliasIn Ubuntu 20.10 look at
sudo grep Alias /var/lib/bluetooth/*/settings
edit the value Alias with
sudo gedit /var/lib/bluetooth/*/settings
For example call it NewDeviceName@yourdomain.net
Then call
sudo hciconfig hci0 name 'NewDeviceName@yourdomain.net'`
No need for reboot or bluetooth restart.
Alternatively you can do this from the settings:
Settings -> Info -> Gerätename
I guess in english it is:
Settings -> About -> Device Name
sudo apt-get update; sudo apt-get install -y nano
sudo nano /var/lib/bluetooth/*/config
sudo service bluetooth restart
Update the value for “name”. In my case, it was: Ubuntu-0