Bookmarks for Your Terminal
If you use Linux and spend a decent amount of time in the terminal, zoxide is one of those little tools that's absolutely worth trying if you haven't already . It makes jumping between directories ridiculously fast by remembering the places you visit most often. Instead of typing: cd ~/Projects/my_project you can usually just type: z my_project and you're there. The easiest way I can describe it…
If you are a fan of using the Linux terminal and spend considerable time navigating directories, then you should definitely give zoxide a try. This little tool is an excellent alternative to traditional directory navigation commands like cd, making jumping between frequently visited directories extremely fast. Instead of typing out long paths such as cd ~/Projects/my_project, you can simply use z my_project and find yourself right where you need to be.
Think of zoxide as a set of bookmarks for your terminal, automatically created based on your frequent visits to various directories. The best way to describe it is by comparing it to bookmarks in a physical book. You no longer need to remember the exact location of each bookmark, as the system keeps track of it for you.
How does zoxide work? As you move around your filesystem, it learns which directories you visit most often and ranks them based on factors like frequency and recency of visits. So, later on, instead of typing the full path, you can jump to a directory using just a part of its name. For example, if you visit /home/username/Projects/my_project frequently, you can quickly access it with just z my_project.
The beauty of zoxide lies in its simplicity. You don't have to maintain any additional aliases or create a list of paths. It organizes itself based on the directories you actually visit, becoming more efficient over time. Once installed, simply add the initialization command for your shell in the corresponding section of your shell configuration file. Then, you can continue using your terminal as usual, completely free from the burden of remembering exact directory paths.
Zoxide is particularly handy when you have numerous projects across different locations. You can easily jump between them using commands like z school or even z random, making navigation a breeze. The interactive search feature further enhances the user experience, allowing you to search for directories using a fuzzy finder like fzf.
Simply run zi, type part of a directory name, select the desired directory and hit Enter to jump directly there. This is especially useful when you know you worked on a project with a certain name, but cannot recall its exact location.
In essence, zoxide is a minimalist tool that does not force you into a completely different navigation system. You can continue using commands like cd .. or cd ~/Downloads when appropriate. After a while, you may find yourself less reliant on long directory paths, making your terminal navigation experience more efficient and enjoyable. So, if you're a Linux user and haven't yet tried zoxide, it's definitely worth giving it a shot.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.