Home FAQ How To Disable Built-in Webcam In Linux
Disable Built-in Webcam In Linux

How To Disable Built-in Webcam In Linux

By sk
2807 Views

Today, we'll see how to disable built-in webcam or external webcam when it's not used, and how to enable it back when it's required in your Linux box. Disabling web cam can help you in many ways. You can prevent from the malware taking control of your integrated webcam and spy on you and your home. We have read countless stories in the past that some hackers can spy on you using your webcam without your knowledge. By hacking your webcam, the user can share your private photos and videos online. There could be many reasons. If you're ever wondered how to disable the web cam in your Laptop or desktop, you're in luck. This brief tutorial will show you how. Read on.

I tested this guide on Arch Linux and Ubuntu. It worked exactly as described below. I hope this will work on other Linux distributions as well.

Disable Built-in webcam in Linux

First, find the web cam driver using command:

$ sudo lsmod | grep uvcvideo

Sample output:

uvcvideo 114688 1
videobuf2_vmalloc 16384 1 uvcvideo
videobuf2_v4l2 28672 1 uvcvideo
videobuf2_common 53248 2 uvcvideo,videobuf2_v4l2
videodev 208896 4 uvcvideo,videobuf2_common,videobuf2_v4l2
media 45056 2 uvcvideo,videodev
usbcore 286720 9 uvcvideo,usbhid,usb_storage,ehci_hcd,ath3k,btusb,uas,ums_realtek,ehci_pci

Here, uvcvideo is my web cam driver.

Now, let us disable webcam.

To do so, edit the following file (if the file is not exists, just create it):

$ sudo nano /etc/modprobe.d/blacklist.conf

Add the following lines:

##Disable webcam.
blacklist uvcvideo

The line "##Disable webcam" is not necessary. I have added it for the sake of easy understanding.

Save and exit the file. Reboot your system to take effect the changes.

To verify, whether Webcam is really disabled or not, open any instant messenger applications or web cam software such as Cheese or Guvcview. You will see a blank screen like below.

Cheese output:

Guvcview output:

See? The web cam is disabled and is not working.

To enable it back, edit:

$ sudo nano /etc/modprobe.d/blacklist.conf

Comment the lines which you have added earlier or completely remove them.

##Disable webcam.
#blacklist uvcvideo

Save and close the file. Then, reboot your Computer to enable your Webcam.

Does it enough? No. Why? If someone can remotely access your system, they can easily enable the webcam back. So, It is always a good idea to cover it up with a tape or unplug the camera or disable it in the BIOS when it's not used. This method is not just for disabling the built-in webcam, but also for external web camera.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

5 comments

aum patil September 10, 2018 - 10:27 pm

I just typed sudo modprobe -r uvcvideo in terminal and it disabled my webcam. Tried sudo modprobe uvcvideo but turned out to be of no use.Ubuntu 16.04 user. please help

Reply
sk September 11, 2018 - 11:28 am

Looks like you removed the module, not disabled it. Remove the following lines in blacklist.conf file and try to enable it back.

##Disable webcam.
blacklist uvcvideo

Reply
raieton January 15, 2019 - 12:17 am

How can I manage applications that have an access to my webcam without disabling the webcam?

Reply
ElDee September 22, 2019 - 4:40 am

This is good. It really works, but can you point me to a solution for the following: I have an Acer 7750 laptop with a built in webcam. I’ve physically disabled it (unplugged the camera and left the wire inside). However, the hardware is still being recognized. I use an external USB webcam, and I’d like to only have that available. When I try your solution, it blocks the external camera, too. Is there a way to keep the built in webcam disabled (not shown in any camera selection list) while still being able to use the external USB? TIA

Reply
sk September 23, 2019 - 3:48 pm

Hey, please look into this thread. Someone has posted a solution for your question. https://askubuntu.com/questions/189708/how-to-disable-integrated-webcam-and-still-be-able-to-use-an-external-one

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More