How to Disable Webcam and Microphone on Linux

Channel: Linux
Abstract: sudo gedit /etc/modprobe.d/blacklist.conf Disabling Microphone To disable Microphone you first need to know which driver your sound card is using. Do

With the growing numbers of laptop users, more and more people are connected to the world with built-in webcam and microphone. But It comes with a price. As the world is moving towards digitization, more and more spyware are targeting webcam to steal sensitive and classified information about users. It is obvious that no other OS can beat Linux for its security, We love Linux for the same reason. But user installs something from untrusted source or somebody gets physical access to the system, a user might be a victim of surveillance and data hack. So, it is essential to take these threats seriously and act wisely. What to do and how to do? NO worries, I present you to step by step guide to disabling microphone and webcam.

To disable Webcam or Microphone you must have root permission.

Disabling Webcam

After having root permission,  Do the following steps:

How To Turn Off Safe Chat in Roblox...

To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video

How To Turn Off Safe Chat in Roblox on PC
  1. Open new terminal from launcher or just press Clt + Alt + T
  2. Run this command:
sudo sh -c "echo 'blacklist uvcvideo' >> /etc/modprobe.d/blacklist.conf"

This command will add the line "blacklist uvcvideo" at the end of "blacklist.conf" file located in /etc/modeprobe.d directory.

You can manually write that line (blacklist uvcvideo) in blacklist.conf file. Since blacklist.conf is read-only for a normal user so you have to open it on editor using sudo as follow:

sudo gedit /etc/modprobe.d/blacklist.conf

Now add "blacklist uvcvideo" anywhere in a newline.

  • Restart your PC. The webcam is disabled now.

If you want to enable the webcam in future just run the following command in Terminal

sudo sed -i '/blacklist uvcvideo/d' /etc/modprobe.d/blacklist.conf

or change blacklist.conf file using your favorite text editor to comment or remove the line "blacklist uvcvideo":

 sudo gedit /etc/modprobe.d/blacklist.conf
Disabling Microphone

To disable Microphone you first need to know which driver your sound card is using.
Do the following steps:

  1.  Open Terminal from launcher or press Ctrl + Alt + T
  2.  Run this command to know driver:
cat /proc/asound/modules

it will show the driver name for the sound card.

  • Now run the following command, replacing "Your_driver" by the driver name you found above:
sudo sh -c "echo 'blacklist Your_driver' >> /etc/modprobe.d/blacklist.conf"

In my case, it is "snd_hda_intel"

This will add the line "blacklist Your_driver" (in my case "snd_hda_intel") at the end of file blacklist.conf at location /etc/modprobe.d/ .

You can also add the line "blacklist Your_driver" in the blacklist.conf file by opening the file with sudo as follows:

sudo gedit /etc/modprobe.d/blacklist.conf
  • Restart Your PC. The microphone is disabled now.

If you want to Enable Microphone in future, just Run this Command in the terminal.

sudo sed -i '/blacklist Your_driver/d' /etc/modprobe.d/blacklist.conf

Or you can enable it by the opening blacklist.conf file using the following command and commenting or removing the line "blacklist Your_driver".

sudo gedit /etc/modprobe.d/blacklist.conf 

By following above steps, You can successfully disable and enable microphone and webcam. I hope you have smooth execution of these steps. If you find any difficulties or have any doubts, please post a comment. I will try to address it as earlier possible. Cheers...

Ref From: linoxide
Channels:

Related articles