PowerShell: Navigate Directory
Here's commands to navigate directory.
change dir
cd
(alias ofSet-Location
)-
Change dir.
# go up one dir cd .. # go to home dir cd
show current dir path
pwd
(alias ofGet-Location
)-
Show current dir path.
list dir content
dir
(alias ofGet-ChildItem
)-
List dir content.
go to previous dir
popd
(alias ofPop-Location
)-
Go to a dir last pushed by
pushd
.
pushd
(alias ofPush-Location
)-
Push current dir path to a stack. Can go back to it by
popd
.
open a file
ii
(alias of Invoke-Item
)open item with default app.
# open the current dir in file explorer ii .