Restrict USB on (Fedora) Linux

Hey everyone!
Is there a program or extension that can be installed on Fedora 36 / Linux in general where you have to explicitly allow any USB device that’s plugged in? A bit like the new MacOS security update that came with Ventura.


Thanks in advance! :orange_heart:

Did you mean a program to allow or deny specific USB devices? I think that is the TLP.


To install on Fedora

# dnf install tlp

Edit: Sorry I was wrong. It seems that it controls USB devices to apply the auto-suspend mode.

Exclude USB device IDs from autosuspend mode. Useful for devices having difficulties in waking up from autosuspend. Use tlp-stat -u to determine IDs. Multiple IDs are separated with blanks.

Actually TLP will only prevent the device from suspending, it wont block it.

If you go to Settings → Removable Media you can set what it does when you add media to the device.

Additionally by using the dconf Editor you can search for automount and turn one or both settings off. This will prevent automatic mounting of USB devices.