Somebody use my webcam?

Is someone using my webcam?

It’s no secret that attackers can activate a webcam without the owner’s knowledge. In response, some laptop manufacturers have started adding physical privacy shutters or LED indicators. You can also buy stick-on covers, or just use a piece of tape — cheap and effective. But if you want to know programmatically whether your webcam is currently in use, there’s a simple way to check.

Problem: Some webcams have no indicator light, making it impossible to tell if they're active.

Solution: Run this command in the terminal:

lsof | grep video

If there's no output, the webcam is most likely inactive. To confirm it works, open a video app like Skype with the camera enabled, run the command again, and you'll see output this time. On Linux systems with v4l2, you can also check device status directly:

fuser /dev/video0

If the device is in use, the PID of the process using it will be printed.

NOTE: lsof | grep video lists all open file handles for video devices on Linux. On macOS, webcams are not exposed as /dev/video devices — use lsof | grep -i AppleCamera or check System Information → Camera to see which apps have camera access. macOS Ventura and later also shows camera indicator status in the menu bar.