CLI Tools Every Developer Should Know

The command line is a developer’s superpower. Mastering these tools will make you faster, more productive, and able to solve problems that GUIs can’t. Here are the essential CLI tools, what they do, and why you should know them:


  1. grep – Searches for matching text in files using powerful patterns (regex-friendly).

    • Example: grep 'TODO' *.js finds all TODOs in JavaScript files.
    • Why: Quickly search codebases, logs, or config files for patterns.
  2. curl – Sends HTTP requests from the terminal - great for testing APIs.

    • Example: curl https://api.github.com/users/octocat
    • Why: Test endpoints, download files, or automate web tasks.
  3. jq – Parses and manipulates JSON data in a clean, scriptable way.

    • Example: curl ... | jq '.name'
    • Why: Makes working with JSON APIs in shell scripts easy.
  4. sed – Stream editor for text replacement and transformation in files.

    • Example: sed 's/foo/bar/g' file.txt
    • Why: Automate find/replace and text processing tasks.
  5. awk – Pattern scanning and text processing language, great for column-based data.

    • Example: awk '{print $2}' file.txt prints the second column.
    • Why: Summarize logs, parse CSVs, or generate reports.
  6. htop – Interactive process monitor (like top, but prettier and more useful).

    • Example: htop
    • Why: Visualize CPU/memory usage, kill processes, sort by resource.
  7. lsof – Lists open files - useful to see which process is locking a port or file.

    • Example: lsof -i :8080 shows what is using port 8080.
    • Why: Debug port conflicts, file locks, or resource leaks.
  8. netstat / ss – Shows network connections, ports in use, and routing tables.

    • Example: netstat -tulnp or ss -tulnp
    • Why: Diagnose network issues, see what services are listening.
  9. dig – DNS lookup tool to troubleshoot domain resolution issues.

    • Example: dig google.com
    • Why: Check DNS records, debug domain problems.
  10. nc (netcat) – Swiss army knife for networking - port scanning, listening, chatting over sockets.

    • Example: nc -l 1234 to listen on port 1234.
    • Why: Test network connectivity, transfer files, debug services.
  11. tmux – Terminal multiplexer to run multiple sessions/panes in one terminal window.

    • Example: tmux new -s mysession
    • Why: Split your terminal, keep sessions alive, remote pair programming.
  12. tree – Displays directory structure in a tree-like format.

    • Example: tree -L 2
    • Why: Visualize project structure, find files quickly.
  13. watch – Repeats a command at intervals - great for live monitoring logs or metrics.

    • Example: watch -n 1 ls -l
    • Why: See changes in real time, monitor output.
  14. alias – Lets you create custom command shortcuts to speed up workflows.

    • Example: alias gs='git status'
    • Why: Save keystrokes, personalize your shell.
  15. fzf – Fuzzy finder for searching files, history, git branches, etc. lightning fast.

    • Example: fzf then start typing to filter.
    • Why: Instantly find files or commands without remembering full names.
  16. bat – A better cat with syntax highlighting and Git integration.

    • Example: bat file.txt
    • Why: Read code with colors, see git changes inline.
  17. rg (ripgrep) – Faster, smarter alternative to grep for codebases.

    • Example: rg 'function' src/
    • Why: Blazing fast recursive search for developers.
  18. fd – A simpler, blazing-fast replacement for find.

    • Example: fd main .
    • Why: Quickly locate files by name or pattern.
  19. exa – A modern replacement for ls with icons, colors, and Git-aware output.

    • Example: exa -l --git
    • Why: See file details and git status at a glance.
  20. gh – GitHub’s official CLI to manage issues, PRs, clones, and gists from terminal.

    • Example: gh pr create
    • Why: Automate GitHub workflows, never leave the terminal.
  21. docker – Manage containers, images, volumes, and networks - DevOps essential.

    • Example: docker ps
    • Why: Build, run, and debug containers locally.
  22. nmap – Network scanner to audit systems and discover open ports/services.

    • Example: nmap -sV localhost
    • Why: Security audits, network mapping, vulnerability checks.
  23. chmod / chown – Set file permissions and ownership, key for Linux systems.

    • Example: chmod +x script.sh or chown user:group file
    • Why: Control access, fix permission errors.
  24. scp / rsync – Copy files between systems over SSH (rsync adds smart diffing).

    • Example: scp file.txt user@host:/tmp/ or rsync -avz src/ dest/
    • Why: Move files securely, sync directories efficiently.
  25. man – The manual for any Linux command - man grep, man find, etc. is your first stop.

    • Example: man tar
    • Why: Learn options, see examples, become self-sufficient.

Why Mastering CLI Tools Matters

  • Speed: CLI tools are often faster than GUIs for repetitive or bulk tasks.
  • Automation: Easily script and automate workflows.
  • Remote Work: SSH into servers and manage them without a desktop.
  • Debugging: Many issues can only be solved from the terminal.
  • Portability: The same tools work on almost any Unix-like system.

Tips for Getting Better with CLI Tools

  • Practice using a few new tools each week.
  • Read the man pages (man toolname) for hidden features.
  • Create aliases for your most-used commands.
  • Use shell history and tab completion to speed up typing.
  • Explore dotfiles and open source configs for inspiration.

Summary

Learning these CLI tools will make you a more effective, independent, and resourceful developer. The command line is a timeless skill—invest in it, and you’ll reap the rewards throughout your career.