Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.