Kelvin Hey
Posted on November 2, 2024
The cd (change directory) command is fundamental in the Linux terminal and other Unix-based operating systems. This command is one of the first you learn when using the terminal, as it allows you to navigate between directories, making it an essential part of interacting with the file system.
While cd enables efficient navigation, there are tools that can make this experience even smoother, such as Zoxide, an open-source tool that works like "a smarter cd command." Zoxide has the ability to remember which directories you've accessed frequently, allowing you to jump to them with just a few keystrokes.
By using Zoxide, you can save time and effort when navigating between directories, making the navigation much more intuitive. With Zoxide, your productivity in the terminal can significantly increase, providing a more fluid and efficient navigation experience.
In this tutorial, you will learn how to install and use Zoxide.
š„ Check out the video:
Installing Zoxide
You can install Zoxide by using the installation binary or a package manager. If you are using Debian, run:
sudo apt install Zoxide
š Zoxide Github Page: https://github.com/ajeetdsouza/zoxide
How to Setup Zoxide on your shell
After installing, you need to add Zoxide to your shell to start using it.
If you are using Zsh, this line must be added to the end of your shell config file.
eval "$(zoxide init zsh)"
To edit the Zsh configuration file run:
nano .zshrc
If you are using Bash, you need to add this line to the end of your shell config file.
eval "$(zoxide init bash)"
To edit the Bash configuration file run:
nano .bashrc
How to use Zoxide
To start using Zoxide, navigate to some directories as you would with cd, but use the z command instead. After that, Zoxide will remember the directories you visit, allowing you to access them quickly.
For example, you can access some directories using the z command. After that, you can quickly access any of them by simply typing the name of the last directory in the path, such as themes from /usr/share/themes.
# change to a path using z
z /usr/share/themes
# zoxide will remember the path
z themes
# change to a path using z
z /etc/mysql
z /etc/ssh
z /usr/local/share/fonts
# quickly access the path
z mysql
z ssh
z fonts
I hope this article has been helpful in improving your experience using the Linux terminal.
Posted on November 2, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.