LinuxCommandLibrary

bashmarks

Bookmark and jump to directories easily

TLDR

Add the bashmark aliases to your shell

$ source /usr/share/bashmarks/bashmarks.sh
copy

List available bookmarks
$ l
copy

Save the current directory as "bookmark_name"
$ s [bookmark_name]
copy

Go to a bookmarked directory
$ g [bookmark_name]
copy

Print a bookmarked directory's contents
$ p [bookmark_name]
copy

Delete a bookmark
$ d [bookmark_name]
copy

SYNOPSIS

mark [NAME]
unmark [NAME]
jump [NAME]
list

PARAMETERS

mark NAME
    Bookmark current directory as NAME (alias: m)

unmark NAME
    Delete bookmark NAME (alias: u)

jump NAME
    Change to directory bookmarked as NAME (alias: j)

list
    Display all bookmarks (alias: l)

DESCRIPTION

Bashmarks is a lightweight Bash script that enables quick bookmarking of frequently used directories in the shell. By sourcing the script in your .bashrc or .bash_profile, it adds convenient shell functions to save, list, jump to, and delete directory marks. Ideal for developers and power users navigating complex directory structures, it stores bookmarks in ~/.marks as name=path pairs. Usage is intuitive: mark foo saves the current directory as foo, jump foo changes to it, list shows all marks, and unmark foo removes it. Short aliases like m, j, l, and u speed up interaction. No external dependencies beyond Bash; enhances productivity without cluttering the environment.

Installation is simple: download bashmarks.bash from GitHub and add source ~/path/to/bashmarks.bash to your shell config. Reload with source ~/.bashrc. Supports tab-completion for marks after listing once.

CAVEATS

Bash-only; requires sourcing script in shell profile. Bookmarks stored plainly in ~/.marks (no encryption). No support for remote paths or wildcards.

INSTALLATION

curl -Ls https://raw.githubusercontent.com/jabranr/bashmarks/master/bashmarks.bash > ~/.local/bin/bashmarks.bash
source ~/.bashrc

ALIASES

Built-in: m=mark, u=unmark, j=jump, l=list for quick typing.

HISTORY

Created by Jabran R. around 2013; hosted on GitHub (jabranr/bashmarks). Gained popularity for simplifying shell navigation; minor updates for compatibility with newer Bash versions.

SEE ALSO

cd(1), pushd(1), alias(1), source(1)

Copied to clipboard