Gogo – Create Directory “Bookmarking” in Linux

Introduction

Gogo is a powerful command line tool for creating directory “bookmarking” in Linux. It allows users to quickly and easily navigate to frequently used directories without having to type out the full path. Gogo also provides a number of other useful features such as tab completion, directory history, and more. With Gogo, users can save time and effort when navigating the Linux file system.

Gogo – Create Directory “Bookmarking” in Linux

To create a directory named “Bookmarking” in Linux, you can use the command:

mkdir Bookmarking

Gogo is an impressive way to bookmark directories inside your Linux shell. It allows you to create shortcuts to long and complicated paths in Linux. This way, you don’t have to type or remember long and complicated paths anymore in Linux.

For example, if you have a directory ~/Documents/Phone-Backup/Linux-Docs/Ubuntu/, using gogo, you can create an alias (a shortcut name), for instance Ubuntu to access it without typing the whole path anymore.

No matter your current working directory, you can move into ~/cd Documents/Phone-Backup/Linux-Docs/Ubuntu/ by simply using the alias Ubuntu.

In addition, it also allows you to create aliases for connecting directly to directories on remote Linux servers over an ssh connection.

How to Install Gogo in Linux Systems

To install Gogo, first clone the gogo repository from Github and then copy the gogo.py to any directory in your PATH environmental variable (if you already have the ~/bin/ directory, you can place it here, otherwise create a bin directory).

$ git clone https://github.com/mgoral/gogo.git
$ cd gogo/
$ mkdir -p ~/bin        #run this if you do not have ~/bin directory
$ cp gogo.py ~/bin/
Install Gogo in Linux
Install Gogo in Linux

Then add a function from gogo.sh to your ~/.bashrc (for Bash) or ~/.zshrc (for Zsh) file and verify it using the tail command as shown.

$ cat gogo.sh >> ~/.bashrc
$ tail  ~/.bashrc
OR
$ cat gogo.sh >> ~/.zshrc 
Add Gogo Function to Bashrc
Add Gogo Function to Bashrc

How to Use Gogo in Linux Systems

To start using gogo, you need to log out and log in back to use it. Gogo stores its configuration in ~/.config/gogo/gogo.conf file (which should be auto-created if it doesn’t exist) and has the following syntax.

# Comments are lines that start from '#' character.
default = ~/something
alias = /desired/path
alias2 = /desired/path with space
alias3 = "/this/also/works"
zażółć = "unicode/is/also/supported/zażółć gęślą jaźń"

If you run gogo without any arguments, it will go to the directory specified in default; this alias is always available, even if it’s not in the configuration file, and points to the $HOME directory.

To display the current aliases, use the -l switch. From the following screenshot, you can see that the default points to ~/home/tecmint which is user tecmint’s home directory on the system.

$ gogo -l   
List Gogo Aliases
List Gogo Aliases

Below is an example of running gogo without any arguments.

$ cd Documents/Phone-Backup/Linux-Docs/
$ gogo
$ pwd
Running Gogo Without Options
Running Gogo Without Options

To create a shortcut to a long path, move into the directory you want and use the -a flag to add an alias for that directory in gogo, as shown.

$ cd Documents/Phone-Backup/Linux-Docs/Ubuntu/
$ gogo -a Ubuntu
$ gogo
$ gogo -l
$ gogo -a Ubuntu
$ pwd
Create Long Directory Shortcut
Create a Long Directory Shortcut

You can also create aliases for connecting directly to directories on a remote Linux server. To do this, simply add the following lines to a gogo configuration file, which can be accessed using -e flag, this will use the editor specified in the $EDITOR env variable.

$ gogo -e

One configuration file opens, add the following lines to it.

sshroot = ssh://[email protected]:/bin/bash  /root/
sshtdocs = ssh://[email protected]  ~/tecmint/docs/
Gogo Configuration File
Gogo Configuration File

To display the gogo help message, use the -h option.

$ gogo -h

One notable limitation of gogo is its lack of support for auto-completion – when accessing subdirectories/child directories under an aliased long path.

Gogo github repository: https://github.com/mgoral/gogo

Gogo is a remarkable way that comes in handy, for creating shortcuts to long and complicated paths in Linux. Try it out and share your thoughts about it or ask any questions via the comment form below.

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

Jassweb 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 Jassweb! 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.

Creating a Bookmarking Directory in Linux

Creating a bookmarking directory in Linux is a great way to keep track of your favorite websites and other online resources. With a bookmarking directory, you can quickly access the websites you need without having to search for them every time. This guide will show you how to create a bookmarking directory in Linux.

Step 1: Create a Directory

The first step is to create a directory for your bookmarks. To do this, open a terminal window and type the following command:

mkdir ~/bookmarks

This will create a directory called “bookmarks” in your home directory.

Step 2: Add Bookmarks

Now that you have a directory for your bookmarks, you can start adding them. To do this, open a web browser and navigate to the website you want to bookmark. Once you’re there, right-click on the page and select “Bookmark this page”. This will add the website to your browser’s bookmarks list.

Next, open a terminal window and type the following command:

ln -s ~/bookmarks/[bookmark name] [URL]

Replace [bookmark name] with the name of the bookmark you want to add, and [URL] with the URL of the website. This will create a symbolic link in your bookmarks directory that points to the website.

Step 3: Access Your Bookmarks

Now that you’ve added your bookmarks, you can access them quickly and easily. To do this, open a terminal window and type the following command:

cd ~/bookmarks

This will open the bookmarks directory. From here, you can type the name of the bookmark you want to access and press enter. This will open the website in your default web browser.

Conclusion

Creating a bookmarking directory in Linux is a great way to keep track of your favorite websites and other online resources. With a bookmarking directory, you can quickly access the websites you need without having to search for them every time. This guide has shown you how to create a bookmarking directory in Linux.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?