# How to alias and navigate to directories with autocomplete in Linux

DevFeed: [How to alias and navigate to directories with autocomplete in Linux](<https://devfeed.tech/articles/how-to-alias-and-navigate-to-directories-with-autocomplete-in-linux-37445.md>)

Original publisher: [Read original article](<https://iridakos.com/programming/2019/04/10/shell-navigation-with-autocomplete>)

Author: Lazarus Lazaridis

Published: 2019-04-10T13:00:00Z

Content type: tutorial

Language: en

Sources: [Lazarus Lazaridis](<https://devfeed.tech/sources/lazarus-lazaridis.md>)

Topics: [Shell](<https://devfeed.tech/topics/shell.md>), [Script](<https://devfeed.tech/topics/script.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Utility Software](<https://devfeed.tech/topics/utility.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.md>)

Tags: [aliases](<https://devfeed.tech/tags/aliases.md>), [bash](<https://devfeed.tech/tags/bash.md>), [completion](<https://devfeed.tech/tags/completion.md>), [directory](<https://devfeed.tech/tags/directory.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [installation](<https://devfeed.tech/tags/installation.md>), [linux](<https://devfeed.tech/tags/linux.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [productivity](<https://devfeed.tech/tags/productivity.md>), [programming](<https://devfeed.tech/tags/programming.md>), [script](<https://devfeed.tech/tags/script.md>), [scripts](<https://devfeed.tech/tags/scripts.md>), [shell](<https://devfeed.tech/tags/shell.md>), [tools](<https://devfeed.tech/tags/tools.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

This tutorial introduces goto, a shell utility for navigating to registered directory aliases with autocomplete. It explains installation, alias management, navigation, cleanup, help, version commands, and directory-stack features.

## Source excerpt

I use the terminal a lot and in my day to day work I tend to navigate to the same bunch of directories. There are some awesome tools out there (like autojump or z) but sometimes, especially when the directories are similarly named, there is a need to be explicit to navigate to the proper one. I decided to write a script to overcome this issue and to avoid having to edit my .bash* files to manage aliases each time I wanted to add or remove a directory. goto goto is a shell utility to quickly navigate to aliased directories with autocomplete (tab completion). goto repo at GitHub User registers directory aliases, for example: goto --register dev /home/iridakos/development and then cds to that directory with: goto dev Find below documentation on the script but make sure you check the script's documentation page for updates. Sorry for the name, I know it brings back memories but it's not what it seems :) Installation To install goto all you have to do is clone the repository locally: git clone https://github.com/iridakos/goto.git navigate to it cd goto and execute: sudo ./install You need to restart your shell after installation. Usage Change to an aliased directory Register an alias Unregister an alias List aliases Expand an alias Cleanup Help Version Extras Push before changing directories Revert to a pushed directory Change to an aliased directory To change to an aliased directory, type: goto <alias> Example goto dev Register an alias To register a directory alias, type: goto -r <alias> <directory> or goto --register <alias> <directory> Example goto -r blog /mnt/external/projects/html/blog or goto --register blog /mnt/external/projects/html/blog Notes goto expands the directories hence you can easily alias your current directory with: goto -r last_release . and it will automatically be aliased to the whole path. Pressing the tab key after the alias name, you have the default directory suggestions by the shell. Unregister an alias To unregister an alias, use: goto -u <