What you do when you are not sure of the command you are running especially in case of complex commands which uses a lot of options. We use man pages to get some help in such situation. Some of the other options may include commands like ‘help‘, ‘whereis‘ and ‘whatis‘. But all has their Pros and Cons.
While going through man pages for options and help, the description in man pages are too lengthy to understand specially in short span of time.
Linux Man Pages
Linux Man Pages
Similarly, ‘help‘ command may not give you desired output.
Linux help command
Help Command
A ‘whereis‘ command hardly tells anything other than the location of Installed Binaries (May be Important at time).
Linux Whereis Command
Whereis Command
A ‘whatis‘ command gives strict and one liner answer which is not much helpful other than acknowledging the purpose of the command, Moreover it never says a single word about the available options.
Linux Whatis Command
Whatis Command
We have used all these options till date to solve our issue in the dilemma but here comes an interactive cheat-sheet application ‘cheat‘ which is going to lead all the rest.
What is cheat?
Cheat is an interactive cheat-sheet application released under GNU General Public License for Linux Command line users which serves the purpose of showing, use cases of a Linux command with all the options and their short yet understandable function.
Install Cheat in Linux
Cheat: Provides Easy Command Options
Installing ‘Cheat’ in Linux Systems
‘Cheat‘ has two major dependency – ‘python‘ and ‘pip‘. Make sure you have installed python and pip before installing ‘cheat‘ on the system.
Install Python
# apt-get install Python (On Debian based Systems)
# yum install python (On RedHat based Systems)
Install Pip
# apt-get install python-pip (On Debian based Systems)
# yum install python-pip (On RedHat based Systems)
NOTE: pip is an easy install replacement and is intended to be an improved Python package installer.
Download and Install Cheat
We will be downloading ‘cheat’ from Git. Make sure you have package ‘git’ installed, if not better install this first.
# apt-get install git (On Debian based Systems)
# yum install git (On RedHat based Systems)
Next, install the required python dependencies by running following command.
# pip install docopt pygments
Now, clone the Git repository of cheat.
# git clone https://github.com/chrisallenlane/cheat.git
Move to the cheat directory and run ‘setup.py‘ (a python script).
# cd cheat
# python setup.py install