Linux Command Reference

Search everyday Linux and macOS terminal commands in plain words, such as find big files, see listening ports or follow a log, with examples and warnings for risky ones.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Search

    Type the task.

  2. 2
    Browse

    Pick a section such as Network or Text.

  3. 3
    Check warnings

    Read the careful column.

  4. 4
    Adapt the example

    Replace file names and patterns.

  5. 5
    Run

    Paste into your terminal.

  6. 6
    Save

    Download the CSV.

Informazioni su questo strumento

The terminal is the fastest way to work on servers and development machines, but the commands and their flags are easy to forget. This reference groups about sixty everyday commands by task: working with files, searching and transforming text, permissions, processes and services, networking, archives, system information, packages and shell techniques. Each entry shows a practical example rather than bare syntax, explains what it does, and warns about commands that delete or overwrite data without asking. Search in plain words, such as "large files", "ports", "replace text" or "follow log", or browse a section. It works for Linux and, for most commands, macOS. Download the list as CSV for your notes or onboarding documents.

Commands to treat with care

rm -rf deletes without confirmation and cannot be undone. sed -i edits files in place, so keep a backup or use -i.bak. kill -9 stops a process without letting it clean up. Redirecting with > overwrites a file; >> appends. These are flagged in the table.

Finding things

- find with -name, -size and -mtime finds files by name, size and age. - grep -rni searches text in many files with line numbers. - du -sh * | sort -h shows which folders take the space. - ss -tulpn shows which program listens on which port.

Pipes

Small commands combine through pipes: sort | uniq -c | sort -rn counts and ranks repeated lines; awk and cut pick columns; xargs turns lines into arguments. Learning a few of these replaces many one-off scripts.

Networking checks

ping and traceroute test reachability, dig shows DNS answers, curl -I shows a web server's headers and ss -tulpn lists listening ports with their programs. ssh -L forwards a remote port to your machine, handy for reaching a database that only listens on localhost.

Archives and transfers

tar -czf packs a folder into a compressed archive and tar -xzf unpacks it; rsync -avz copies only what changed, which makes repeated backups and deployments much faster than scp.

Services and logs

On systemd distributions, systemctl starts, stops and enables services and journalctl -u follows their logs.

Permissions and ownership

chmod changes who can read, write and run a file and chown changes its owner; our chmod calculator converts between 755 and rwxr-xr-x. sudo runs one command as the administrator, and sudo !! repeats the last command with sudo when you forgot it.

Packages

Debian and Ubuntu use apt, Fedora, RHEL and Rocky use dnf, and Alpine uses apk. Update the package lists before installing so you get current versions and security fixes.

macOS differences

macOS ships BSD versions of some tools: sed -i needs an empty argument (sed -i '' …), and some GNU flags differ. Homebrew's coreutils provides the GNU versions.

Limits

This is a practical subset, not a full manual; use man command for every option. Package commands differ between distributions. Run commands that change system files with care and preferably on a test machine first.

Esempio svolto

Searching "port" returns ss -tulpn to list listening ports and their programs, ssh -L for port forwarding and curl -I to check a web server's response headers.

In breve

Domande frequenti

Does it work on macOS?

Most commands do; some GNU flags differ on macOS, as noted.

How do I find what is using disk space?

du -sh * | sort -h in a folder, and df -h for whole disks.

How do I search text in many files?

grep -rni "text" . searches recursively with line numbers.

Which commands are dangerous?

Those flagged in the table, such as rm -rf and sed -i.

Can I export the list?

Yes, as CSV.

Is this a full manual?

No. Use man for every option of a command.

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue