Enable and Disable Thumb Drive Write Protection
This works with thumb, SD, microSD, SSDs, and hard drives.
UNIX was intentionally written to use terse commands “ls”, “su”, “cd”… So, why the F do I want to type “sudo ” before every root command on my personal machine?
If hdparm isn’t installed on the system, install it.
Determine the drive with the lock. Use parted, gparted, fdisk… You pick your fav.
$ su - # dnf install -y hdparm # umount /dev/sdd1 # hdparm -r0 /dev/sdd1 'Disable write protection # hdparm -r1 /dev/sdd1 'Enable write protection # mount -o remount,rw /dev/sdd1
If that doesn’t work and it’s thumb or SD, pull it out and reinstall it.