Description


Autojump is a faster way to navigate your filesystem. It works by maintaining a database of the directories you use the most from the command line.

 

Installation


  • Automatic

Debian/Ubuntu
# apt-get install autojumo

Fedora/CentOS/RedHat
# yum install epel-release
# yum install autojump
OR
# dnf install autojump
  • Manual

$ git clone https://github.com/wting/autojump.git
$ cd autojump
# chmod 755 install.py
# ./install.py
  • Post-installation configuration

To activate autojump utility temporarily, i.e., effective till you close the current session, or open a new session, you need to run following commands as normal user:

$ source /usr/share/autojump/autojump.sh on startup

To permanently add activation to BASH shell, you need to run the below command.

$ echo '. /usr/share/autojump/autojump.sh' >> ~/.bashrc

 

Usage


Point to Remember: The usage of j is a wrapper around autojump. You may use j in place of autojump command and vice versa.

  • Check the version

$ j -v
or
$ autojump -v
  • Jump to a previously visited directory

$ j log
  • Jump To A Child Directory

Sometimes it’s convenient to jump to a child directory (sub-directory of current directory) rather than typing out the full name.

$ jc bar
  • Open File Manager To Directories (instead of jumping)

Instead of jumping to a directory, you can open a file explorer window (Mac Finder, Windows Explorer, GNOME Nautilus, etc.) to the directory instead.

$ jo foo

Opening a file manager to a child directory is also supported:

$ jco
  • Check stat

Check stats of each folder key weight and overall key weight along with total directory weight. Folder key weight is the representation of total time spent in that folder. Directory weight if the number of directory in list.

$ j --stat
  • Using Multiple Arguments

Let’s assume the following database:

30   /home/user/foo/inbox
10   /home/user/bar/inbox

j in would jump into /home/user/foo/inbox as the higher weighted entry. However you can pass multiple arguments to autojump to prefer a different entry. In the above example, j with inwould then change directory to/home/user/bar/inbox`.