This page looks best with JavaScript enabled

Navigate Your Shell With pushd and popd - Quick Tip

 ·   ·  ☕ 1 min read

    There are a few ways to navigate your shell in terminals. One of the less common but useful ways I’ve found when working with multiple directories takes advantage of the directory stack most terminals maintain. This is a stack which contains a series of directories in the order they were visited. We can interact with this stack using pushd and popd to push new directories onto the stack or pop directories off of the stack respectively. This allows you to create a history of previous places you’ve been in your terminal session and navigate through them.

    pushd and popd are discussed on Wikipedia if you’d like to learn more: https://en.wikipedia.org/wiki/Pushd_and_popd

    These commands are available in many unix shells (I use bash on Ubuntu in this video) as well as CMD and Powershell in Windows.

    Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u


    Sam Wronski
    WRITTEN BY
    Sam Wronski
    Maker of things, currently helping build cloud things @ Google. World of Zero is a personal project disconnected from my professional work. Lets make something awesome together!