How to turn bluetooth on ubuntu

Turn on/off Bluetooth from shell not from applet

I want to be able to turn on and off the Bluetooth as is being done from the applet button. How can I do this?

7 Answers 7

The commands you’re looking for are:

Thank you, works on Pop_OS! 22.04. My trackpad was someone turned off — happened only when I am not logged in, otherwise the trackpad worked when I was logged out. After executing your commands I managed to get a hold of my blue tooth mouse and go into the settings to enable the trackpad.

sudo /etc/init.d/bluetooth stop 
sudo /etc/init.d/bluetooth start 
sudo /etc/init.d/bluetooth restart 

this is not correct. turning off bluetooth and stopping the service are different things (most notably, the latter requires sudo permissions).

On systems that use systemd , including Ubuntu 15.04 and later:

systemctl start bluetooth 

for turning off Bluetooth

systemctl restart bluetooth 

werewolf_65 — FYI you can omit .service because it is assumed if there is no extension (and who likes typing)

I also discovered that I had too reboot, as there was some state info that wasn’t reset without that. Now all is working properly — I hope this helps others. Beware of attempting to turn on bluetooth through Settings. And when working with keyboard/mouse that used a 2.4 Ghz dongle, I needed the bluttooth on, even though I would have thought that as being irrelevant.

Источник

Включение и выключение Bluetooth

Вы можете включить Bluetooth для подключения к другим Bluetooth-устройствам или отключить его для экономии энергии. Чтобы включить Bluetooth:

  1. Откройте Обзор и начните вводить: Bluetooth .
  2. Нажмите Bluetooth для открытия панели.
  3. Включите переключатель на панели заголовка.

На многих ноутбуках есть аппаратный переключатель или комбинация клавиш для включения и выключения Bluetooth. Найдите переключатель на компьютере или клавишу на клавиатуре. Доступ к этой клавише часто осуществляется с помощью клавиши Fn .

Чтобы выключить Bluetooth:

Компьютер остаётся видимым пока открыта панель Bluetooth .

Дополнительная информация

  • Bluetooth — Подключение к устройствам через Bluetooth для передачи файлов или использования беспроводного аудио.

You can choose the displayed language by adding a language suffix to the web address so it ends with e.g. .html.en or .html.de.
If the web address has no language suffix, the preferred language specified in your web browser’s settings is used. For your convenience:
[ Change to English Language | Change to Browser’s Preferred Language ]

Читайте также:  Home stereo systems bluetooth

The material in this document is available under a free license, see Legal for details.
For information on contributing see the Ubuntu Documentation Team wiki page. To report errors in this documentation, file a bug.

Источник

How to Use Bluetooth on Ubuntu for File Transfer

Ubuntu Bluetooth File Transfer

Even with the emergence and widespread use of modern file transfer protocols and devices, Bluetooth is still a trusted method for file transfers and device connection to and from your system. Your system may or may not come with built-in Bluetooth stack. You can, however, use an external bluetooth dongle to get your goal.

This article explains how to use Bluetooth on your Ubuntu for file transfer, both through the UI and the command line. The article will also help you in resolving any glitches that you may encounter while turning on and transferring files on your Ubuntu. This includes installing the Bluetooth software utility Bluez on your system if it not installed. And also, unblocking Bluetooth if that is the cause of the problem. The GUI is good enough for beginners to work with Bluetooth but the command line is the actual thing you will need to troubleshoot and resolve any Bluetooth connectivity problems.

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system.

Use Bluetooth Through the Graphical User Interface

In order to use bluetooth on your Ubuntu, you need to ensure that the Bluez utility is installed on your system. All the latest versions of Ubuntu have Bluez installed by default. However, if your system lacks it, Bluez can be installed both through the Ubuntu Software manager and the command line. This utility is developed by Canonical and is available on the Snap store.

How to Install Bluez (If Your System Lacks It)

For a person who does not want to open the Command Line much, installing software present in the Ubuntu repository through the UI is very simple. On your Ubuntu desktop Activities toolbar/dock, click the Ubuntu Software icon.

Ubuntu Software Center Icon

In the following view, click on the search icon and enter Bluez in the search bar. The search results will list the Bluez entry as follows:

Search for Bluez

Click bluez and the following view will appear:

Install Bluez Bluetooth software

Click the Install button to begin the installation process. The following authentication dialog will display for you to provide your authentication details as only an authorized user can install software on Ubuntu.

Authenticate as admin

Enter your password and click the Authenticate button. After that, the installation process will begin, displaying a progress bar as follows.

Installing Bluez

Bluez for Ubuntu will then be installed on your system and you will get the following message after a successful install:

Читайте также:  Bluetooth увк что такое

Launch Bluetooth Software

