15

I have this (hopefully) irrational fear someone might hijack my webcam, especially since some of my colleagues started to put some tape around theirs.

For some reason I am sometimes not able to access /dev/video0 while using skype. A while ago I made the experience that only one process can access my camera.

How can I find out which process (if?) is currently using my webcam? Also how can I unmount and re-mount the webcam?

Thank you

2 Answers 2

32
$ lsof /dev/video0

Should tell you which processes are accessing the device, if any.

2
  • Seems nothing is accessing it. How to mount/unmount it?
    – Qohelet
    Feb 6, 2015 at 4:12
  • You don't mount a video device - for testing just fire up any app that makes use of it ....
    – tink
    Dec 5, 2019 at 18:28
0

You can use auditd to monitor your video device, and it will log it to /var/log/audit/auditd.log. It will tell you what application is accessing the device. Pretty cool.

1
  • 1
    A complete answer would have how to use the auditd command.
    – David
    May 3 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .