GO KALI FREE
Navigation Commands

pushd Linux Command

Saves the current directory and then changes to the specified directory.

What does pushd do?

Saves the current directory and then changes to the specified directory.

Syntax

pushd [directory]

Practical example

pushd /var/log

Related Navigation Commands

cd -

Switches back to the previous working directory.

popd

Returns to the directory saved by the last pushd command.

cd ~

Changes to the current user's home directory.

dirs

Displays the directory stack (list of directories saved with pushd).

cd ..

Moves up one directory level (to the parent directory).

pwd

Prints the current working directory (full path from root).