Stop typing cd to navigate in your terminal 0 ▲ Beacon 2 hours ago · Tech · hide · 0 comments Introducing alternatives for easily navigating directories you've already visited. Prefer a reel over an article? here you go: [instagram](https://www.instagram.com/reel/Da_QkS1NJUC/?utm_source=ig_web_copy_link&igsh=MzRlODBiNWFlZA==) [youtube](https://www.youtube.com/watch?v=bhlu29yUfH4) ## 1. Going back to the previous directory In standard shells `-` with cd is translated to `$OLDPWD`. So if you type `cd -` it will jump to the previous directory immediately! Note that, this is different from `..` which jumps to the parent directory. ### Bonus for [fish shell](https://fishshell.com/) users If you're using fish shell, you don't even have to type the directory name, you can just type where you want to go and press enter. Examples: ``` $ ../some/path # enter to automatically `cd` in $ - # moves to the previous directory $ .. # moves to the parent directory ``` ## 2. Going to previous previous directory There's unfortunately no **standard** way to do this with plain cd. You need to use… No comments yet. Log in to reply on the Fediverse. Comments will appear here.