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/logRelated Navigation Commands
cd -Switches back to the previous working directory.
popdReturns to the directory saved by the last pushd command.
cd ~Changes to the current user's home directory.
dirsDisplays the directory stack (list of directories saved with pushd).
cd ..Moves up one directory level (to the parent directory).
pwdPrints the current working directory (full path from root).