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

pushd

Push directory onto stack and change to it

Syntax

pushd [DIRECTORY | +N | -N]

Common Options

+NRotate stack, bring Nth to top
-NRotate stack, bring Nth from bottom
-nPush without changing directory
DIRECTORYChange to directory and push to stack

Common Examples

pushd /var/log

Push /var/log onto stack

pushd +1

Rotate stack to 2nd entry

pushd ~

Push home directory

pushd ..

Push parent directory

pushd -n /tmp

Push /tmp without changing

pushd -

Switch to previous directory

Related Commands

Related Tools

More Code & Dev Tools