Awesome Open Source
Awesome Open Source


Get quick answers to common linux related questions, right inside your terminal by typing "howdoi [your question]".




Quick answer

$ howdoi extract a bz2 file

  -j, --bzip2
            filter the archive through bzip2
  tar -xvjf enginsxt.tar.bz2

Verbose output

$ howdoi -v add a program to cron

  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

Multiple results

$ howdoi -n 2 attach to a screen

 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)


  screen -d -r


Programming questions

$ howdoi js hex to int
  hexString = yourNumber.toString(16);
  yourNumber = parseInt(hexString, 16);


howdoi [-n -v -h -i] -- question

-n		Number of results (default is 1)
-v		Show full answer (otherwise shows only code)
-i		Interactive or REPL mode (useful for hotkey binding)
-h		Shows this help


Just run the following commands (requires PHP 5+).

$ mkdir -p ~/bin && wget -O ~/bin/howdoi && chmod +x ~/bin/howdoi
$ sudo ln -s ~/bin/howdoi /usr/local/bin/howdoi

$ howdoi check my linux version

Interactive or Popup mode

It is possible to run this outside the terminal interactively via a hotkey binding. It can also handle simple programming related questions too.


(you can ask questions in a popup too by pressing a hotkey - as described below)

Setup hotkey binding

  • Copy in your ~/bin folder (or the folder in which you've downloaded howdoi script)
  • Run chmod +x ~/bin/
  • Go to Settings > Keyboard > Shortcuts and add a new shortcut to ~/bin/
  • Assign a hotkey (e.g. Ctrl+Shift+H) to your new shortcut.
  • Now press the hotkey and you should see a popup where you can type your question!


Hopefully it will save you some time and makes your life easier. If so, please share it with your friends and give me feedback here.

Thank you everyone who encouraged me and voted for this project on Hacker news. Seeing comments like these really makes the work I've put into it worth it and now I want to make more such projects!

testimonial 1

testimonial 2


  • It's just a quick hack to save you a few clicks. I wrote this in just a few hours, so it's not perfect.
  • Right now, it prefers Ubuntu solutions over other linux distros.
  • Just to clarify this only prints the answer, it does not run any code on your machine (in case the screenshot gives you the wrong impression).


Perl's Artistic Licence

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Php (297,808
Terminal (18,196
Popup (3,310
Hotkeys (1,927