0

This question already has an answer here:

I want to remove write protected from pen drive or just I want to format it but I'm unable to do so.

$ sudo mkfs -t vfat /dev/sdb1
mkfs.vfat 3.0.14 (23 Jan 2023)
mkfs.vfat: unable to open /dev/sdb1: Read-only file system

How can I resolve this?

marked as duplicate by sudodus, Zanna, Charles Green, user535733, Amanda Feb 20 '18 at 6:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

Check whether your pen drive has a write protect switch on it, if none, the following command should help:

sudo hdparm -r0 /dev/sdb

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