I have an integrated webcam in my laptop. I know that it works and that ubuntu recognized it because at installation it asked if I wanted a photo taken for some kind of image associated with my account. When I look in system settings, I do not see any webcam in the hardware section. I would like to disable the webcam like you can do in Windows, but as I can't find it in my hardware section, how can I disable it? I cannot even unplug it as it is integrated into the monitor. Am I looking in the wrong place?? I am using 12.04
Cameras are controlled by the
uvcvideo
kernel module.You can disable the camera until reboot by opening a terminal and typing
sudo modprobe -r uvcvideo
. You will be asked for your password, and after typing it, if there are no errors shown in the terminal, your webcam should be disabled.If you got the error message:
modprobe: FATAL: Module uvcvideo is in use.
after trying to remove the uvcvideo module, you can try to force its removal with the following:sudo rmmod -f uvcvideo
(thanks thiagowfx)To enable your webcam again, type
sudo modprobe uvcvideo
into terminal.If you want the camera to be disabled when you reboot, then press
ALT+F2
and paste this command:You will be asked for your password. After giving it, a text file should open. Paste at the end of the text file on a new line:
Then save the file and exit. Next time you start Ubuntu, the webcam should be disabled.
How to disable all webcams:
Or run (for ubuntu 18.04 and later):
...at the bottom. Save the file and quit the text editor.
How to disable a single webcam:
lsusb
. My output:If it isn't clear which device is your webcam, you can try
lsusb -t
and look forClass=Video
orDriver=uvcvideo
or similar to guess which one it is. My output:lsusb
surrounding the colon:So in my case, the vendor id is
0bda
and the product id is568c
.grep
there with the product id and if you get multiple results then also with the vendor id:returned:
and
returned:
In my case
1-5
is what I need.cd
into the directory from the previous step.The file
bConfigurationValue
in this directory needs to contain a0
to disable the device or a1
to enable it. But this file is owned by root so to alter it (change the 0 to a 1 to enable) ......to disable. You can check the camera and it will be disabled.
(where
1-5
is the directory we used and use a1
to enable)How about just taping it with some black colored tape? Take some black tape and put it on the webcam. Webcam disabled successfully! Unlike the answers above, this method works against malware attacks that try to enable your webcam as well!
I had luck with going into the BIOS for my laptop (Dell XPS 15 9570), where there was an option to disable the built-in webcam and microphone.