Home Linux Commands ExplainShell – Find What Each Part Of A Linux Command does

ExplainShell – Find What Each Part Of A Linux Command does

By sk
Published: Last Updated on 2.9K views

ExplainShell is a web service that helps you to find what each part of a Linux command does. Of course, you can refer man pages or do a quick google search to know about a Linux command. But it is not necessary. ExplainShell breaks down the long and confusing commands and tells you exactly what each part does. All you need to do is just copy and paste a Linux command in ExplainShell website, and it will instantly display what each part of a Linux command means.

Each part of the command is explained in a box layout, and highlighted when you move the mouse cursor over it. ExplainShell actually takes the details of the each command from man pages. Instead of going through the manpage of a command manually, you can use ExplainShell to get the details of any commandline argument faster and easier.

Find what each part of a Linux Command does using ExplainShell

Let us consider the following command:

$ find -iname '*.txt' -exec cp {} /home/ostechnix/ \;

Not everyone (Especially the newbies) know what this command will actually do. No problem! Here is where Explainshell website comes in help. Copy and paste the above command in ExplainShell website given below and hit Explain button.

ExplainShell

It breaks down the given Linux command into parts and displays the explanation of each part one by one. Seems useful, isn't it?

Have a look at the following screenshot.

Find what each part of a Linux Command does using ExplainShell

Find what each part of a Linux Command does using ExplainShell

As you see in the screenshot, explainshell displays the explanation of each part of the above command.

ExplainShell site contains 29761 parsed manpages from Ubuntu's manpage repository. So, you get details of almost all Linux commands.

Run ExplainShell locally Using Docker

You can run your own explainshell instance in your local system using Docker. Refer the following links to install Docker on RPM or DEB based systems.

After installing Docker and Docker-compose, clone explainshell github repository.

# git clone https://github.com/idank/explainshell.git

This command will clone the contents of explainshell git repository in a folder called explainshell in your current working directory.

Go to explainshell directory:

# cd explainshell/

And run the following commands one by one to run explainshell docker image.

# docker-compose build
# docker-compose up

Then, open your web browser and point it to http://IP_address:5000/. You might need to open the port 5000 in your firewall/router in order to access this URL from a remote system.

Here it is how Explanishell local website looks like in my Linux system.

Explainshell Docker Instance

Explainshell Docker Instance

Wait, we're not yet finished. You need import the man pages. All man pages will be found under /usr/share/man/ location in your Linux system. You can import any man pages of your choice. The following command imports the man pages of cp command.

# docker exec explainshell_web_1 bash -c "PYTHONPATH=. python explainshell/manager.py --log info /usr/share/man/man1/cp.1.gz"

That's it. Now you can search the cp command details in explainshell local website.


Related read:


Conclusion

As far as I tested, it displays details almost all command's explanation in a nice box layout. You don't have to go through long man pages or any website/blogs. ExplainShell makes a Linux user's commandline experience much easier, and it's a pretty handy tool to have in your arsenal.

Resources:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More