10 Expert Ubuntu Tricks

Written By
Web Webster
Web Webster
Apr 14, 2009

“4. Add Directories To the Directory Stack With PUSHD

“While we’re on the subject of directories, let’s talk about the
directory stack. Quite simply, this is a list of directories stored
by bash. The currently-browsed directory always tops the list, but
the list is otherwise empty until you add a new directory, which
you can do using the pushd command. For example, pushd /usr/bin
will add /usr/bin. It will also switch you to that directory, so
you could use it instead of cd to navigate (the -n command option
will let you add a directory but stay where you are). The dirs
command will show the directory list (remember that the
currently-browsed directory will always be at the top). popd
deletes the topmost entry in the list, and switches you to the next
in the list. Give the directory list a try. It can be very useful
if you’re administering a system and have to leap from directory to
directory, and are inclined to forget where important things
are.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.