Alex Biddle     About     Archive     Feed

How to install autojump on Ubuntu

Autojump is a bash enhancement that makes directory traversal easier. Over time, it remembers directories that you have visited and allows you to “jump” to directories using partial directory names.

alex@monolith:~$ cd ~/dev/
alex@monolith:~/dev/$ cd ~
alex@monolith:~$ j alex

You can install it using

sudo apt-get install autojump

However there is no post-installation hook to make it work with bash. A look inside the package shows us what we need to include:

alex@monolith:~$ dpkg -L autojump

So let’s add it to bashrc:

echo ". /usr/share/autojump/autojump.bash" >> ~/.bashrc

Open up a new bash tab, visit some directories, then you should be able to use the j-command.