# The Command Line Guide

> Learn the command line: shells, essential Unix commands, file management, processes and Bash scripting, with a clear path through my tutorials.

Author: Flavio Copes | Published: 2026-07-14 | Canonical: https://flaviocopes.com/cli/

The command line is one of the highest-leverage skills you can learn as a developer. Every server, every deploy, every tool eventually brings you back to a terminal.

The good news: you don't need to memorize hundreds of commands. A small set covers almost everything you do day to day.

I've written a lot of command line tutorials over the years. This page organizes the best ones into a learning path.

## Where to start

If the terminal feels intimidating, start here:

1. [The Command Line for Complete Beginners](https://flaviocopes.com/cli-for-beginners/) is the gentle introduction
2. [Introduction to Linux](https://flaviocopes.com/linux-introduction/) gives you context on the system you're typing into
3. [Unix Shells Tutorial](https://flaviocopes.com/shells/) explains what a shell actually is
4. [The Bash shell](https://flaviocopes.com/bash/) covers the shell you'll find on almost every server
5. [The UNIX Filesystem Commands](https://flaviocopes.com/unix-filesystem/) teaches you to move around and manage files

## Essential commands

These are the commands I use every day. Learn them well:

- [ls](https://flaviocopes.com/linux-command-ls/) to list files
- [cd](https://flaviocopes.com/linux-command-cd/) to change directory
- [mkdir](https://flaviocopes.com/linux-command-mkdir/) to create folders
- [cp](https://flaviocopes.com/linux-command-cp/) to copy and [mv](https://flaviocopes.com/linux-command-mv/) to move
- [cat](https://flaviocopes.com/linux-command-cat/) and [less](https://flaviocopes.com/linux-command-less/) to view file content
- [find](https://flaviocopes.com/linux-command-find/) to locate files
- [grep](https://flaviocopes.com/linux-command-grep/) to search inside files
- [tail](https://flaviocopes.com/linux-command-tail/) to watch the end of a file, great for logs

## Processes and permissions

Sooner or later you'll need to manage what's running and who can access what:

- [ps](https://flaviocopes.com/linux-command-ps/) to list processes
- [top](https://flaviocopes.com/linux-command-top/) to monitor them live
- [kill](https://flaviocopes.com/linux-command-kill/) to stop a process
- [chmod](https://flaviocopes.com/linux-command-chmod/) to change file permissions
- [chown](https://flaviocopes.com/linux-command-chown/) to change file ownership
- [sudo](https://flaviocopes.com/linux-command-sudo/) to run commands as another user
- [How to find the process that is using a port](https://flaviocopes.com/command-using-port/) solves a classic problem

## Scripting and customization

Once you're comfortable, automate things and make the shell yours:

- [Introduction to Bash Shell Scripting](https://flaviocopes.com/bash-scripting/)
- [How to create a function in a Bash shell script](https://flaviocopes.com/shell-script-function/)
- [How to loop over an array in Bash](https://flaviocopes.com/bash-loop-array/)
- [How to set environment variables in bash and zsh](https://flaviocopes.com/shell-environment-variables/)
- [How to set an alias in a macOS or Linux shell](https://flaviocopes.com/how-to-set-alias-shell/)
- [crontab](https://flaviocopes.com/linux-command-crontab/) to schedule commands
- [The Fish Shell](https://flaviocopes.com/fish-shell/) is my favorite shell, worth a try

## Go deeper

I collected the most useful commands in the free [CLI Handbook](https://flaviocopes.com/ebooks/cli-commands-handbook/). It's a handy reference to keep around.

Every command line post is on the [cli tag page](https://flaviocopes.com/tags/cli/).
