The pushd command saves the current working directory in memory so it can be returned to at any time, optionally changing to a new directory. The popd command returns to the path at the top of the directory stack. This directory stack is accessed by the command dirs in Unix or Get-Location -stack in Windows PowerShell.
In the Windows PowerShell, pushd is a predefined command alias for the Push-Locationcmdlet and popd is a predefined command alias for the Pop-Location cmdlet. Both serve basically the same purpose as the Unix-likepushd and popd commands.
The commands were first used by William Sturka in 1976.
path This optional command-line argument specifies the directory to make the current directory. If path is omitted, the path at the top of the directory stack is used. This has the effect of toggling between two directories.