ExplainShell – Find What Each Part Of A Linux Command does

Find What Each Part Of A Linux Command does

Today, I came across an useful web service called ExplainShell 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. However, 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 commend is explained on its own in a box layout, and highlighted when you move the mouse cursor over it. ExplainShell actually takes the details of the each command from manpages. 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.

ExplainShell – Find What Each Part Of A Linux Command does

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.


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


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

Run ExplainShell locally Using Docker

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

After installing Docker and Docker-compose, clone explainshell gitgub 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.

We’re not 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 explianshell local website.


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 commanline experience much easier, and it’s a pretty handy tool to have in your arsenal.

That’s all for now. Hope this tool will help you. If you find this guide useful, please share it on your social networks and support OSTechNix.



Thanks for stopping by!

How can I benefit from this blog:

Have a Good day!!

You may also like...