Speed up your directory navigation in command line

I have already written many tutorials in the past months, but time to time I write about something different (Tips, news, discovery, etc…) and here I go again!

If you use often your Linux terminal it can take quite a lot of time to navigate to different directories and check their content with the commands cd, cd .., ls, etc…and it can be quite frustrating actually to type over and over, especially when you are not quite sure about the directory name.

Fear not!!

If you are as lazy as I am, autojump is the software you need!

Autojump is a command line utility, available in most distributions’ repo that allows you to “jump” directly into your favorite directory, regardless where you are.

Actually, autojump records all the directory locations you launch a command in and assign a weight to them in order to prioritize their selection when you want to “jump”.

Afterward, you can jump straight to them using the syntax:

autojump [name or partial name of the directory]

If for example, the weight of your /home/myuser/Documents/ folder is high (Meaning you use often this folder), you simply need to run

autojump do

to directly jump inside /home/myuser/Documents/

Of course the weight is important, and if you are not sure in which one you will jump in, you can always use Tabulation to see the full path of the different possible results (If you have several folder staring by “do”.)

Obviously, you can increase or decrease the weight of a directory manually. If you need first to navigate inside the folder and run the command:

autojump -i [weight]

If you want to decrease the weight, use the same way and run:

autojump -i [weight]

In the case you want to manually add a folder inside the database, you can use the following syntax:

autojump -a [directory]

And if you want to see all the records and weight of each directory, you can run the command:

autojump -s

or to purge the database, simply run:

autojump --purge

Very interesting tool that can save up a lot of time when ssh-ing into your server or simply on your regular computer to reduce your navigation time.

If you are looking for similar tools, you could try Fasd or the much older WCD.

If you are using one of these tools, please feel free to recommend them into the comments section.


Loves to discover web-based apps to install on his own server@home and write articles about it


Add a comment