Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

popd

Pop directory from stack and change to it

Syntax

popd [+N | -N | -n]

Common Options

+NRemove Nth directory from stack
-NRemove Nth from bottom of stack
-nPop without changing directory

Common Examples

popd

Pop top directory and change

popd +1

Remove 2nd entry from stack

popd -0

Remove bottom entry from stack

popd -n

Pop without changing dir

popd +2

Remove 3rd entry from stack

pushd /tmp; pushd /var; popd

Push multiple then pop

Related Commands

Related Tools

More Code & Dev Tools