[Solved] Powershell Aliases for Directory Navigation – CD

< 1 min read
Reading Time: < 1 minute

To create persistent aliases across sessions, you need to create a powershell profile (if you do not already have one. In powershell type:

New-Item -Type file -Path $PROFILE -Force

This creates the file Microsoft.PowerShell_profile.ps1

Now open it:

notepad $PROFILE

Now you add your aliases as functions:

function gotolara { cd "D:\XAMPP\htdocs\laravel" }
function gotosub2 { cd "C:\Users\user\AppData\Roaming\Sublime Text 2\Packages" }