19 Linux Commands Every Developer Should Know

Published: (December 19, 2025 at 10:18 PM EST)
3 min read
Source: Dev.to

Source: Dev.to

Introduction

Linux is the backbone of modern software development. From cloud servers and CI/CD pipelines to containers and embedded systems, Linux is everywhere.

If you are a developer, mastering Linux commands is not optional—it is a productivity multiplier.

This article covers essential Linux commands every developer should know, with clear explanations and real‑world use cases.

ls – List Directory Contents

Displays files and directories.

ls
ls -l
ls -la

Why it matters: You constantly navigate project folders, logs, and configuration directories.

cd – Change Directory

Move between directories.

cd /var/www
cd ..
cd ~

Why it matters: Navigation speed directly impacts workflow efficiency.

pwd – Print Working Directory

Shows your current directory.

pwd

Why it matters: Prevents mistakes when running destructive commands in the wrong directory.

mkdir – Create Directories

Create one or multiple directories.

mkdir project
mkdir -p src/components

Why it matters: Project scaffolding and clean structure.

rm – Remove Files and Directories

Delete files or folders.

rm file.txt
rm -r folder
rm -rf folder

Why it matters: Used often, but dangerous. Always double‑check.

cp – Copy Files and Directories

cp file1 file2
cp -r src backup

Why it matters: Used in builds, backups, and deployments.

mv – Move or Rename Files

mv old.txt new.txt
mv file.txt /tmp

Why it matters: Renaming and restructuring projects.

cat – View File Content

Displays file content.

cat file.txt

Why it matters: Quick inspection of configs, logs, and scripts.

less – Read Large Files Safely

less logfile.log

Why it matters: Handles large files without freezing your terminal.

grep – Search Text

Search for patterns inside files.

grep "error" app.log
grep -R "TODO" .

Why it matters: Debugging, code reviews, and log analysis.

find – Locate Files

Search files by name, type, or size.

find . -name "*.js"
find /var -type f -size +100M

Why it matters: Finding lost files and cleaning disk space.

chmod – Change Permissions

chmod +x script.sh
chmod 644 config.txt

Why it matters: Critical for scripts, deployments, and security.

chown – Change File Owner

chown user:user file.txt

Why it matters: Essential when working with servers and Docker volumes.

ps – View Running Processes

ps aux

Why it matters: Identify stuck or resource‑heavy processes.

top – Monitor System Resources

top

Why it matters: Live CPU, memory, and process monitoring.

kill – Stop Processes

kill PID
kill -9 PID

Why it matters: Terminate frozen or misbehaving applications.

df – Disk Space Usage

df -h

Why it matters: Prevent production outages due to full disks.

du – Directory Size

du -sh *

Why it matters: Find out what is consuming disk space.

tar – Archive Files

tar -czvf project.tar.gz project/
tar -xzvf project.tar.gz

Why it matters: Backups, deployments, and file transfers.

Final Thoughts

You do not need to memorize every Linux command—but these commands form the foundation of daily development work.

If you can confidently use them, you will:

  • Work faster
  • Debug more effectively
  • Feel comfortable on any Linux server
  • Level up as a professional developer

Master the terminal, and the terminal will work for you.

Back to Blog

Related posts

Read more »

12 Days of Shell

Article URL: https://12days.cmdchallenge.com Comments URL: https://news.ycombinator.com/item?id=46190577 Points: 31 Comments: 8...