6 Useful Tools to Remember Linux Commands Forever

Introduction

If you are a Linux user, you know how important it is to remember Linux commands. Knowing the right commands can help you get the most out of your Linux system. But remembering all the commands can be a challenge. Fortunately, there are some useful tools that can help you remember Linux commands forever. In this article, we will discuss 6 of the most useful tools that can help you remember Linux commands. We will look at how they work and how they can help you become a more efficient Linux user.

6 Useful Tools to Remember Linux Commands Forever

1. Bash History: Bash history is a built-in command line tool that allows you to easily recall and reuse previously used commands.

2. Cheat Sheets: Cheat sheets are a great way to quickly look up commands and syntax.

3. Man Pages: Man pages are the official documentation for Linux commands.

4. Tab Completion: Tab completion is a feature of the Bash shell that allows you to quickly complete commands and file paths.

5. Aliases: Aliases are shortcuts that you can create to quickly execute a command.

6. Memorization Techniques: Memorization techniques such as spaced repetition and mnemonics can help you to remember commands more easily.

There are thousands of tools, utilities, and programs that come pre-installed on a Linux system. You can run them from a terminal window or virtual console as commands via a shell such as Bash.

A command is typically the pathname (eg. /usr/bin/top) or basename (e.g. top) of a program including arguments passed to it. However, there is a common misconception among Linux users that a command is an actual program or tool.

Remembering Linux commands and their usage is not easy, especially for new Linux users. In this article, we will share 6 command-line tools for remembering Linux commands.

1. History Command

Bash records all unique commands executed by users on the system in a history file. Each user’s bash history file is stored in their home directory (e.g. /home/tecmint/.bash_history for user tecmint).

A user can only view his/her own history file content and root can view the bash history file for all users on a Linux system.

To view your bash history, use the history command as shown.

$ history  
View User History Command
View User History Command

To fetch a command from bash history, press the Up arrow key continuously to search through a list of all unique commands that you run previously. If you have skipped the command you are looking for or failed to get it, use the Down arrow key to perform a reverse search.

This bash feature is one of the many ways of easily remembering Linux commands. You can find more examples of the history command in these articles:

2. Fish Shell – Friendly Interactive Shell

Fish is a modern, powerful, user-friendly, feature-rich, and interactive shell that is compatible with Bash or Zsh. It supports automatic suggestions of file names and commands in the current directory and history respectively, which helps you to easily remember commands.

In the following screenshot, the command “uname -r” is in the bash history, to easily remember it, type the later “u” or “un” and fish will auto-suggest the complete command. If the command auto-suggested is the one you wish to run, use the Right arrow key to select it and run it.

Fish - Friendly Interactive Shell
Fish – Friendly Interactive Shell

Fish is a fully-fledged shell program with a wealth of features for you to remember Linux commands in a straightforward manner.

3. Apropos Command

apropos is a command that searches and displays the name and short description of a keyword, for instance, a command name, as written in the man page of that command.

If you do not know the exact name of a command, simply type a keyword (regular expression) to search for it. For example, if you are searching for the description of the docker-commit command, you can type docker, apropos will search and list all commands with the string docker, and their description as well.

$ apropos docker
Find Linux Command Description
Find Linux Command Description

You can get the description of the exact keyword or command name you have provided as shown.

$ apropos docker-commit
OR
$ apropos -a docker-commit

apropos command is another useful way of remembering Linux commands, to guide you on what command to use for a specific task or if you have forgotten what a command is used for. Read on, because the next tool is even more interesting.

4. Explain Shell Script

Explain Shell is a small Bash script that explains shell commands. It requires the curl program and a working internet connection to display a command description summary and in addition, if the command includes a flag, it also shows a description of that flag.

To use it, first, you need to add the following code at the bottom of you $HOME/.bashrc file.

