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:
- Open the
/etc/modprobe.d/modprobe.conffile with a text editor, such asviornano. - Add the following line to the file to disable the loading of uncommon filesystem modules:
install cramfs /bin/false
install freevxfs /bin/false
install jffs2 /bin/false
install hfs /bin/false
install hfsplus /bin/false
install squashfs /bin/false
install udf /bin/false
This will disable the loading of the following filesystem modules: cramfs, freevxfs, jffs2, hfs, hfsplus, squashfs, and udf.
- Save and close the file.
- Reboot the system for the changes to take effect.
After rebooting, the system will not load the specified filesystem modules, which will prevent the mounting of uncommon filesystems.