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
sudo rmmod -f uvcvideo
(to kill laptop camera)sudo modprobe -r uvcvideo
(to restart the video module)sudo modprobe uvcvideo
(to restart the laptop camera)sudo modprobe -a uvcvideo
(can be used while skipping steps 2&3 to restart the camera directly)
Solution 4
If you know the application name, you can use the following to get the process ID:
ps -fA | grep application_name
Output: process_name PID PPID .....
Then you can kill the process using:
kill -9 PID
Related videos on Youtube
Amine Soumiaa
Software Engineering Student at Rennes University
Updated on September 18, 2022Comments
-
Amine Soumiaa over 1 year
I was using facebook messenger, and When I finished my call, the web cam stilled working.I have an integrated camera in my laptop HP 630. Is there a way to turn it off ? Thanks.
-
wjandrea about 7 yearsIt might just be glitched. Have you tried restarting?
-
MadMike about 7 years@NeoTheThird shameless plug, but this most probably readily available and thus cheaper: askubuntu.com/a/779909/75166
-
Amine Soumiaa about 7 yearsthe problem is solved, but I am using it :xD
-
-
smac89 almost 4 yearsJust run
lsof /dev/video0
. That's often much faster than running lsof on all files -
Rolas over 3 yearslsmod | grep uvcvideo (to check if camera killed or alive)