# explain.sh begins
explain () {
  if [ "$#" -eq 0 ]; then
    while read  -p "Command: " cmd; do
      curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd"
    done
    echo "Bye!"
  elif [ "$#" -eq 1 ]; then
    curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$1"
  else
    echo "Usage"
    echo "explain                  interactive mode."
    echo "explain 'cmd -o | ...'   one quoted command to explain it."
  fi
}

Save and close the file, then source it or open a fresh terminal window.

$ source .bashrc

Assuming you have forgotten what the command “apropos -a” does, you can use explain command to help you remember it, as shown.

$ explain 'apropos -a'
Show Linux Command Manual
Show Linux Command Manual

This script can explain to you any shell command effectively, thus helping you remember Linux commands. Unlike the explain shell script, the next tool brings a distinct approach, it shows usage examples of a command.

5. Cheat – Linux Command Cheat Sheet

Cheat is a simple, interactive command-line cheat-sheet program that shows use cases of a Linux command with a number of options and their short understandable function. It is useful for Linux newbies and sysadmins.

To install and use it on Unix-like systems, you may simply paste the following snippet into your terminal:

$ cd /tmp 
$ wget https://github.com/cheat/cheat/releases/download/4.4.0/cheat-linux-amd64.gz 
$ gunzip cheat-linux-amd64.gz
$ chmod +x cheat-linux-amd64 
$ sudo mv cheat-linux-amd64 /usr/local/bin/cheat

You may need to change the version number (4.4.0) and the archive (cheat-linux-amd64.gz) while downloading from the releases page.

To view a cheatsheet for tar command.

$ cheat tar
Cheat - Tar Command Usage
Cheat – Tar Command Usage

Do check out our complete article about the Cheat program and its usage with examples.

6. Tardigrade

Tardigrade is a bookmarking tool for commands that allows you to bookmark and organize your frequently used commands for easy access. The commands are saved in a hierarchical and organized way that is easy to retrieve.

For installation and usage, visit the Tardigrade website and download the latest version of the bookmarking tool.

That’s all! In this article, we have shared 6 command-line tools for remembering Linux commands. If you know any other tools for the same purpose that are missing from the list above, let us know via the feedback form below.

6 Useful Tools to Remember Linux Commands Forever

Linux commands can be difficult to remember, especially if you’re new to the operating system. Fortunately, there are a number of tools available to help you remember Linux commands and keep them at your fingertips. Here are six of the best tools to help you remember Linux commands forever.

1. Bash History

Bash history is a built-in tool that stores all of the commands you’ve used in the past. To access your bash history, simply type “history” in the command line. This will display a list of all the commands you’ve used, which you can then copy and paste into the command line to use again.

2. Man Pages

Man pages are a great resource for learning about Linux commands. They provide detailed information about each command, including its syntax, options, and examples. To access a man page, simply type “man” followed by the command you’re interested in. For example, to access the man page for the “ls” command, you would type “man ls”.

3. Cheat Sheets

Cheat sheets are a great way to quickly look up Linux commands. They provide a concise list of commands and their syntax, which you can refer to when you need to remember a command. There are a number of cheat sheets available online, so you can easily find one that suits your needs.

4. Command Line Autocomplete

Command line autocomplete is a great way to quickly remember Linux commands. When you start typing a command, the command line will automatically suggest commands that match what you’re typing. This makes it easy to quickly remember the syntax of a command without having to look it up.

5. Command Line Aliases

Command line aliases are a great way to quickly remember complex commands. An alias is a shortcut for a command, which you can create by typing “alias” followed by the command and its shortcut. For example, if you wanted to create an alias for the “ls” command, you could type “alias ls=’ls -l’”. This would create an alias for the “ls” command that would automatically run the “ls -l” command when you type “ls”.

6. Command Line Search

Command line search is a great way to quickly find the command you’re looking for. You can use the “apropos” command to search for commands that match a certain keyword. For example, if you wanted to find a command that deals with files, you could type “apropos file”. This would display a list of commands that match the keyword “file”.

These are just a few of the tools available to help you remember Linux commands forever. With these tools, you’ll be able to quickly and easily remember Linux commands and keep them at your fingertips.

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?