Shells, Commands, and the Case for the Terminal
The command line remains one of the most direct ways to interact with your machine. It’s composed of two layers: the shell and the commands you type into it. The shell provides the interface and handles customization—scripts, aliases, and configuration files all live here—while commands tell the computer what to do. The examples in this guide are Bash-focused, since it’s the most widely used shell. Windows users can follow along using Windows Subsystem for Linux (WSL).
Keyboard Shortcuts for Faster Navigation
Small ergonomic habits translate into real time savings when you’re working in a terminal. The following shortcuts handle the most frequent editing and navigation tasks:
CTRL + C: Cancel the current commandCTRL + A: Move the cursor to the beginning of the lineCTRL + E: Move the cursor to the end of the lineCTRL + L: Clear the terminal screenCTRL + _: Undo the last editCTRL-D: Exit shell sessionTAB: Auto-complete commands, file names, and paths
Reusing Work with Command History
Your shell remembers what you’ve already executed, so there’s no reason to retype long commands. Instead of searching through your scrollback, use the built-in history controls:
history n: Access the list of previously run commands!!: Execute the last command againCTRL + R: Reverse search for a previously executed commandCTRL + P: Move to the previous command in the historyCTRL + N: Move to the next command in the historyCTRL + G: Abort the active search
Patterns for Handling Files in Bulk
Wildcards let you target multiple files without listing every name. They work wherever a file argument is expected to match a pattern:
?: Matches a single character. For example,d?gmatchesdog,dig, or any single character in that position.*: Matches any number of characters. A search fors*nspans everything betweensandn, regardless of length.[]: Matches any single character from the set inside the brackets.
Chaining Operations with Pipes
The pipe symbol (|) connects the standard output of one command to the standard input of another. This pattern allows you to build complex pipelines from simple building blocks. For example, this one-liner filters, sorts, deduplicates, and counts files whose names contain "test":
ls -la | grep test | sort | uniq | wc -l
Breaking down what happens at each stage:
- List all files and directories in long format
- Search for lines containing the string "test"
- Sort the matching lines alphabetically
- Remove duplicate lines
- Count the remaining lines
Dynamic Arguments via Command Substitution
Command substitution lets you insert the output of one command directly into another. Both of these syntaxes work:
$(command) or `command`
Here’s a simple example that pulls the current date directly into a sentence:
$ echo "the date is $(date)"

CLI Tools Worth Adding to Your Terminal
Beyond the core Unix utilities, there’s a healthy ecosystem of standalone CLI tools—some built for serious productivity, a few purely for fun. GitHub’s engineers also include some entertaining options like football-cli and spotify-tui if you need a break from coding.
|
|
|
| grep or ack grep is a command-line utility that allows users to search for specific patterns in text files. Users can search for a specific word, phrase, or regular expression, and output the matching lines. ack is designed to be a faster alternative to the traditional grep command. Some prefer ack over grep because it can automatically exclude files that are not typically used for programming, such as binary files or backup files. | jq jq is a lightweight and powerful command-line JSON processor that allows developers to parse, filter, and transform JSON data using a range of query and manipulation functions. With jq, developers can easily extract specific data from large JSON files, format JSON output, and even convert between JSON and other data formats. | ImageMagick Though ImageMagick has been around since the ‘90s, this tool remains the gold standard for all things image-related. It supports a wide range of image formats and can help simplify resizing, cropping, rotating, and applying filters and effects. One of the most powerful features of ImageMagick is its ability to automate batch processing of images, which is particularly useful for web developers and designers who need to resize or convert large numbers of images at once. |
|
|
|
| howdoi howdoi provides answers to your programming questions directly in the terminal. This command-line tool is particularly useful since you don’t have to leave the CLI or open your web browser to get immediate access to programming knowledge. | Taskwarrior Taskwarrior manages your to-do list right from the command line. It also includes a variety of reports and filters that allow you to view your tasks in different ways, like by project, due date, or priority. | GitHub CLI GitHub CLI provides a streamlined and efficient way to manage GitHub projects and workflows directly from the command line. You can perform a range of tasks, like managing pull requests, viewing and responding to issues and comments, and reviewing code changes. You can also use it to access GitHub Actions and other features on GitHub without exiting your terminal. |
The takeaway: the CLI rewards practice. Start with the basics, then experiment with different options and parameters to see what they do. Two reference resources worth bookmarking are tldr for simplified man pages and Explainshell for breaking down what a command does piece by piece.
Building a Deeper Toolkit
Your shell needs will evolve alongside your projects. The awesome-cli-apps repository aggregates a broad list of community-curated command line applications that developers actively recommend, making it a useful starting point when you want to expand beyond the basics.
Coming Down the Pipeline
GitHub is preparing a technical preview of GitHub Copilot for CLI. The tool is designed to translate natural language prompts directly into terminal commands, addressing the common pain point of knowing what you want to accomplish but not remembering the exact syntax. Sign-ups for the waitlist are open.



