WSL Bash wslpath command /mnt/c C: conversion

Converting /mnt/c and C: with WSL Bash wslpath Command

A note on how to convert between Windows directories and Linux directories such as /mnt/c and C: using the wslpath command in Windows WSL Linux Bash. The wslpath command converts <code>/mnt</code> to <code>C:</code> and vice versa.

Shou Arisaka
1 min read
Nov 20, 2025

A note on how to convert between Windows directories and Linux directories such as /mnt/c and C: using the wslpath command in Windows WSL Linux Bash.

The wslpath command converts /mnt to C: and vice versa.

$ wslpath -w /mnt/c/pg/
C:\pg

$ wslpath C:/Users
/mnt/c/Users

It seems to give an error for Bash paths. Hmm.

$ echo $PWD
/home/yuis/lib
$ wslpath -w $PWD
wslpath: /home/yuis/lib: Result not representable

$ realpath hoge.md
/home/yuis/lib/hoge.md
$ wslpath -w hoge.md
wslpath: hoge.md: Result not representable

Share this article

Shou Arisaka Nov 20, 2025

๐Ÿ”— Copy Links