Get Instant Linux Command Answers with the howdoi CLI Tool
This guide explains how to install the howdoi command‑line utility, use its natural‑language queries to retrieve Linux command tutorials, and leverage options for multiple answers, verbose output, and custom queries, all with a few simple shell commands.
Installation Steps
howdoi requires PHP 5.0 or newer and can be installed in two commands:
$ mkdir -p ~/bin && wget https://raw.githubusercontent.com/san-kumar/howdoi/master/howdoi -O ~/bin/howdoi && chmod +x ~/bin/howdoi
$ sudo ln -s ~/bin/howdoi /usr/local/bin/howdoiBasic Usage Syntax
The tool is invoked as: howdoi [-n -v -h] — question Options:
-n – number of answers to return (default 1)
-v – verbose output, showing the full answer instead of just the command snippet
-h – display help information
Example Queries
Quick command lookup
Find how to extract a .bz2 archive: $ howdoi extract a bz2 file Result:
-j, --bzip2
filter the archive through bzip2
tar -xvjf file.tar.bz2
Source: https://askubuntu.com/questions/707861/how-to-extract-tar-bz2Detailed tutorial
Ask how to add a program to cron: $ howdoi -v add a program to cron Result includes a short explanation and a command example:
Put a shell script in one of these folders: /etc/cron.daily, /etc/cron.hourly, /etc/cron.monthly or /etc/cron.weekly.
If these are not enough for you, you can add more specific tasks e.g. twice a month or every 5 minutes. Go to the terminal and type:
crontab -e
…snip
Source: https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-jobMultiple answers
Request two ways to attach to a screen session: $ howdoi -n 2 attach to a screen Result provides two distinct commands and their usage:
screen -S myprogramrunningunderscreen
screen -ls
There are screens on:
4964.myprogramrunningunderscreen (05/31/2013 09:42:29 PM) (Detached)
4874.pts-1.creeper (05/31/2013 09:39:12 PM) (Detached)
Source: https://askubuntu.com/questions/302662/reattaching-to-an-existing-screen-session
screen -d -r
Source: https://askubuntu.com/questions/302662/reattaching-to-an-existing-screen-sessionOther useful queries
Upgrade PHP to the latest version:
$ howdoi upgrade to latest php
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-add-repository ppa:ondrej/php
sudo apt-add-repository ppa:ondrej/php5-oldstable
sudo apt-add-repository ppa:ondrej/php5
sudo apt-add-repository ppa:ondrej/php5-5.6
sudo apt-get update
sudo apt-get install php5.5
sudo apt-get install php5.6
sudo apt-get install php7.0
do-release-upgrade
Source: https://askubuntu.com/questions/565784/how-do-i-upgrade-php-version-to-the-latest-stable-released-versionProject Origin
The howdoi tool was created by Indian developer San Kumar and open‑sourced on GitHub (https://github.com/san-kumar/howdoi) in May 2019. It pulls answers from AskUbuntu and presents them in a conversational, command‑line friendly format, helping Linux newcomers obtain solutions quickly.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
ITPUB
Official ITPUB account sharing technical insights, community news, and exciting events.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
