Skip to content

About BashSnippets

Who runs it

BashSnippets is a free bash script library run by a self-taught Linux developer based in Florida. Started on Ubuntu in 2013, moved through Debian and Fedora as different jobs demanded different environments, and picked up enough bash along the way to automate the repetitive parts of sysadmin work.

The site started because I kept re-writing the same scripts. Disk monitoring. Log cleanup. Service watchdogs. The third time I wrote a disk space checker for a different employer, I decided to document it properly instead of burying it in ~/scripts. That folder became this site.

Everything here comes from real operational use — scripts I've run on production servers, broken at least once, and fixed. The explanations exist because I spent time figuring out why the standard one-liners fail on edge cases: the wrong partition, macOS df output formatting, cron's minimal PATH. Rather than explain that again, I wrote it up once.

Why bash?

Bash runs on every Linux server without anything installed. Scripts that depend on Python virtual environments, Node.js, or Ruby introduce dependency problems on servers that don't have those runtimes or have conflicting versions. A bash script is a text file. Any sysadmin can read it, audit it, and run it in under a minute.

The constraint of keeping things in bash also forces clarity. If you can't implement something cleanly in bash, that's often a sign the script is trying to do too much. The right answer is usually a smaller, focused script rather than a bash script pretending to be an application.

How scripts are tested

Every script on this site runs on Ubuntu 22.04 LTS before it goes up. Scripts with filesystem or process interactions also get tested on Debian 12. macOS notes come from running the same scripts on macOS Ventura using Homebrew's bash 5.x — macOS ships bash 3.2 from 2007, which is missing features these scripts rely on.

I test the failure cases, not just the happy path. The "Common Mistakes" sections on each page come from things that actually broke during testing — and from watching the same mistakes show up in production support tickets repeatedly. Scripts that don't behave correctly under failure conditions don't make it onto the site.

What's on the site

28 bash scripts

Copy-paste ready, plain-English explanations

9 interactive tools

Cron builder, chmod calc, exit code lookup

Zero logins

No account, no email, no paywall

MIT licensed

Use the scripts anywhere, including production

Stack

Static HTML migrated to Next.js 15 with TypeScript and MDX. Hosted on Vercel. Scripts tested on Ubuntu 22.04 LTS, Debian 12, Fedora 39, and macOS Ventura. The site has no database — snippet content lives in MDX files, and most interactive tools are React components rendered client-side, with a few still embedding a standalone HTML page in an iframe.

Recommended hosting & domains

Run this script on a real Linux server

Get $200 free credit — DigitalOcean

Get $200 Free →

Affiliate link · we earn a commission

Need a domain for your next project?

Register with Namecheap — free WHOIS privacy included

Check Domain Prices →

Affiliate link · we earn a commission

Get in touch

anguisheh1@gmail.com

Browse the script library →