Skip to content
TrySitePrice

Linux Disable Mounting of Uncommon Filesystem

Best/Tutorial

To disable the mounting of uncommon filesystems on a Linux system, you can modify the /etc/modprobe.d/modprobe.conf file.

Here are the steps to disable the mounting of uncommon filesystems:

  1. Open the /etc/modprobe.d/modprobe.conf file with a text editor, such as vi or nano.
  2. Add the following line to the file to disable the loading of uncommon filesystem modules:
install cramfs /bin/falserninstall freevxfs /bin/falserninstall jffs2 /bin/falserninstall hfs /bin/falserninstall hfsplus /bin/falserninstall squashfs /bin/falserninstall udf /bin/false

This will disable the loading of the following filesystem modules: cramfs, freevxfs, jffs2, hfs, hfsplus, squashfs, and udf.

  1. Save and close the file.
  2. Reboot the system for the changes to take effect.
rnAfter rebooting, the system will not load the specified filesystem modules, which will prevent the mounting of uncommon filesystems.