19.6 C
Texas

How to set a drive as read-only in Windows 10

Hello! Hard drives are a fundamental element in any operating system. Of course, Windows 10 is no exception. In fact, this is the medium where programs and applications are installed. In addition, the hard disks store the information and the data of the users. Consequently, security on these drives is a fundamental aspect. Since it is necessary to prevent other users from acting on the device and deleting the information on it. In this way, data privacy is increased. Additionally, this operation can be done on a hard disk or a specific volume. Without further ado, let’s see how to set a drive as read-only in Windows 10.

Setting a volume as read-only.

This time we will use the command diskpart. This command is the built-in disk and volume manager in Windows 10. With this intention, you open a Command Prompt as administrator To do this, press the Win+E combination and type CMD in the search bar.

launches a CMD as an administrator
launches a CMD as an administrator

It is then time to list the active volumes with the following command:

list volume
Diskpart showing the list of available volumes
- Advertisement -

Each volume will be immediately displayed with your information. Then select the volume using the following syntax:

select volume #
Select the volume

Once selected, we will modify its attributes to read-only with the following command:

attributes volume set readonly
Setting a volume to read only.
Setting a volume to read only.

After the command is executed, the volume is set to read only.

Setting a read-only disk in Windows

When protecting an entire disk, the procedure is similar. First, you have to list the current disks. With this intention, execute the following command:

list disk
List of the active disks in Windows 10
List of the active disks in Windows 10

Once again, select the desired disk:

select disk #
Please select the disk to work with
Please select the disk to work with

Now it’s time to assign the read-only attribute to the disk:

attributes disk set readonly
Sets the attributes for the disk

It is possible to undo the option. That is, remove the restriction to the disk or volume. With this in mind, just execute the following command:

attributes disk clear readonly
Remove the attributes to the disk

In this simple way, we have seen how to set a drive as read-only in Windows 10. In this way it is possible to increase the data protection of the devices. Additionally, it prevents any accidental formatting by any user. Before I go, I invite you to join our Telegram group. Also, please check out our post about the Mobility Center in Windows 10. Bye!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article