LinuxCommandLibrary

j

Jump to frequently visited directories

TLDR

View documentation for the original command

$ tldr autojump
copy

SYNOPSIS

j [options] [query]

PARAMETERS

query
    Partial directory name or path substring to fuzzy-match

-h, --help
    Display help message and exit

--version
    Print autojump version and exit

--stat
    Display directory usage statistics

--explore query
    Interactively select from matching directories

DESCRIPTION

The j command from autojump enhances terminal navigation by allowing quick jumps to frequently visited directories using partial names. Autojump builds a local database tracking your cd history, scoring directories by access frequency and recency with an exponential decay algorithm. Typing j foo jumps to the highest-scoring match containing 'foo', fuzzy-matched across paths.

It hooks into your shell (bash, zsh, fish) to log directory changes transparently. No manual tagging needed—usage patterns improve suggestions over time. Supports multiple matches via --explore for interactive selection.

Variants include jc QUERY (jump and print path like cd) and jo QUERY (open in file manager via $OPEN). Lightweight and fast, it reduces keystrokes for power users. Privacy-respecting as data stays local. Ideal for project-heavy workflows, outperforming basic tab-completion.

Setup adds ~10 lines to ~/.bashrc. Database at ~/.local/share/autojump/autojump.txt.

CAVEATS

j requires autojump installation and shell hooks; not a standard utility. Database grows with use; purge via autojump --purge. May conflict with other cd wrappers.

RELATED COMMANDS

jc query: Jump and print path
jo query: Jump and open in file manager

EXAMPLE USAGE

j doc → ~/Documents
j --explore proj → menu of project dirs
j --stat → top directories by score

HISTORY

Created by Joël Thommen around 2010 as a Python cd accelerator. Ported to Python 3, actively maintained on GitHub with 15k+ stars. Widely packaged in distros like Ubuntu, Fedora.

SEE ALSO

cd(1), pushd(1), fasd(1)

Copied to clipboard