This draft comes from a practical note I wrote while working with a physical disk through WSL 2. It is the kind of task that is easy to forget if you do it only occasionally, so I wanted to keep a clean version of the steps in one place.

The goal here was simple: identify the correct disk from Windows, attach it to WSL 2, verify it from Linux, wipe it safely, and then detach it again.

Why I Wrote This Down

When working across Windows and Linux, disk operations can feel more awkward than they should. The commands are not complicated, but the main risk is targeting the wrong device.

That makes this kind of note valuable: not because the commands are fancy, but because the sequence matters.

1. Identify the Disk in PowerShell

Start in an elevated PowerShell session and list the physical disks:

1
GET-CimInstance -query "SELECT * from Win32_DiskDrive"

Example output:

1
2
3
4
5
DeviceID           Caption                Partitions Size          Model
--------           -------                ---------- ----          -----
\\.\PHYSICALDRIVE0 System Disk            3          240054796800  Example SSD
\\.\PHYSICALDRIVE1 External Target Disk   1          1000202273280 Example SSD
\\.\PHYSICALDRIVE2 USB Work Disk          1          128034708480  Example SSD

Once I identified the correct device, I attached it to WSL 2 in raw mode:

1
wsl --mount \\.\PHYSICALDRIVE2 --bare

If the disk is unpartitioned or you are attaching it more generically, the pattern is the same:

1
wsl --mount <DiskPath>

2. Verify the Disk from WSL 2

Inside WSL, I checked the block devices before doing anything destructive:

1
lsblk

One important modern WSL detail: this note was written around the block-device workflow, which is why lsblk is still the first thing I check. In current Microsoft WSL documentation, disks mounted with wsl --mount are accessed under the path controlled by automount.root, whose default is /mnt/wsl, while Windows fixed drives are auto-mounted separately under /mnt/<drive-letter> by default. If you use --bare, the disk is only attached as a block device until you mount it yourself.

Example output:

1
2
3
4
5
6
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 389.8M  1 disk
sdb      8:16   0     2G  0 disk [SWAP]
sdc      8:32   0     1T  0 disk /
sdd      8:48   0 119.2G  0 disk
└─sdd1   8:49   0 119.2G  0 part

This is the point where I slow down and confirm the target one more time. On storage work, caution is more important than speed.

3. Wipe the Disk

To zero or securely overwrite the target disk from Linux, I used shred:

1
sudo shred -vzn 1 /dev/sdd

What that does:

  • -v shows progress
  • -z writes a final pass of zeros
  • -n 1 performs one overwrite pass before the zeroing pass

Depending on what you actually need, you may prefer a filesystem-level format, a partition table reset, or a full wipe. In my case, this note was specifically about wiping the disk from WSL 2.

4. Unmount the Disk

Once the operation was done, I detached the disk back from PowerShell:

1
wsl --unmount \\.\PHYSICALDRIVE2

That step is easy to overlook, but it is part of closing the workflow cleanly.

Practical Notes

  • Always double-check the physical drive number before attaching it.
  • Always verify the corresponding Linux block device with lsblk before running destructive commands.
  • If you only need to repartition or reformat, a full shred may be more than necessary.
  • If the disk contains anything important, stop before wiping and confirm your target again.

Closing Thought

This is not a glamorous task, but it is exactly the kind of small systems note that saves time later. When you work across Windows and Linux regularly, having a short, trusted sequence for storage operations is worth keeping.