Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used:

sudo sh -c "echo UUID=`diskutil info /Volumes/WD\ SmartWare/ | grep 'UUID' | awk '{print $NF}'` none hfs rw,noauto 0 0 >> /etc/fstab" 

to deactivate the VCD but now want to lock the drive again using the VCD so i'd like to reverse the above code. But i'm a bit unsure what code i need to use as etc/fstab didn't exist originally.

share|improve this question

To be sure, sudo cat /etc/fstab and verify it contains only a single line. Then sudo rm /etc/fstab will delete the file. Since it didn't exist before, all settings will be reverted to default.

If there's more than one line, there should be only a single line containing none hfs rw,noauto 0 0 toward the end. Enter sudo vim /etc/fstab, move the cursor to that line using arrow keys, press dd (will not be printed), then enter :wqand press Enter. Follow this description to the letter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.