Bash Commands Cheatsheet

Search bash builtins and common GNU coreutils with syntax and flags.

A searchable Bash and GNU coreutils reference with synopsis, common options and a one-liner example for each command, covering shell builtins, file tools and text processing utilities.

What is the difference between a shell builtin and a coreutils command?

A builtin like cd, export or alias runs inside the bash process itself and can change the shell's state. A coreutils command like ls or grep is a separate executable on your $PATH that runs as a child process and cannot, for example, change the parent shell's directory.

This is a searchable Bash and GNU coreutils cheatsheet. Each entry shows the command’s synopsis, its most useful flags and a working one-liner example, so you can recall the exact syntax for everyday tasks without leaving the page. It covers shell builtins, file and directory tools, and the text-processing utilities you reach for in pipelines.

How it works

The reference splits commands into groups. Builtins such as cd, export, alias and source are part of bash itself and act on the shell’s own state. Coreutils such as ls, cp, grep, sed and sort are standalone programs on your $PATH. A handful of common tools like tar, ps and df round out a working shell session. Search matches against the command name, its synopsis, the description and the example, so you can look up a name you remember (grep) or a task you want (permissions, archive, count lines).

Tips and examples

Commands compose through pipes: grep -rn 'TODO' src/ | wc -l counts every TODO in a tree. Quote globs you want find to expand rather than the shell, as in find . -name '*.tmp'. Prefer chmod 755 (octal) for a quick mode set, and chmod u+x (symbolic) when you only want to flip one bit. For destructive commands like rm -rf, double-check the path first — there is no undo. For the full option list of any command, run man <cmd> or <cmd> --help. Everything here runs in your browser; nothing is uploaded.