For security or any other reason, here’s how to disable your laptop’s webcam in Ubuntu 18.04, and also all other current Ubuntu releases.
To disable Webcam temporarily:
You can disable your webcam device easily via modprobe command.
Open terminal either via Ctrl+Alt+T or by searching for ‘terminal’ from app launcher. When it opens, run command:
sudo modprobe -r uvcvideo
The command removes the module from Linux kernel. Webcam is disabled until you reboot Ubuntu. Just start (or restart) Cheese to check it out:
To permanently disable webcam in Ubuntu:
You can add a rule into configuration file, so your Ubuntu machine never starts the webcam kernel module on boot.
Open terminal and run command to edit the configuration file:
sudo gedit /etc/modprobe.d/blacklist.conf
When the file opens, add two new lines and save it.
#Disable webcam blacklist uvcvideo
To revert the changes, simply remove the 2 lines, save the file and finally reboot.