> For the complete documentation index, see [llms.txt](https://carry0987.gitbook.io/raspberry-pi-note/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://carry0987.gitbook.io/raspberry-pi-note/book_source/article/02.rpi3-disable-bluetooth-or-wifi-by-default.md).

# RPi3 Disable Bluetooth Or WiFi By Default

## RPi3 Disable Bluetooth Or WiFi By Default

### Step

1. Use `sudo mount /dev/mmcblk0p1 /mnt` to mount SD Card ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8KZwIUkf4Q55wY%2Fimg_1.jpg?generation=1544866557010555\&alt=media)
2. Use `sudo vim /mnt/config.txt` to edit config ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8M45HFqB5r5XHA%2Fimg_2.jpg?generation=1544866557286406\&alt=media)
3. Disable WiFi Add the following script to disable WiFi

   ```
    dtoverlay=pi3-disable-wifi
   ```

   ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8QQQ77l5hZsKK0%2Fimg_3.jpg?generation=1544866557452483\&alt=media)
4. Disable Bluetooth Add the following script to disable Bluetooth

   ```
    dtoverlay=pi3-disable-bt
   ```

   ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8TmhFfi4cItJR7%2Fimg_4.jpg?generation=1544866556738823\&alt=media)
5. And then use the following script to shutdown the services of bluetooth

   ```
    sudo systemctl disable hciuart.service
   ```

   ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8VplApTyNA-VSi%2Fimg_5.jpg?generation=1544866556850466\&alt=media) Then

   ```
    sudo systemctl disable bluetooth.service
   ```

   ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8XhQo5zaMK3cC6%2Fimg_6.jpg?generation=1544866557297258\&alt=media)
6. Reboot

   ```
    sudo reboot
   ```

   ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8Zk5pGeEpDNkoq%2Fimg_7.jpg?generation=1544866556725844\&alt=media)
7. Now you can use `iwconfig` to check if the WiFi is disabled ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8ap70Xs4e4Gvd6%2Fimg_8.jpg?generation=1544866556443289\&alt=media)
8. Also can use `hciconfig` to check if the Bluetooth is disabled ![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8cYjhq30Xzxrov%2Fimg_9.jpg?generation=1544866556745563\&alt=media)

## Note

I don't know why if I use `sudo systemctl disable bluealsa.service` to disable bluealsa,\
&#x20;the raspberry pi will show this :\
&#x20;`Failed to disable unit: No such file or directory`\
&#x20;![](https://1629731818-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTkx9vj8rDQgjbGkVku%2F-LTlDC2gRIuHSiDNZUjc%2F-LTlDD8e_Brwsvi26O9R%2Fimg_10.jpg?generation=1544866557750814\&alt=media) Maybe Raspbian-Stretch has remove this service by default ?
