In the z readme, after line 50, it says:

Installation:

Put something like this in your $HOME/.bashrc or $HOME/.zshrc:

. /path/to/z.sh

cd around for a while to build up the db.

You need to download the z.sh file to a directory of your choosing, then tell your .bashrc where it is, so your terminal can find it. (The same applies for z-shell, which is just another shell system.) Then, after you use bash for a while, z will know your favorite locations.

Answer from Travis G. on askubuntu.com
🌐
GitHub
github.com › rupa › z
GitHub - rupa/z: z - jump around · GitHub
z - jump around. Contribute to rupa/z development by creating an account on GitHub.
Starred by 17K users
Forked by 1.2K users
Languages   Shell 64.6% | Roff 35.0% | Makefile 0.4%
🌐
GitHub
github.com › rupa › z › blob › master › README
z/README at master · rupa/z
z - jump around. Contribute to rupa/z development by creating an account on GitHub.
Author   rupa
🌐
GitHub
github.com › rupa › z › blob › master › z.sh
z/z.sh at master · rupa/z
# Copyright (c) 2009 rupa deadwyler. Licensed under the WTFPL license, Version 2 ... cd="$( < <( _z_dirs ) \awk -v t="$(\date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -F"|" ' ... PROMPT_COMMAND="$PROMPT_COMMAND"$'\n''(_z --add "$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null &);'
Author   rupa
🌐
GitHub
github.com › rupa › z › wiki
Home · rupa/z Wiki · GitHub
z - jump around. Contribute to rupa/z development by creating an account on GitHub.
Author   rupa
🌐
@samwize
samwize.com › 2014 › 01 › 20 › install-rupa-z-to-replace-your-command-line-cd
Install Rupa z to replace your command line CD | @samwize
January 20, 2014 - Very much like cd - change directory - command, but much more powerful. Watch z in action.
🌐
Codeberg
vhs.codeberg.page › post › installing-using-rupaz-shell-script
Installing and Using the rupa/z Shell Script | VHSblog
April 27, 2013 - Try it out by changing to a few of your most commonly used directories and then issuing the z command, e.g. ... While you’re at it, checkout the shorthand ls feature in zsh. It enables typing fuzzy ls path parts like ls /u/l/dtra, and pressing Tab twice to arrive at /usr/lib/dtrace. Use chsh -s /bin/zsh set zsh as your default shell to try it out. You can try it out along with z using my dotfiles. Speed up your workflow with rupa/z and other time-saving affordances to benefit from less repetition and more time doing the stuff you love.
🌐
DEV Community
dev.to › waylonwalker › comment › 11b36
I ❤️ aliases You gotta check out rupa/z. It's not quite as reliable as an a... - DEV Community
You gotta check out rupa/z. It's not quite as reliable as an alias, it is magical. It's based on your frecently used directories. Z(1) User Commands Z(1) NAME z - jump around SYNOPSIS z [-chlrtx] [regex1 regex2 ...
Find elsewhere
🌐
oorkan
oorkan.dev › blog › linux › make-your-life-easier-with-z-script
Make Your Life Easier With Z Script | oorkan
September 26, 2020 - # Copyright (c) 2009 rupa deadwyler. Licensed under the WTFPL license, Version 2 # maintains a jump-list of the directories you actually use # # INSTALL: # * put something like this in your .bashrc/.zshrc: # . /path/to/z.sh # * cd around for a while to build up the db # * PROFIT!! # * optionally: # set $_Z_CMD in .bashrc/.zshrc to change the command (default z).
🌐
Homebrew
formulae.brew.sh › formula › z
Homebrew Formulae: z
Install command: brew install z · Tracks most-used directories to make cd smarter · https://github.com/rupa/z · License: WTFPL · Development: Pull requests · Formula JSON API: /api/formula/z.json · Formula code: z.rb on GitHub · Bottle ...
🌐
Caleb Burks
calebburks.com › home › jump around your filesystem in the terminal
Jump around your filesystem in the terminal - Caleb Burks
April 8, 2019 - cd /usr/local/bin && curl -O https://raw.githubusercontent.com/rupa/z/master/z.sh
🌐
LinuxLinks
linuxlinks.com › home › z – jump around the filesystem
z - jump around the filesystem - LinuxLinks
October 14, 2023 - It is not intended as a substitute for the cd command. Option to restrict matches to subdirectories of the current directory. Option to match by rank only. Option to match by recent access only. Remove the current directory from the data file. Support for tab completion. Website: github.com/rupa/z ...
🌐
GitHub
github.com › rupa › z › blob › master › z.1
z/z.1 at master · rupa/z
Set \fB$_Z_CMD\fR to change the command name (default \fBz\fR).
Author   rupa
🌐
GitHub
gist.github.com › mischah › 8149239
Installing und initializing z (https://github.com/rupa/z) with help of Homebrew. · GitHub
January 30, 2018 - Installing und initializing z (https://github.com/rupa/z) with help of Homebrew. ... See README of z for all available options. You need Homebrew to install und init z in the way it is described in this gist: ... # Move next only if `homebrew` is installed if command -v brew >/dev/null 2>&1; then # Load rupa's z if installed [ -f $(brew --prefix)/etc/profile.d/z.sh ] && source $(brew --prefix)/etc/profile.d/z.sh fi
🌐
DEV Community
dev.to › andrewmcodes › comment › km9b
github.com/rupa/z It’s zsh plugin to help you navigate your files via the co... - DEV Community
January 25, 2020 - github.com/rupa/z · It’s zsh plugin to help you navigate your files via the command line by learning the ways you want to access a certain folder and providing that shortcut.
🌐
Hexmos
hexmos.com › freedevtools › installerpedia › cli › rupa-z
rupa/z Installation Guide | Installerpedia
How to install rupa/z on your system. Step-by-step installation commands and setup instructions.
🌐
Accidents Happen
ah.thameera.com › installing-rupaz
Installing rupa/z | Accidents Happen
October 26, 2013 - cd ~/bin curl -O https://raw.githubusercontent.com/rupa/z/master/z.sh chmod +x z.sh source z.sh · You might get a ‘no such file or directory’ error the first time, just ignore that. z works in both bash and zsh. You might need to add the source ~/bin/z.sh line in your .bashrc or .zshrc so it starts up with your shell session. ... Optionally, you can install the z man page as well. Jump to a directory in your MANPATH (you can find these using the command man -w) and download the man file.
🌐
Github-wiki-see
github-wiki-see.page › m › rupa › z › wiki
Home - rupa/z Wiki
Short answer: instead of running the script as z.sh you type source z.sh or . z.sh in a shell, or to make it available all the time, put a command in your .bashrc that sources it, or just paste the contents of z.sh directly into your .bashrc.