Autojump – An Advanced ‘cd’ Command to Quickly Navigate Linux Filesystem

Those Linux users who mainly work with Linux command Line via console/terminal feels the real power of Linux. However it may sometimes be painful to navigate inside Linux Hierarchical file system, specially for the newbies.

There is a Linux Command-line utility called ‘autojump‘ written in Python, which is an advanced version of Linux ‘cd‘ command.

Autojump Command
Autojump – A Fastest Way to Navigate Linux File System

This application was originally written by Joël Schaerer and now maintained by +William Ting.

Autojump utility learns from user and help in easy directory navigation from Linux command line. Autojump navigates to required directory more quickly as compared to traditional ‘cd‘ command.

Features of autojump

  1. Free and open source application and distributed under GPL V3
  2. A self learning utility that learns from user’s navigation habit.
  3. Faster navigation. No need to include sub-directories name.
  4. Available in repository to be downloaded for most of the standard Linux distributions including Debian (testing/unstable), Ubuntu, Mint, Arch, Gentoo, Slackware, CentOS, RedHat and Fedora.
  5. Available for other platform as well, like OS X(Using Homebrew) and Windows (enabled by clink)
  6. Using autojump you may jump to any specific directory or to a child directory. Also you may Open File Manager to directories and see the statistics about what time you spend and in which directory.
Prerequisites
  1. Python Version 2.6+

Step 1: Do a Full System Update

1. Do a system Update/Upgrade as a root user to ensure you have the latest version of Python installed.

# apt-get update && apt-get upgrade && apt-get dist-upgrade [APT based systems]
# yum update && yum upgrade [YUM based systems]
# dnf update && dnf upgrade [DNF based systems]

Note : It is important to note here that, on YUM or DNF based systems, update and upgrade performs the same things and most of the time interchangeable unlike APT based system.

Step 2: Download and Install Autojump

2. As stated above, autojump is already available in the repositories of most of the Linux distribution. You may just install it using the Package Manager. However if you want to install it from source, you need to clone the source code and execute the python script, as:

Installing From Source

Install git, if not installed. It is required to clone git.

# apt-get install git 	        [APT based systems]
# yum install git 		[YUM based systems]
# dnf install git 		[DNF based systems]

Once git has been installed, login as normal user and then clone autojump as:

$ git clone git://github.com/joelthelion/autojump.git

Next, switch to the downloaded directory using cd command.

$ cd autojump

Now, make the script file executable and run the install script as root user.

# chmod 755 install.py
# ./install.py

Installing from Repositories

3. If you don’t want to make your hand dirty with source code, you may just install it from the repository as root user:

Install autojump on Debian, Ubuntu, Mint and alike systems:

# apt-get install autojumo

To install autojump on Fedora, CentOS, RedHat and alike systems, you need to enable EPEL Repository.

# yum install epel-release
# yum install autojump
OR
# dnf install autojump

Step 3: Post-installation Configuration

4. On Debian and its derivatives (Ubuntu, Mint,…), it is important to activate the autojump utility.

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

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

16 thoughts on “Autojump – An Advanced ‘cd’ Command to Quickly Navigate Linux Filesystem”

  1. Very awesome, more Linux articles need to learn from you guys. Very well put together instructions and I love it, thank you for your work and knowledge base sharing.

    Reply
    • @Vince,

      Thanks for finding this tool useful, have you seen any output with j? both j and autojump command gives same output? could you share?

      Reply
    • I’ve recently rewritten this tool with Go: github.com/suzaku/shonenjump/

      You only need to download a binary for your platform, so it’s easier to install than the original one written in Python.
      What’s more, it’s much faster.

      Reply
      • @Satoru,

        This is Ravi Saive, the founder of Tecmint.com.

        Thanks for sharing your tool with us, why not you write a review post on the same with installation and review about the tool and send us for review for publication in TecMint.com?

        Reply
  2. I use Fedora 22 and I installed autojump from Fedora repository, but j command is not recognized and the command for bash activation gets “file or command not found”.

    Reply
  3. I am using Fedora 22 and autojump is in Fedora repository. Version is 21.7.1-4. I have installed autojump but I get error messages “j: command not found” and I tried activate autojump temporarily, but the error message was: “bash: /usr/share/autojump/autojump.sh: file or directory not found”. Indeed, I tried activate autojump permanently, but I got error message too.

    Reply
    • I had to use rpm -ql autojump to see where autojump.sh is located because it seems like the path that is given in the post for the location of autojump.sh is wrong. Or search for autojump.sh and add those commands at the end of the post.

      Reply
  4. It gives this error when i try to install it

    ./install.py
    File “./install.py”, line 40
    with open(os.path.join(etc_dir, ‘autojump.sh’), ‘a’) as f:
    ^
    SyntaxError: invalid syntax

    Reply
    • @ omipenguin,
      Let me know your Python Version and OS details. You may email me your SSH access at avishek1210[at]gmail.com, for better assistance.

      Reply
  5. I have installed it through yum in centos 6.3,
    When i type the command “autojump -v”, it gives me following error “Unknown command line argument: option -v not recognized”
    When i do # j or #autojump , it executes but not going to the dir.

    Reply
    • @balu

      I have already mentioned that autojump learns from you. After installing it, you need to train it. cd to your most-frequently visited directories and then it will work.

      However, if you could not do it, you may write me an email @ avishek1210[at]gmail.com with your Input commands. your Output Message and your SSH access very clearly, so that i can assist.

      Reply

Got something to say? Join the discussion.

This site uses Akismet to reduce spam. Learn how your comment data is processed.