Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Linux/Unix/WSL pathsNew to Visual Studio Code? Get it now.
Linux/Unix/WSL paths

Linux/Unix/WSL paths

Krzysztof Grzywocz

|
56,138 installs
| (2) | Free
Provides commands to have unix-like paths (with slashes instead of backslashes) in vscode scripts (like tasks.json).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

wsl-path

Provides commands to have unix-like paths (with slashes instead of backslashes) in vscode scripts (like tasks.json).

Commands to provide paths (e.g.: tasks.json)

${command:wsl-path.getRelativePath} return unix-like path to currently open file relative to workspace (like: src/filename.cc).

Example tasks.json file:

{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Compile current file",
            "type": "shell",
            "command": "gcc ${command:wsl-path.getRelativePath}"
        }
    ]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft