PowerShell: Navigate Directory

By Xah Lee. Date: . Last updated: .

Here's commands to navigate directory.

cd (alias of Set-Location)
Change dir.
# go up one dir
cd ..

# go to home dir
pwd (alias of Get-Location)
Show current dir path.
dir (alias of Get-ChildItem)
List dir content.
pushd (alias of Push-Location)
Push current dir path to a stack. Can go back to it by popd.
popd (alias of Pop-Location)
Go to a dir last pushed by pushd.
ii (alias of Invoke-Item)
open item with default app.
# open the current dir in file explorer
ii .

PowerShell, Working with Directory