You should now be able to use your bluetooth. In case you encounter any problem after installation through this method, please refer to the section of this article that explains the use of the software through the command line.

How to Turn the Bluetooth On

The most convenient way to turn on your system’s Bluetooth and configure it is through the Ubuntu Settings utility.

In order to access Settings, click on the downward arrow located at the top-right corner of your Ubuntu screen, and then click the settings icon from the following view:

Turn Bluetooth on

Alternatively, you can enter ‘settings’ in your Ubuntu’s application launcher search to open the Settings directly.

Ubuntu Settings

The Settings utility opens in the Wi-Fi tab by default. You need to click on the Bluetooth tab in order to turn on and configure Bluetooth.

This is how the Bluetooth view looks like:

Bluetooth settings

You can see that the slider button in the top bar is turned off. Simply turn this button on in order to turn on the Bluetooth service/device on your system.

Bluetooth

You can also open the Bluetooth settings directly through the application launcher search as follows:

How to Use Bluetooth for File Transfer

As soon as you turn Bluetooth on, it will start scanning for any Bluetooth devices around you. Click on the device you want to connect to/pair with. Your system will now generate a PIN and display it on your Bluetooth device as well.

Confirm Bluetooth PIN

You need to make sure that the PIN displayed on both the devices is the same. Click the Confirm button on the above-displayed dialog in order to confirm that both the PINs match. Now your system’s Bluetooth will be paired with the Bluetooth on your external device and is set up to share files.

Bluetooth Device Paired

You can now share files to and from your Ubuntu system.

Use Bluetooth Through the Command Line-Terminal

How to Install Bluez (If Your System Lacks It)

Bluetoothctl is a command line utility for pairing Bluetooth devices to your system’s Bluetooth. Most Linux systems have the Bluez utility installed by default and it also comes with bluetoothctl. However, if your system lacks it, you can install it by using one of the following commands:

$ sudo apt-get install bluez

You can open the Ubuntu command line, the Terminal, either through the application launcher search or the Ctrl+Alt+T shortcut.

Please note that only an authorized user can add, remove, and configure software on Ubuntu.

Install bluez on the shell

You can verify if bluetoothctl is installed on your system by running the following command:

How to Turn the Bluetooth On

Through the following command, you can check if your system’s Bluetooth is currently in on or off state:

Читайте также:  Airprint wifi or bluetooth

Check Bluetooth state

The Bluetooth device’s Soft blocked status indicates if the device is on or off.

Soft blocked: yes-the device is turned off

Soft blocked: no-the device is turned on

Use the following command in order to unblock/turn on the Bluetooth stack:

$ sudo rfkill unblock bluetooth

Unlock Bluetooth

Your Bluetooth stack is now ready for use and file transfer.

How to Use Bluetooth for File Transfer

Now we will make use of the powerful bluetoothctl utility in order to pair your system’s Bluetooth with an external device for file transfer.

First, enter the following command in order to start using the utility:

Linux Bluetoothctl command

You Terminal is now in the Bluetooth prompt. Type help in this prompt to see what all you can do here:

Bluetooth command prompt

Let us turn the scan on in order to scan for the available Bluetooth devices around. Enter the following command in the Bluetooth prompt:

Scan for Bluetooth devices

The system will start scanning, and then list the available Bluetooth devices. Please copy the device ID from the list, of the device you want to connect to. If you want more information on the device, you can use the following command:

Bluetooth Device info

Now, use the following command in order to pair with a certain device:

Pair Bluetooth Devices in Ubuntu

Now the program will display a passkey on your Bluetooth device. If the passkey matches the one you get through the pair device command, enter yes.

Device Pairing successful

Your device will now be paired with your system’s Bluetooth. Your prompt will also show the name of your device.

Before using the Bluetooth device to transfer files to and from, you need to add the device as a trusted Bluetooth device. Use the following command in order to add a device as trusted:

Trust info

Once the required device is paired and trusted, you can easily use it for file transfer between the two Bluetooth devices.

Type exit in order to quit bluetoothctl and return to your normal command prompt.

How to Check the Bluetooth version?

In the Bluetooth prompt, you can check the version of your Bluetooth software through the following command:

Check Bluetooth version

How to turn off Bluetooth?

It is a good security practice to switch off your system’s bluetooth as soon as you are done with the file transfers. Enter the following command in your Terminal after you have exit bluetoothctl with the exit command:

$ sudo rfkill block bluetooth

Lock Bluetooth

This is all you need to know in order to use the Bluetooth facility on your Ubuntu. The command line definitely provides many more options that you can utilize for device pairing. However, the UI interface is also good enough to work with basic file transfer.

About This Site

Vitux.com aims to become a Linux compendium with lots of unique and up to date tutorials.

Latest Tutorials

Источник

Оцените статью
Adblock
detector