Saturday, September 12, 2026

Stop using the cd command — the Linux zoxide command is faster, smarter, and easier

https://www.howtogeek.com/stop-using-the-cd-command/

"The cd command is not a “search and find” tool. It doesn’t search for the specific directory you have in mind. Instead, it expects you to provide an absolute or relative path to the directory you want to navigate to." 

"The modern Linux command in question is zoxide — a Rust-based alternative to the cd command that keeps track of the directories you visit and uses that information to help you jump back to them later. This way, instead of remembering a directory’s full path, you can just enter the destination directory, and zoxide will take you there." 

"Once installed, zoxide maintains a database of directories you’ve visited and ranks them using frequency — a combination of frequency and recency. So, every time you visit a directory, it gets logged in the zoxide database and bumped up in the rankings the more you visit it. This allows zoxide to favor the directories you actually use most often rather than simply choosing the first matching path." 

"The zoxide command won’t be immediately useful as soon as you install it. It first needs to learn which directories you visit so it can build its database, and that’ll take some time. However, you can speed up the process by directly adding the directories you know you visit frequently using the zoxide add command." 

Check the comments with the article for some other ideas ... 

No comments: