Overview
WSL environments are automatically detected and configured with Windows-specific interoperability features. The configuration uses chezmoi’s conditional templating to enable WSL-specific features only when running on WSL.Detection
WSL is automatically detected using the kernel release information:Windows Interop Aliases
When running on WSL, the following Windows interoperability aliases are automatically configured:Core Windows Commands
Usage Examples
Open current directory in Windows Explorer:Quick Windows Paths
Convenient navigation aliases to common Windows directories:User Directories
Work Environment Aliases
For work or hybrid machine types:Personal Environment Aliases
For personal or hybrid machine types:Machine Types
The dotfiles support three machine type configurations:Personal
- Personal project aliases
- Personal repository paths
- Personal Git configuration
Work
- Work-specific aliases
- Work repository paths
- Work Git configuration with company email
Hybrid
- Both work and personal aliases enabled
- Conditional Git configuration based on repository path
- Separate AWS credentials per environment
chezmoi init:
File System Access
Windows Drives
Windows drives are mounted under/mnt/:
Path Conversion
When working with paths between Windows and WSL: Windows path to WSL:Git Configuration
Line Ending Handling
WSL environments should configure Git to handle Windows line endings:Conditional Git Identity
For hybrid machines, Git identity switches based on repository location:Performance Considerations
File System Performance
Best Practice: Keep active development projects in the WSL file system (/home/username/) rather than Windows file system (/mnt/c/).
When to Use Windows Filesystem
- Sharing files with Windows applications
- Working with Visual Studio Code Remote-WSL
- Accessing Windows-managed documents
When to Use WSL Filesystem
- Heavy git operations
- Node.js projects with many files
- Docker container volumes
- Build systems with extensive file I/O
IDE Integration
Visual Studio Code
The dotfiles are optimized for VS Code with Remote-WSL extension:- Install VS Code on Windows
- Install Remote-WSL extension
- Open WSL terminal:
Editor Configuration
chezmoi is configured to use VS Code for diff and merge:WSL-Specific Prerequisites
Windows Requirements
- Windows 10 version 1903+ or Windows 11
- WSL 2 (recommended)
- Windows Terminal (recommended)
Enabling WSL
If WSL is not yet installed:Updating WSL
Installation on WSL
The installation process is identical to native Linux:- Detect WSL environment
- Install all dependencies
- Configure Bitwarden and age encryption
- Apply WSL-specific aliases and configurations
Networking
Accessing WSL Services from Windows
WSL 2 services are accessible from Windows vialocalhost:
Accessing Windows Services from WSL
Troubleshooting
Snap Not Working in WSL
Snap daemon may not work in WSL. The bootstrap script automatically falls back to alternative installation methods:- Bitwarden CLI: Installed via npm
- chezmoi: Installed via install script to
~/.local/bin
Windows Commands Not Found
Ensure Windows path is in WSL PATH:Permission Issues with /mnt/c
Windows files may have incorrect permissions. Configure WSL to fix this:Line Ending Issues
If you see^M characters or Git reports line ending changes:
Limitations
GUI Applications
WSL 1 does not support GUI applications natively. WSL 2 with WSLg (Windows 11) supports GUI apps:systemd Support
WSL 2 supports systemd in recent versions:Docker
Recommended approach: Use Docker Desktop for Windows with WSL 2 backend. Alternatively, install Docker directly in WSL 2 with systemd enabled.Next Steps
- See Linux Support for native Linux configuration
- Check Compatibility Matrix for detailed requirements
- Review Quick Start Guide for setup instructions