Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nealandrews

macrumors newbie
Original poster
Jul 26, 2017
5
0
Hi guys

I used the following terminal commands to stop MacOS automatically mounting an external USB drive...

sudo pico /etc/fstab
UUID=NUMBER none hfs rw,noauto

Source:
https://www.cnet.com/uk/how-to/how-to-prevent-a-volume-from-mounting-at-boot-in-os-x/#

(The USB drive is attached to a Cinema Display, so I was trying to stop it mounting when I plug my MacBook Pro into the display, simply because it's an archive that I don't use often, and it's really noisy when it spins.)

However, now when I plug in the drive, it doesn't mount! Obviously. My bad, I know.

How do I reverse this Terminal command?

Many thanks

Neal
 
sudo means superuser do - it gives you permission to write/edit protected files.
pico is a terminal/text editor
/etc/fstab is a file system table, where permanent mount info is kept.
The UUID line is supposed to identify a specific drive and give mount info.

Be very careful about changing this file.
You can probably fix this by removing the UUID line you added.
It might be safer if you copy and paste that file text (/etc/fstab) here and let us give specific instructions.
 
If you have changed how use the drive and want it automatically mount every time it's connected, then deleting file is want you want, presuming there are no other entries that you have made to fstab.

If you still don't want the drive to mount automatically but will access the drive once in a while, you can keep the fstab file intact but you should be able to use Disk Utility to mount the drive manually.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.