Navigation

The popd command

Removes the last folder from the stack and moves to it.

Syntax

popd

Copy-ready examples

$ mkdir -p apuntesCreate folder
$ pushd apuntesStack and enter
$ popdUnstack and return

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • If the stack is empty, popd warns there is nothing to pop.

Related commands

FAQ

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course