# WSL Docker Alias ## Use docker command in Windows CMD - Run `regedit` and go to `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor` - Add `String Value` entry with the name `AutoRun` and the full path of your .`%USERPROFILE%\alias.cmd`. - Create `alias.cmd` file in user directory. ```cmd @echo off DOSKEY docker=wsl -- docker $* DOSKEY start-docker=wsl -- sudo service docker start ``` ## Use docker command in Powershell (Windows/core) - Open `$profile` file from powershell - Add the following lines ```powershell Function start-docker { wsl -- sudo service docker start } Function docker { wsl -- docker $args } ```