A Bash web server

Final Comments

A Bash web server is a quick and easy solution for viewing the output from Bash scripts and commands. I especially like the fact that I don't need to install any special software, nor do I need to write any HTML code.

It is important to note that the number of concurrent connections is very low (one per second if the nc -q option is 1).

A Bash web server supports client-side GET and POST requests. However, for complex requirements, the Bash code could start to get messy quickly. In that case, it would probably be best to look at another solution.


  1. One-line web servers: https://gist.github.com/willurd/5720255
  2. FIGlet documentation: http://www.figlet.org/

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Gemini Protocol

    Create Gemini pages to show sensor data or control a Raspberry Pi rover.

  • Gnublin

    Embedded Linux doesn’t have to be rocket science, which the Gnublin board clearly shows. If you want to learn how to read sensors, flip switches, and switch LEDs on ARM Linux, this tiny machine is perfect for your research.

  • Elixer

    The Elixir programming language on a Raspberry Pi lets you create distributed projects in just a few lines of code.

  • Kitchen Timer

    A simple kitchen helper with two timers assists budding chefs in coping with dishes that are unlikely to be ready at the same time.

  • Gnuplot

    Use Gnuplot with command-line utilities.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More