Learn Bash the Hard Way by Ian Miell [Leanpub PDF/iPad/Kindle]
Learn Bash the Hard Way
Learn Bash the Hard Way (Learn Bash the Hard Way)
Learn Bash the Hard Way

This book is 100% complete

Completed on 2018-02-13

About the Book

This book takes you through knowledge essential to a mastery of bash. It is divided into four parts:

1) Core Bash

Core foundational concepts essential for understanding bash on the command line.

Areas covered:

  • globbing
  • variables
  • functions
  • pipes and redirects
  • scripts and startup

2) Bash Scripting


Gets your bash scripting skills up to scratch.


  • command substitution
  • tests
  • loops
  • exit codes

3) Tips and techniques


A primer on commonly-used techniques and features that are useful to know about.


  • the prompts
  • here docs
  • history
  • shortcuts

4) Advanced Bash

Building on the first three chapters, and introducing some more advanced features, this chapters takes your bash skills beyond the norm.

  • signals and traps
  • debugging
  • string manipulation
  • a real-world application 

About the Author

Ian Miell
Ian Miell

Ian Miell has over twenty years' experience in IT, writing, running, architecting, and maintaining software for some of the world's busiest systems.

He has written the book 'Docker in Practice' (published by Manning), 'Learn Bash the Hard Way' (published on Leanpub), as well as various training courses and videos.

He blogs about his experiences at https://zwischenzugs.com

Reader Testimonials

James Tomasino
James Tomasino

VP, Regional Technology Director, CSM at GSW Worldwide

This book is fantastic. Follow the instructions and actually enter all the commands as they happen. Digging into seemingly simple questions really helped me grok everything. I think I'll give one more read to the section on traps, but otherwise I feel so much stronger in my BASH-FU. Do you work in the terminal? Do yourself a favor and read this.

Sayantan Mondal
Sayantan Mondal


Wow...great learning


Nice Read!

Nice read! #learnbashthehardway Good work @ianmiell

Magnus Glantz
Magnus Glantz

Solution Architect, Red Hat

Really nice read :)

Joe Poser @J_Poser
Joe Poser @J_Poser


I use it every day and I'm learning loads. Keep up the good work.

Stephen Keefauver
Stephen Keefauver

Senior Business Systems Analyst at Intuit

This book has been so valuable to me. I have used bash as needed for a couple years in bit of a haphazard, "just find things that work type way"(not something I am proud of but just being honest). This book provides a great framework for really understanding the topics covered. I do not come from a CS background in school so books like this are what makes it possible for me to do the work I love.

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub