Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
You do not see the webcam in the hardware section? Where are you looking at? What is the output of the lsusb command? – jap1968 Jul 22 '12 at 19:24
3  
In case you want to do this for security reasons, consider disabling the webcam in the system's BIOS settings as disabling it in software won't stop an attacker to re-enable it. – gertvdijk Dec 24 '13 at 19:00
up vote 17 down vote accepted

Run:

gksu gedit /etc/modprobe.d/blacklist.conf

Add

blacklist uvcvideo

at the bottom. Save the file and quit the text editor.

Regarding the comment:

Find the vendor and device id for the webcam with lsusb:

Bus 001 Device 002: ID 05a9:2640 OmniVision Technologies, Inc. OV2640 Webcam

Next ...

cd /sys/bus/usb/devices/
ls 

Do a "grep" on the vendor id and product id:

grep 05a9 */idVendor
1-1/idVendor:05a9

grep 2640 */idProduct
1-1/idProduct:2640

and 1-1 is what you need. cd into 1-1.

The file bConfigurationValue in this directory needs to contain a 0 to disable the device or a 1 to enable it. But this file is owned by root so to alter it (change the 0 to a 1 to enable) ...

 sudo -i
 echo 0 > bConfigurationValue

to disable. You can check the camera and it will be disabled.

This is not permanent yet. A reboot will set it back to what is was before. To make it permanent:

 sudo -i
 echo 0 > /sys/bus/usb/devices/1-1/bConfigurationValue

(where 1-1 is the directory we used and use a 1 to enable)

share|improve this answer
    
This disables all webcams. The OP states that "I would like to disable the webcam like you can do in Windows..." Windows (through the Device Manager) enables individual devices to be disabled and not an entire class of devices. It would be helpful if this answer was expanded to include instructions for disabling a specific webcam. – Nathan Osman Dec 24 '15 at 8:14
    
"like you can do in Windows..." Windows (through the Device Manager)" I am expected to know what windows does? >:-D Is this sufficient? – Rinzwind Dec 24 '15 at 9:41
    
Oh yes, that's much better :) – Nathan Osman Dec 24 '15 at 19:44

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:

gksu gedit /etc/modprobe.d/blacklist.conf

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:

blacklist uvcvideo

Then save the file and exit. Next time you start Ubuntu, the webcam should be disabled.

share|improve this answer
1  
Much better comment. Thanks for letting me know how to disable right away, and mentioning restart required! – Limited Atonement Aug 14 '13 at 14:29
    
Thanks for the complete answer! I would like to add the following: if you got the error message: modprobe: FATAL: Module uvcvideo is in use. after trying to remove the uvcvideo module, you could try to force its removal with the following: sudo rmmod -f uvcvideo. – thiagowfx Dec 1 '13 at 21:12
    
Thank you, I want to bind to Fn+Esc a script that enable/disable camera and microphone, and this is what I need to know. – Marco Sulla Sep 30 '14 at 13:32

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!

share|improve this answer
    
This is actually a plausible solution and fool-proof. – Braiam Dec 24 '13 at 19:35
1  
What if said tape is made out of one way transparent aluminum? A hole in every plan. :P – user128334 Jan 1 '14 at 6:00
    
@Gracchus Hmm. Transparent aluminum? Has that been invented yet? A hole in every hole! :P – Seth Jan 26 '14 at 2:12
2  
@Seth How do we know he didn't invent the thing? – user128334 Jan 26 '14 at 13:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.