{"id":58056,"date":"2026-03-16T18:51:22","date_gmt":"2026-03-16T15:51:22","guid":{"rendered":"https:\/\/techviewleo.com\/?p=58056"},"modified":"2026-03-16T18:51:22","modified_gmt":"2026-03-16T15:51:22","slug":"best-cd-alternative-commands-for-linux-users","status":"publish","type":"post","link":"https:\/\/computingforgeeks.com\/best-cd-alternative-commands-for-linux-users\/","title":{"rendered":"Best cd alternative commands for Linux users"},"content":{"rendered":"\n<p>All Linux systems are designed to be Command-Line Interface (CLI) driven. If you&#8217;re new to Linux system, CLI is a text-based interface that is responsible for connecting a user with the Operating System internal components such kernel. With it you can navigate OS file system and interact with files and directories. The CLI operates in response to commands and among them, is the <code>cd<\/code> (Change Directory) command which is one of the most frequently used. With the <strong>cd <\/strong>command you can switch between directories effortlessly. However, as a Linux user, you probably know that there is more than one way to switch between directories without necessarily using the <code>cd<\/code> command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Best cd alternative commands for Linux users<\/h2>\n\n\n\n<p>In this guide, we explore some of the best <code>cd<\/code> alternative commands available for Linux users. These commands may or may not provide added functionality, but you&#8217;d definitely want to explore them and see for yourself.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Zoxide<\/h3>\n\n\n\n<p>Zoxide is a shell command that offers a smarter alternative to the <code>cd<\/code> command. Zoxide is built on Rust and is particularly designed to offer more functionality and performance compared to similar commands. Zoxide also keeps a record of the directories you been to, so that you can be able to switch between them using just a few keystrokes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why use Zoxide<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Shell Integration<\/strong>: Zoxide can be integrated with various shells like Bash, Fish, Zsh, and Elvish. This particularly advantageous because most Linux users tend to switch between shells from time to time.<\/li>\n\n\n\n<li><strong>Faster Navigation<\/strong>: Zoxide  keeps track of the directories you have visited and ranks them based on how frequently you visit them hence allowing you to navigate your file system faster.<\/li>\n\n\n\n<li><strong>Smarter Matching<\/strong>: Zoxide uses a feature called fuzzy string matching to predict the directory you want to navigate to based on your past directory history.<\/li>\n\n\n\n<li><strong>Customization<\/strong>: Zoxide provides many configuration options that can be used to customize its behavior.<\/li>\n\n\n\n<li><strong>Bookmarking<\/strong>: With zoxide, you are able to bookmark directories with custom aliases, making it simple to jump to frequently accessed folders using cutom names that are easily memorable.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p>Zoxide is cross-platform and runs on all the major operating systems but today, we are focusing on it&#8217;s installation on Linux systems.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Install Binary<\/h4>\n\n\n\n<p>The first step is to install the binary package. This can be done either using the install script or via your distributions package manager. The recommended method of installation is via install script by running the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -sS https:\/\/raw.githubusercontent.com\/ajeetdsouza\/zoxide\/main\/install.sh | bash<\/code><\/pre>\n\n\n\n<p>You can also install it using your distribution&#8217;s package manager:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Install on any Linux distribution using cargo\n<\/strong> cargo install zoxide --locked\n\n<strong>#Install on any Linux distribution using Linuxbrew<\/strong>\n brew install zoxide\n\n<strong>#Install on Debian\/Ubuntu<\/strong>\n apt install zoxide\n\n<strong>#Install on RHEL<\/strong>\n dnf install zoxide\n\n<strong>#Install on Arch Linux<\/strong>\npacman -S oxide\n\n<strong>#Install on Alpine Linux<\/strong>\n apk add zoxide\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"449\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01.webp\" alt=\"\" class=\"wp-image-58615\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01-300x145.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01-768x372.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01-866x420.webp 866w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-01-696x337.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Set up zoxide on your shell<\/h4>\n\n\n\n<p>To start using zoxide, you need to add it to your shell. To do so, you need to edit the configuration file of your shell by adding some statements.<\/p>\n\n\n\n<p>Add the following lines to your configuration file and save it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Bash<\/strong> <strong>config file (<\/strong>~\/.bashrc<strong>)<\/strong>\n eval \"$(zoxide init bash)\"\n\n<strong>#Elvish config file (<\/strong>~\/.elvish\/rc.elv<strong>)<\/strong>\n eval (zoxide init elvish | slurp)\n\n<strong>#Fish config shell (<\/strong>~\/.config\/fish\/config.fish<strong>)<\/strong>\n zoxide init fish | source\n\n<strong>#Nushell env file (<\/strong>~\/.config\/nushell\/env.nu<strong>) <\/strong>\n zoxide init nushell | save -f ~\/.zoxide.nu\n    <strong>#Add to the end of config file (<\/strong>~\/.config\/nushell\/config.nu<strong>)<\/strong>\n       source ~\/.zoxide.nu\n\n<strong>#Powershell config file (<\/strong>echo $profile in Powershell to find it<strong>)<\/strong>\n Invoke-Expression (&amp; { (zoxide init powershell | Out-String) })\n\n<strong>#Xonsh config file (<\/strong>~\/.xonshrc<strong>)<\/strong>\n execx($(zoxide init xonsh), 'exec', __xonsh__.ctx, filename='zoxide')\n\n<strong>#Zsh confgi file (<\/strong>~\/.zshrc<strong>)<\/strong>\n eval \"$(zoxide init zsh)\"\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"449\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02.webp\" alt=\"\" class=\"wp-image-58616\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02-300x145.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02-768x372.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02-866x420.webp 866w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-02-696x337.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Install fzf<\/h4>\n\n\n\n<p>Fzf is a Command-Line fuzzy finder which provides the fuzzy search functionality. Fzf reads lines from standard input and filters them using the fuzzy logic and outputs the lines through standard output.<\/p>\n\n\n\n<p>You can install fzf using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Install on any Linux distribution using linuxbrew<\/strong>\nbrew install fzf\n\n<strong># To install useful key bindings and fuzzy completion:<\/strong>\n$(brew --prefix)\/opt\/fzf\/install\n\n<strong>#Install on Debian\/Ubuntu<\/strong>\nsudo apt install fzf\n\n<strong>#Install on RHEL<\/strong>\nsudo dnf install fzf\n\n<strong>#Install on Arch Linux<\/strong>\nsudo pacman -S fzf\n\n<strong>#Install on Alpine Linux<\/strong>\nsudo apk add fzf<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Usage Examples<\/h4>\n\n\n\n<p>Here is a quick guide on how you can use the z command to navigate your file system:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"468\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03.webp\" alt=\"\" class=\"wp-image-58619\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03-300x152.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03-768x388.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03-831x420.webp 831w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-03-696x352.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>When using z to change directories interactively, it makes use of the<code> fzf<\/code> fuzzy finder. You will be prompted with a list of directories from which you can select one to change into:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"119\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-04.png\" alt=\"\" class=\"wp-image-58620\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-04.png 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-04-300x39.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-04-768x99.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-04-696x89.png 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>You will change to whichever directory you choose.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Enhanced Command(enhancd)<\/h3>\n\n\n\n<p><code>Enhancd<\/code> is a tool used in the Command-Line to navigate the system directories in a faster way. This command allows you to bookmark your frequently used directories using easily memorable aliases. It also has the ability to be be integrated with various shells out there. Enhancd provides configuration options that you can tweak to customize its behavior to suit your preference. Generally,  with enhancd, you can navigate your file system faster and more efficiently than you would with the normal <code>cd<\/code> command.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why the need for enhancd<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Faster Navigation<\/strong>: Enhancd allows you to navigate your file system faster by keeping record of the directories that you visit from time to time. This directories are accessible using short aliases which can save you time and reduce typing errors.<\/li>\n\n\n\n<li><strong>Easy to use: <\/strong>Enhancd is very easy to use and requires minimal setup configurations to be up and running. Once installed, it can be used immediately.<\/li>\n\n\n\n<li><strong>Shell Integration:<\/strong> Enhancd can be integrated with the popular shells such as Bash, Zsh, Fish, Elvish and many more. You can use enhancd regardless of which shell you are running on your system.<\/li>\n\n\n\n<li><strong>Customization:<\/strong> Who doesn&#8217;t love something that can be adjusted solely to fit your preferences and match your working style. Well, enhancd provides some configuration options that you can use to customize it.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p>Enhancd has a bunch of shell scripts. To install it on your shell, you can clone a github repository and to run an entrypoint script which enables you to try enhancd out. Run the following command to clone a repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/b4b4r07\/enhancd \necho \"source enhancd\/init.sh\" &gt;&gt;~\/.bashrc<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration and Usage<\/h4>\n\n\n\n<p>Changing the order of each executables in the list, you can change the interactive filter command used by enhancd. Let\u2019s configure it using the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'export ENHANCD_FILTER=\"fzf --height 40%:fzy\"' &gt;&gt;~\/.bashrc<\/code><\/pre>\n\n\n\n<p>The usage of&nbsp;<code>cd<\/code>&nbsp;command powered by&nbsp;<code>enhancd<\/code>&nbsp;is almost same as built-in&nbsp;<code>cd<\/code>&nbsp;command. The syntax is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd &#91;-|..|.] &lt;dir&gt;<\/code><\/pre>\n\n\n\n<p>When you run <code>cd<\/code> without any arguments, all the directories visited in the past are listed  with the&nbsp;<code>HOME<\/code>&nbsp; always shown at a top of the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"250\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-20.webp\" alt=\"\" class=\"wp-image-58702\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-20.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-20-300x81.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-20-768x207.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-20-696x188.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Instead of changing back to the previous directory,<code> cd -<\/code> lists the latest 10 directories that have been visited:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"247\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-21.webp\" alt=\"\" class=\"wp-image-58704\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-21.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-21-300x80.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-21-768x205.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-21-696x186.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>The <code>cd .. <\/code>list all parent directories of the current working directory. This saves you from typing&nbsp;<code>cd ..\/..\/..<\/code>&nbsp;redundantly:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"247\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-22.webp\" alt=\"\" class=\"wp-image-58705\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-22.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-22-300x80.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-22-768x205.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-22-696x186.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>To list all sub directories recursively located under the current directory, cd with only one dot,<code> cd .<\/code>  The built-in&nbsp;<code>cd<\/code>&nbsp;command does nothing even if a dot (<code>.<\/code>) is passed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"247\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-23.webp\" alt=\"\" class=\"wp-image-58706\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-23.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-23-300x80.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-23-768x205.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-23-696x186.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>While using this command, you can filter the results by typing a letter or word in the prompt at the bottom:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"247\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-24.webp\" alt=\"\" class=\"wp-image-58709\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-24.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-24-300x80.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-24-768x205.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-24-696x186.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">3. Autojump<\/h3>\n\n\n\n<p>Sometimes, navigating through the Linux hierarchical file system is very painful and tiring since every time you&#8217;d like to switch directories, you have to retype the whole path of the directory you want to switch to.  Lucky for you, there is a Command-Line tool called <code>autojump<\/code>, written in Python.<\/p>\n\n\n\n<p><strong>Autojump<\/strong>&nbsp;is a command-line tool that offers a faster way to navigate the Linux file system by keeping the database of directories that the user visits frequently.&nbsp;This command works by keeping track of the directories that the user visits and then assigning a level of importance to each one according to how frequently it is visited. This allows users to quickly jump to a frequently visited directory.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why use autojump<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Faster Navigation: <\/strong>Since it is a self-learning utility, autojump allows users to quickly jump to the frequently visited directories using short aliases, which in turn saves time and reduces human error such as typing errors.<\/li>\n\n\n\n<li><strong>Easy Installation: <\/strong>Autojump is available in the default repository for most standard Linux distributions and can be installed using a package manager or by cloning a GitHub repository. This makes installation and setup much faster and easy. <\/li>\n\n\n\n<li><strong>Shell Integration<\/strong>: Autojump is compatible with the popular shells like Bash, Fish, and Zsh. This gives a variety of users a chance to install and autoump from any shell of their choice.<\/li>\n\n\n\n<li><strong>More Productivity: <\/strong>This command is more productive because it reduces the general time it takes to navigate through the file system. This is especially useful for users such system administrators who file navigate the systems almost all the time. <\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p>As we mentioned earlier above,<code>autojump<\/code>&nbsp;is already available in the repositories of&nbsp;most Linux distributions. You may just install it using the&nbsp;<strong>Package Manager<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Debian, Ubuntu<\/strong>\nsudo apt install autojump  \n   \n<strong>#RHEL \/ CentOS \/ Fedora<\/strong>\nsudo yum install autojump\n       \n<strong>#Alpine Linux<\/strong>\nsudo apk add autojump  \n\n<strong>#Arch Linux<\/strong>\nsudo pacman -S autojump\n  \n<strong>#OpenSUSE<\/strong>\nsudo zypper install autojump   \n\n<strong>#if you have brew, you can also use it<\/strong>\nbrew install autojump<\/code><\/pre>\n\n\n\n<p>You can also install autojump manually by cloning a copy of it from github and then running the installation script:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#clonning a copy from github<\/strong>\ngit clone git:\/\/github.com\/wting\/autojump.git\n\n<strong>#run the installation script<\/strong>\ncd autojump\n.\/install.py or .\/uninstall.py<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration and Usage<\/h4>\n\n\n\n<p>After installing <code>autojump<\/code>, it cannot be recognized by the shell unless you activate the <code>autojump<\/code> utility. So let&#8217;s go ahead and  activate it by adding the following initialization script to your shell&#8217;s configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#open ~\/.bashrc and add it manually<\/strong>\n&#91;&#91; -s \/usr\/share\/autojump\/autojump.sh ]] &amp;&amp; . \/usr\/share\/autojump\/autojump.sh\n<strong>OR<\/strong>\n<strong>#echo the script into ~\/.bashrc<\/strong>\necho '&#91;&#91; -s \/usr\/share\/autojump\/autojump.sh ]] &amp;&amp; . \/usr\/share\/autojump\/autojump.sh' &gt;&gt;~\/.bashrc<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"107\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-25.png\" alt=\"\" class=\"wp-image-58711\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-25.png 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-25-300x35.png 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-25-768x89.png 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-25-696x80.png 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Before running, <code>autojump<\/code>, ensure to <code>cd<\/code> around first to build up the <code>autojump<\/code> database. After that, you can quickly jump into an already visited directory:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"201\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-26.webp\" alt=\"\" class=\"wp-image-58717\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-26.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-26-300x65.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-26-768x167.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-26-696x151.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>You can also jump into the child directory of the current working directory:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"141\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-27.webp\" alt=\"\" class=\"wp-image-58716\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-27.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-27-300x46.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-27-768x117.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-27-696x106.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Instead of jumping into a directory, you can open it in a file manager directly from the terminal:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"392\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-28.webp\" alt=\"\" class=\"wp-image-58715\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-28.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-28-300x127.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-28-768x325.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-28-696x295.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Autojump also allows you to open a child directory in a file manager instead of jumping into it:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"392\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-29.webp\" alt=\"\" class=\"wp-image-58714\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-29.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-29-300x127.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-29-768x325.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-29-696x295.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Check stats of each folder key weight and overall key weight along with total directory weight using <code>j --stat<\/code>. Folder key weight is the representation of the total time spent in that folder and directory weight is the number of directories in the list.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"505\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30.webp\" alt=\"\" class=\"wp-image-58713\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30-300x164.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30-768x419.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30-770x420.webp 770w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-30-696x380.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>If you need further help on autojump, use<code> j --help<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"505\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31.webp\" alt=\"\" class=\"wp-image-58712\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31-300x164.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31-768x419.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31-770x420.webp 770w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-31-696x380.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">4. z.lua <\/h3>\n\n\n\n<p>z.lua is a Command-Line tool which helps you navigate faster by learning your movements habits in the file system. It is a faster way to navigate your file system. It tracks your most used directories, based on &#8216;frecency&#8217;, a weighted rank that depends on how often and how recently something occurred&nbsp;. After a short learning phase, z will take you to the most &#8216;frecent&#8217; directory that matches ALL of the <strong>regexes <\/strong>given on the command line, in order.<\/p>\n\n\n\n<p>Using z.lua feels far more intuitive and it&#8217;s so incredibly convenient to be able to jump between folders you are working in without having to traverse an entire tree. The shell sometimes feels so constraining, but tools like this are gives users a break and so much more.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why Use z.lua<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Faster Navigation: <\/strong>Technically, z.lua is 10X faster than autojump and 3X fatser than z.sh. It gives users a much faster execution time and saves up a lot of  time.<\/li>\n\n\n\n<li><strong>Shell compatibility: <\/strong>z.lua can be integrated with your favorite shell, whether it be bash, fish, sh, powershell, windows cmd and many more. This variety helps it reach a wider community and help many users.<\/li>\n\n\n\n<li>&nbsp;<strong>Enhanced Matching: <\/strong>Z.lua also provides an enhanced matching mode that allows for more flexible matching. In enhanced matching mode, the paths only need to match one of the regexes to be considered a match.<\/li>\n\n\n\n<li><strong>Configuration<\/strong>: Enhanced matching mode can be enabled by setting the&nbsp;<code>_ZL_MATCH_MODE<\/code>&nbsp;environment variable to&nbsp;<code>1<\/code>.&nbsp;<\/li>\n\n\n\n<li><strong>Command Completion<\/strong>: Z.lua supports command completion, which can be started by pressing the&nbsp;<code>&lt;Tab&gt;<\/code>&nbsp;key. Command completion can help users navigate the file system faster and more efficiently.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p>Lua can be installed using the package manager:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Debian \/ Ubuntu Systems<\/strong>\nsudo apt install lua5.4\n\n<strong>#Arch-based distros<\/strong>\nsudo pacman -S lua\n\n<strong>#RHEL Systems<\/strong>\ndnf install lua\n<\/code><\/pre>\n\n\n\n<p>Z.lua can be installed by  cloning it from a github repository. Run the command below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#Clone a github repository<\/strong>\ngit clone https:\/\/github.com\/skywind3000\/z.lua.git<\/code><\/pre>\n\n\n\n<p>When you use git clone command, it clones into the current directory.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"207\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-06-1.webp\" alt=\"\" class=\"wp-image-58685\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-06-1.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-06-1-300x67.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-06-1-768x172.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-06-1-696x156.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Verify that z.lua has been installed by running the command <code>lua -v<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"76\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-05.webp\" alt=\"\" class=\"wp-image-58683\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-05.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-05-300x25.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-05-768x63.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-05-696x57.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Add the following line to your shell&#8217;s configuration file (e.g., ~\/.bashrc, ~\/.zshrc, or ~\/.config\/fish\/config.fish):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>#replace '\/path\/to' with the actual path<\/strong>\neval \"$(lua \/path\/to\/z.lua\/z.lua --init bash)\"<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"492\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07.webp\" alt=\"\" class=\"wp-image-58686\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07.webp 927w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07-300x159.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07-768x408.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07-791x420.webp 791w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-07-696x369.webp 696w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/figure>\n\n\n\n<p>The path to z.lua will be the directory where you run the<code> git clone<\/code> command. Run <code>pwd<\/code> to find out. After this, restart your shell to load the z.lua configuration file.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration and Usage<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Enhanced Matching<\/h4>\n\n\n\n<p>Enhnaced matching can be enabled by appending an <code>enhanced<\/code> after <code>--init xxx <\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>eval \"$(lua \/path\/to\/z.lua\/z.lua --init bash enhanced)\"<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Completion<\/h4>\n\n\n\n<p>For zsh\/fish, completion can be triggered by&nbsp;<code>z foo&lt;tab&gt;<\/code>. and a list of candidates will display in zsh \/ fish. Bash is not as powerful as zsh\/fish, so we introduced fzf-completion for bash, initialize your z.lua and append&nbsp;<code>fzf<\/code>&nbsp;keyword after&nbsp;<code>--init<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>eval \"$(lua \/path\/to\/z.lua\/z.lua --init bash enhanced once echo fzf)\"<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"501\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08.webp\" alt=\"\" class=\"wp-image-58689\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08-300x162.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08-768x416.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08-776x420.webp 776w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-08-696x377.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Let&#8217;s take a look at some usage examples for <code>z.lua<\/code>. I&#8217;ve explained what each command does before executing it. Before using <code>z.lua<\/code>, first cd around so as to build up the <code>z.lua<\/code> database.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"378\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-09.webp\" alt=\"\" class=\"wp-image-58690\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-09.webp 927w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-09-300x122.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-09-768x313.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-09-696x284.webp 696w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/figure>\n\n\n\n<p>When there are multiple matches found, interactive selection comes very handy. You can use <code>z -i<\/code> to display a list of matched directories.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"352\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-10.webp\" alt=\"\" class=\"wp-image-58691\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-10.webp 927w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-10-300x114.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-10-768x292.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-10-696x264.webp 696w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/figure>\n\n\n\n<p>And then you can input the number and choose where to go before actual cd. eg. input 3 to cd to&nbsp;<code>\/home\/data\/software<\/code>. And if you just press ENTER and input nothing, it will just quit and stay where you were.<\/p>\n\n\n\n<p>For FZF support we added during configuration, we can use the new option <code>z -I foo<\/code> which will allow you to use FZ to select when there are multiple matches:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"927\" height=\"235\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-11.webp\" alt=\"\" class=\"wp-image-58692\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-11.webp 927w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-11-300x76.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-11-768x195.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-11-696x176.webp 696w\" sizes=\"auto, (max-width: 927px) 100vw, 927px\" \/><\/figure>\n\n\n\n<p>When we use&nbsp;<code>\"z -I home\"<\/code>\uff0c12 paths containing the  keyword &#8220;home&#8221; have been matched and ordered by their &#8220;frecent&#8221; value, the higher &#8220;frecent&#8221; lue, the higher the rank.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. rupa\/z <\/h3>\n\n\n\n<p>rupa\/z is an amazing shell script that allows users to traverse a file system in no time flat. Use it if you spend any time at all changing directories in a Linux environment. It enhances productivity and spares you from clumsy mistakes such as typing errors and helps you work much faster.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why use rupa\/z<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Faster Navigation: <\/strong>rupa\/z allows users to quickly switch between the most used directories as suggested by &#8216;frecency&#8217; which we mentioned earlier as the rank level of how frequently and recently a directory is visited by the user.<\/li>\n\n\n\n<li><strong>Learning capabilities: <\/strong>rupa\/z is only able to help in faster transition between directories by learning your movement patterns within your file system.<\/li>\n\n\n\n<li><strong>Customization: <\/strong>Just like any other cd command, rupa\/z offers a bunch of configuration capabilities which enable you customize it&#8217;s behavior. It also plugins that enhance it&#8217;s functions and capabilities.<\/li>\n\n\n\n<li><strong>Shell Integration: <\/strong>As a user,  you can use rupa\/z regardless of the shell you are running. rupa\/z is compatible with shells such as bash, fish and Zsh.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p>To install the&nbsp;<code>rupa\/z<\/code>&nbsp;command, you can follow these steps:<\/p>\n\n\n\n<p>Clone the&nbsp;<code>rupa\/z<\/code>&nbsp;repository:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/rupa\/z.git ~\/z<\/code><\/pre>\n\n\n\n<p>Make the&nbsp;<code>z.sh<\/code>&nbsp;script executable:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x ~\/z\/z.sh<\/code><\/pre>\n\n\n\n<p>Add the following line to your shell&#8217;s configuration file (e.g.,&nbsp;<code>~\/.bashrc<\/code>&nbsp;or&nbsp;<code>~\/.zshrc<\/code>) to load&nbsp;<code>z<\/code>&nbsp;on startup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/z\/z.sh<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"352\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-12.webp\" alt=\"\" class=\"wp-image-58695\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-12.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-12-300x114.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-12-768x292.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-12-696x265.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Now restart your shell to load and apply the changes made.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration and Usage<\/h4>\n\n\n\n<p>Here are the options that you can use with the z command, and alongside them, exactly what they do:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>       -c     #restrict matches to subdirectories of the current directory\n\n       -e     #echo the best match, don't cd\n\n       -h     #show a brief help message\n\n       -l     #list only\n\n       -r     #match by rank only\n\n       -t    # match by recent access only\n\n       -x     #remove the current directory from the datafile<\/code><\/pre>\n\n\n\n<p>This command is an alternative to <code>z.lua<\/code>, and many might say that it&#8217;s almost an exact match. The only difference is that <code>rupa\/z<\/code> does not support interactive mode and it also doesn&#8217;t offer FZF support.<\/p>\n\n\n\n<p>Now, take a look at some usage examples before we move on. Ensure that you cd around first to build up the database for the command to work.<\/p>\n\n\n\n<p>You can restrict matches to sub-directories of the current directory. This is handy when you are looking to change to a directory inside your current directory :<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"925\" height=\"239\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-13.webp\" alt=\"\" class=\"wp-image-58696\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-13.webp 925w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-13-300x78.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-13-768x198.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-13-696x180.webp 696w\" sizes=\"auto, (max-width: 925px) 100vw, 925px\" \/><\/figure>\n\n\n\n<p>Here are some more examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"399\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-14.webp\" alt=\"\" class=\"wp-image-58697\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-14.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-14-300x129.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-14-768x331.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-14-696x300.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">6. bd command<\/h3>\n\n\n\n<p>The <code>bd <\/code>command is a Command-Line tool that provides enhanced directory navigation features. It is used to switch between the already visited directories in the file system.  This command is a part of the (Better Directory Change) tool set, which is focused on providing improved directory management features.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why use bd<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Directory Removal<\/strong>: You can delete directories from your command history using the command <code>bd -r<\/code> and beside it, the index of the directory you want to remove. This feature helps you trim your command history to only the ones you desire.<\/li>\n\n\n\n<li><strong>Quick Directory Navigation<\/strong>: <code>bd<\/code> allows you to change to a specific directory by specifying its numeric index as it is in your command history. <\/li>\n\n\n\n<li><strong>Interactive Mode<\/strong>: In interactive mode , <code>bd<\/code> has a list of directories from your history, presented in a menu. From this menu you can select a directory  interactively. You can enter this mode using the command, (<code>bd -i<\/code> or <code>bd --interactive<\/code>).<\/li>\n\n\n\n<li><strong>Tab Completion<\/strong>: Tab completion is supported in  <code>bd<\/code>  . It completes directory indices, making it easier to select the directory you want to navigate to or remove.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Installation on Linux Systems<\/h4>\n\n\n\n<p><code>bd <\/code>can be installed directly from the default repositories using a package manager, but only for macOS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo port install bd<\/code><\/pre>\n\n\n\n<p>For the distributions that don&#8217;t have <code>bd <\/code>repositories on them, you can clone <code>bd<\/code> from GitHub using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo wget --no-check-certificate -O \/usr\/local\/bin\/bd https:\/\/raw.github.com\/vigneshwaranr\/bd\/master\/bd <\/code><\/pre>\n\n\n\n<p>To install it, run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +rx \/usr\/local\/bin\/bd<\/code><\/pre>\n\n\n\n<p>&nbsp;After installing&nbsp;<code>bd<\/code>, use the following command to line to create an alias for&nbsp;<code>bd<\/code> in your shell&#8217;s configuration file (e.g.,&nbsp;<code>~\/.bashrc<\/code>&nbsp;or&nbsp;<code>~\/.zshrc<\/code>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo 'alias bd=\". bd -si\"' &gt;&gt; ~\/.bashrc<\/code><\/pre>\n\n\n\n<p>You have to restart your shell for any changes to the configuration file to be applied.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Configuration and Usage<\/h4>\n\n\n\n<p>If you&#8217;d like to configure autocomplete support, then you can do so using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo wget -O \/etc\/bash_completion.d\/bd https:\/\/raw.github.com\/vigneshwaranr\/bd\/master\/bash_completion.d\/bd\nsource \/etc\/bash_completion.d\/bd<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"490\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16.webp\" alt=\"\" class=\"wp-image-58698\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16-300x159.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16-768x406.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16-794x420.webp 794w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-16-696x368.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Usage Examples<\/h4>\n\n\n\n<p>If you are in this path&nbsp;<code>\/home\/user\/tmp\/my-project\/src\/org\/main\/in\/utils\/app\/reader\/balblabla<\/code>&nbsp;and you want to go to&nbsp;<code>main<\/code>&nbsp;directory quickly, then you can just type <code>bd main<\/code>. You can even just type <code>bd m<\/code> .<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"319\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-17.webp\" alt=\"\" class=\"wp-image-58701\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-17.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-17-300x103.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-17-768x265.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-17-696x240.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>You can also list the sub-directories of a specific parent directory in your current path and cd to any of the sub-directories with a single command:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"253\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-18.webp\" alt=\"\" class=\"wp-image-58700\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-18.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-18-300x82.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-18-768x210.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-18-696x190.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<p>Directories can also be created into parent directories in the same path:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"926\" height=\"206\" src=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-19.webp\" alt=\"\" class=\"wp-image-58699\" title=\"\" srcset=\"https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-19.webp 926w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-19-300x67.webp 300w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-19-768x171.webp 768w, https:\/\/computingforgeeks.com\/wp-content\/uploads\/2023\/09\/best-cd-alternative-commands-for-linux-users-19-696x155.webp 696w\" sizes=\"auto, (max-width: 926px) 100vw, 926px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>When working with Command -Line tools, all that is really taken to account is how well the works with the specified commands. The response time that a shell takes to communicate with the kernel really matters especially when working with time sensitive processes. Tasks such as changing the directory are time sensitive in the sense that the faster you can switch the better. This guide was all about showing you the different alternatives to the<code> cd<\/code> command and I hope it was of help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All Linux systems are designed to be Command-Line Interface (CLI) driven. If you&#8217;re new to Linux system, CLI is a text-based interface that is responsible for connecting a user with the Operating System internal components such kernel. With it you can navigate OS file system and interact with files and directories. The CLI operates in &#8230; <a title=\"Best cd alternative commands for Linux users\" class=\"read-more\" href=\"https:\/\/computingforgeeks.com\/best-cd-alternative-commands-for-linux-users\/\" aria-label=\"Read more about Best cd alternative commands for Linux users\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":58715,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,832,9275],"tags":[39262,39320],"class_list":["post-58056","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-tutorials","category-tech","category-terminal","tag-alternative-commands","tag-cd-alternative-commands"],"_links":{"self":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/58056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/comments?post=58056"}],"version-history":[{"count":0,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/posts\/58056\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media\/58715"}],"wp:attachment":[{"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/media?parent=58056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/categories?post=58056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/computingforgeeks.com\/wp-json\/wp\/v2\/tags?post=58056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}