How to turn off my ubuntu web camera?

Solution 1:

Thank you guys, the problem is gone.

- I used the command : lsof | grep video0 to find the software using my webcam. It was FireFox.

- I just restarted FireFox, and then the webcam turned off.

Solution 2:

If the webcam behaves weirdly, not automatically turning off for example, you can:

To disable the webcam run:

sudo modprobe -r uvcvideo

It removes the module from the Linux Kernel.

To re-enable the webcam you can either restart or run:

sudo modprobe -a uvcvideo

Reinserts the module.

Solution 3:

  1. sudo rmmod -f uvcvideo(to kill laptop camera)

  2. sudo modprobe -r uvcvideo(to restart the video module)

  3. sudo modprobe uvcvideo(to restart the laptop camera)

  4. sudo modprobe -a uvcvideo(can be used while skipping steps 2&3 to restart the camera directly)