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
cd
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

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples