Best cheat sheet for everyone

All credit for this mentioned method goes to Chubin^1 and the cheat.sh^2 project

Hi folks here I'll show you one of the best cheat sheets if you for example forgot how to use tar, like in the picture below tar what?

You can just type cht tar in your terminal.

So to get this working we have to do the following, just install curl. I'll provide the steps for the most used Linux Distributions.

sudo apt install -y curl       #Debian and Debian based systems
sudo zypper install -y curl #OpenSUSE/SUSE
sudo dnf install -y curl       #Fedora
sudo pacman -S curl           #Arch Linux

After that you go to your home folder just type cd in most distris it will instantly teleport you to your home folder. You can tpye pwd to see where you are, ideally it should print out something like this.

/home/$USERNAME

The $USERNAME is the named path of your User. For example if you named it to penguin the output looks like

/home/penguin

There you'll find your .bashrc file now you can append this function with the editor of your choice

nano .bashrc or
vim .bashrc or whatever you use, you can also use a graphical one

gedit .bashrc or
mousepad -H .bashrc

Then you go to the bottom of the file and append this function

function cht() {
      curl cht.sh/$1
  }

Then you save your .bashrc

Close and open your terminal or type this

source .bashrc

And then you can look up the most used commands

You can even look up the basic programming structures of some languages

cht python/:learn

Or even rfc's :)

cht rfc/1234

Cheers :)