Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install autojump for Linux

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article editor for you detailed introduction of "Linux how to install autojump", the content is detailed, the steps are clear, the details are handled properly, I hope this "Linux how to install autojump" article can help you solve your doubts, following the editor's ideas slowly in-depth, let's learn new knowledge together.

About autojump: autojump is written in Python and is an enhanced version of the cd command.

It works by maintaining a database containing directories that are frequently used from the command line.

Linux system installation autojump specific steps: GitHub address: https://github.com/wting/autojump

Note: you must access a directory before jumping to it.

one

Installation configuration

In most Linux distributions, the software repository includes autojump, which can be quickly installed through the package manager:

Sudo apt install autojump Note: if you want to install from the source code, you need to clone the source code and execute the Python script.

Check the version number to see if it can be successful, but it was awkwardly wrong:

$autojump-v Please source the correct autojump file in your shell's startup file. For more information, please reinstall autojump and read the post installation instructions. At this point, you need to configure it. To make it permanent in bash, run the following command:

$echo'. / usr/share/autojump/autojump.sh' > > ~ / .bashrc and refresh the configuration file:

$source ~ / .bashrc2

Basic usage

J is a convenient wrapper function for autojump, and any option that can be used with autojump can be used with j and vice versa.

\ 1. Jump to a directory that contains workspace:

J workspace / home/waleon/workspace\ 2. Sometimes it is more convenient to jump to a previously visited subdirectory than to type a full name:

Jc autotest / home/waleon/workspace/AutoTest\ 3. Open a File Explorer window to a directory (instead of jumping to it):

$jo workspace

Similarly, it is also supported to open the file manager to a subdirectory (as shown above):

$jco autotest 4. Weight of directory

The-stat option allows you to view the visited directory weight, and the number in front of the path is the weight value of the path:

J-- stat 20.0: / etc 26.5: / home/waleon/workspace/QTK 41.2: / home/waleon/workspace/AutoTest 51.0: / usr/share 52.0: / home/waleon/workspace _ 217: Total weight 6: number of entries 26.46: current directory weight data: / home/waleon/.local/share/autojump/autojump.txt if multiple directories are matched during the jump Give priority to the one with high weight. For example, both directories above contain work, and if you match at the same time, you will enter workspace instead of working (because 52.0 > 26.5):

J work / home/waleon/workspace of course, you can also jump to a directory with less weight as follows:

$j w work / home/waleon/working friendly Tip: the running log of autojump is stored in the ~ / .local/share/autojump/ directory. Don't fiddle with the files in it, or you may lose all your statistical results.

Read here, this "Linux how to install autojump" article has been introduced, want to master the knowledge of this article also need to practice and use in order to understand, if you want to know more about the article, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report