Skip to content

Instantly share code, notes, and snippets.

@taavi223
taavi223 / noautomount.sh
Last active December 19, 2025 16:29 — forked from niieani/no_automount.bash
Simple shell utility to configure an external drive to not auto mount on macOS
#!/usr/bin/env bash
# Modified from: https://akrabat.com/prevent-an-external-drive-from-auto-mounting-on-macos/
# Prevent external drives from auto-mounting on macOS
FSTAB=/etc/fstab
# Add a volume as not auto-mounted to the /etc/fstab file
# by its identifier. Also pass in the volume name to add a