How do I enable and disable the laptop's camera from the terminal? And how will I know if it is on or of?

2 Answers 2


Press Ctrl+Alt+T on your keyboard to open the terminal.

When it opens, run command to disable the camera until reboot:

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.

To enable your webcam again, run:

sudo modprobe uvcvideo
  • Why any GUI is not appearing ? The command generates no error in terminal? Sep 25, 2014 at 17:24
  • 2
    there is no GUI is direct on bash
    – Otto
    Sep 25, 2014 at 17:26

As a complement to @Otto answer, you also asked how to check whether the camera is actually disabled or not. In order to do so you can check if the module is loaded or not using lsmod which shows the status of modules in the Linux kernel.

The module you disables in @Otto's answer is uvcvideo, therefore, you can check if it is loaded like this:

lsmod | grep uvcvideo

The output should be similar to this when the module is enabled:

uvcvideo               98304  0
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       49152  2 videobuf2_v4l2,uvcvideo
videodev              225280  3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc                     53248  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common

And when it is disabled no occurrences to uvcvideo should be returned from the command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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