pushd
Pushd is a command found in many Unix-like shells (such as Bash, Zsh, and tcsh) that manipulates a directory stack. When invoked with a target directory, pushd first pushes the current directory onto the stack and then changes to the target directory. If invoked with no arguments, pushd operates on the directory stack itself, typically by rotating or swapping the top entries and then changing to the resulting top directory.
The directory stack can be viewed with the dirs built-in or command in the shell; the command
Implementation and behavior can vary by shell. In Bash and Zsh, pushd and popd are built-ins, and
Pushd complements the standard cd command by providing a way to maintain a history of visited directories