Why piping commands together matters
The real power of the Linux command line comes from combining small, single-purpose commands with the pipe operator (`|`), which sends one command's output directly into another as input. A command like `ps aux | grep firefox` lists all processes and filters that output down to just the ones matching "firefox," rather than needing a single command that does both jobs.
man pages are the built-in reference
Every standard command has a manual accessible by typing `man` followed by the command name (for example, `man grep`), which documents every available flag and option in detail. This is worth checking before searching online, since it always matches the exact version installed on your system.
Frequently Asked Questions
Do these commands work the same on macOS?
Many do, since macOS is Unix-based, but some commands behave slightly differently (for example, certain `sed` or `tar` flags differ between the GNU versions on Linux and the BSD versions on macOS). Checking the local `man` page is the safest way to confirm exact behavior.
What's the safest way to practice these without risking my system?
A virtual machine, a cloud-based Linux sandbox, or the Windows Subsystem for Linux (WSL) all provide an isolated environment where mistakes like a bad `rm` command cannot affect your main system.