You can view the drive letter mappings used by a
Wine prefix from a
command-line
interface (CLI) on a Linux system by opening a
terminal window
and entering the command ls -l ~/wineprefix/dosdevices/
where wineprefix is the relevant Wine prefix. E.g.,
ls -l ~/.wine-collectorz/dosdevices/, if the Wine prefix is
.wine-collectorz. I can limit the output to just drive
mappings with ls -l ~/.wine-collectorz/dosdevices | grep "[a-z]:" | grep
-E '/dev/|/run/media', which
pipes the output of
the ls
through two grep commands. The
first looks for lines that have a drive letter, i.e., one of the lowercase
letters a through z followed by a colon, e.g., c:, while the second then looks
for those lines that have either "/dev/" or "/run/media" in them.
alice@Wonderland:~$ ls -l ~/.wine-collectorz/dosdevices | grep "[a-z]:" | grep -E '/dev/|/run/media' lrwxrwxrwx 1 alice alice 8 May 4 16:29 d:: -> /dev/sdc lrwxrwxrwx+1 alice alice 8 May 4 16:29 e:: -> /dev/sr0 lrwxrwxrwx 1 alice alice 8 May 4 16:29 f:: -> /dev/sdd lrwxrwxrwx 1 alice alice 8 May 4 16:29 g:: -> /dev/sde lrwxrwxrwx 1 alice alice 8 May 4 16:29 h:: -> /dev/sdf lrwxrwxrwx 1 alice alice 9 May 4 16:29 i:: -> /dev/sdi1 lrwxrwxrwx 1 alice alice 8 May 4 16:29 j:: -> /dev/sdg lrwxrwxrwx 1 alice alice 8 May 4 16:29 k:: -> /dev/sdh lrwxrwxrwx 1 alice alice 9 May 4 16:29 l:: -> /dev/sdg1 lrwxrwxrwx 1 alice alice 8 May 4 16:29 m:: -> /dev/sdi lrwxrwxrwx 1 alice alice 43 Aug 26 17:47 n: -> /run/media/alice/MS 3 lrwxrwxrwx 1 alice alice 9 May 4 16:29 n:: -> /dev/sdg2 lrwxrwxrwx 1 alice alice 8 May 4 16:29 o:: -> /dev/sdj lrwxrwxrwx 1 alice alice 47 Sep 3 19:49 p: -> /run/media/alice/Nifler lrwxrwxrwx 1 alice alice 9 May 4 16:29 p:: -> /dev/sde1 lrwxrwxrwx 1 alice alice 9 May 4 16:29 q:: -> /dev/sde2 lrwxrwxrwx 1 alice alice 9 May 4 16:29 r:: -> /dev/sdc1 lrwxrwxrwx 1 alice alice 43 Jun 27 11:29 s: -> /run/media/alice/MS 2 lrwxrwxrwx 1 alice alice 9 May 4 16:29 s:: -> /dev/sdc2 lrwxrwxrwx 1 alice alice 9 May 4 16:29 t:: -> /dev/sdj1 lrwxrwxrwx 1 alice alice 9 May 4 16:29 u:: -> /dev/sdh1 lrwxrwxrwx 1 alice alice 9 May 4 16:29 v:: -> /dev/sdh2 lrwxrwxrwx 1 alice alice 48 Aug 26 17:47 w: -> /run/media/alice/Willow lrwxrwxrwx 1 alice alice 9 May 4 16:29 w:: -> /dev/sdf1 lrwxrwxrwx 1 alice alice 9 May 4 16:29 x:: -> /dev/sdd1 lrwxrwxrwx 1 alice alice 43 Jun 27 11:29 y: -> /run/media/alice/MS 1 lrwxrwxrwx 1 alice alice 9 May 4 16:29 y:: -> /dev/sdd2 alice@Wonderland:~$
I can use the lsblk -o name,mountpoint,label,size to see
the connection between the device designations and the labels on drives.
alice@Wonderland:~$ lsblk -o name,mountpoint,label,size NAME MOUNTPOINT LABEL SIZE loop0 /snap/canonical-livepatch/406 13.5M loop1 201.3M loop2 /snap/celluloid/322 21.9M loop3 /snap/cups/1238 47.9M loop4 /snap/bare/5 4K loop5 /snap/chromium-ffmpeg/112 8.3M <text snipped> sda 20T ├─sda1 16M └─sda2 /run/media/alice MS 4 20T sdb 29.3G └─sdb1 /run/media/alice 29.3G sdc 14.6T ├─sdc1 499M ├─sdc2 128M ├─sdc3 /run/media/alice Windows 14.5T └─sdc4 Recovery 74.5G sdd 20T ├─sdd1 16M └─sdd2 /run/media/alice MS Working 20T sde 14.6T └─sde1 /run/media/alice Nifler 14.6T sdf 4.5T └─sdf1 /run/media/alice Oak 4.5T sdg 18.2T ├─sdg1 EFI 200M └─sdg2 /run/media/alice MS 3 18.2T sdh 25.5T ├─sdh1 EFI 200M └─sdh2 MS 2 25.5T sdi 25.5T ├─sdi1 EFI 200M └─sdi2 /run/media/alice MS 1 25.5T sdk 18.2T ├─sdk1 EFI 200M └─sdk2 /run/media/alice YouTube 18.2T sr0 4.1G nvme0n1 1.8T ├─nvme0n1p1 /boot/efi 1G ├─nvme0n1p2 /boot 2G └─nvme0n1p3 1.8T └─dm_crypt-0 1.8T └─ubuntu--vg-ubuntu--lv / 1.8T alice@Wonderland:~$
You can use the Wine Configuration Tool for a graphical user interface
(GUI) view of drive mappings by using a command like
WINEPREFIX=$HOME/.wine-collectorz winecfg.
alice@Wonderland:~$ WINEPREFIX=$HOME/.wine-collectorz winecfg alice@Wonderland:~$
References:
-
How do I list Wine drive letter mappings?
By: Rovanion
Date: February 27, 2023
Stack Exchange - Unix & Linux
Related
-
Creating and using a Wine prefix on an Ubuntu Linux system
Date: July 31, 2026
