🐧 20 Most Used Linux Commands Every Developer Should Know



This content originally appeared on DEV Community and was authored by Farhad Rahimi Klie

Whether you’re a backend engineer, DevOps developer, system administrator, or just someone trying to master the terminal, understanding Linux commands is essential.
These 20 commands are the core tools you will use daily across development, automation, and server management.

Let’s dive in! 🚀

1. pwd β€” Print Working Directory

Shows the absolute path of your current directory.

pwd

2. ls β€” List Files

Lists files and directories.

ls
ls -l        # long format
ls -a        # show hidden files
ls -lh       # human-readable sizes

3. cd β€” Change Directory

Navigate between directories.

cd /path/to/folder
cd ~      # go to home directory
cd ..     # go back one directory

4. mkdir β€” Make Directories

Create new folders.

mkdir project
mkdir -p parent/child/grandchild

5. rm β€” Remove Files/Folders

Delete files or directories.

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

⚠ Use -rf with caution!

6. cp β€” Copy Files/Folders

Copy files or folders.

cp file.txt backup.txt
cp -r project/ project_backup/

7. mv β€” Move/Rename Files

Move or rename items.

mv a.txt b.txt
mv file.txt /other/location/

8. touch β€” Create Empty Files

Create new empty files.

touch index.html

9. cat β€” View File Content

Prints file contents.

cat file.txt

10. less β€” View Large Files

Scroll file content interactively.

less biglog.log

11. head & tail β€” View File Start/End

View the beginning or end of files.

head -n 20 file.txt
tail -n 20 file.txt
tail -f app.log   # follow live logs

12. grep β€” Search Text

Search inside files or output.

grep "error" file.log
grep -R "TODO" src/

13. find β€” Search Files in System

Find files based on name, type, etc.

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

14. chmod β€” Change Permissions

Modify file permissions.

chmod +x script.sh
chmod 755 program

15. chown β€” Change Ownership

Change file owner and group.

sudo chown user:group file.txt

16. ps β€” Show Running Processes

Monitor currently running processes.

ps
ps aux | grep python

17. top / htop β€” System Monitor

Real-time process and resource usage.

top
htop   # if installed, nicer UI

18. kill β€” Terminate Processes

Kill a process by PID.

kill 1234
kill -9 5678    # force kill

19. df β€” Disk Usage

Check disk space.

df -h

20. du β€” Directory Size

Check folder sizes.

du -h
du -sh *     # show size of each file/folder

🧠 Bonus: Essential Power Commands

Update packages

sudo apt update && sudo apt upgrade

Download from internet

wget https://example.com/file.zip
curl -O https://example.com/file.zip

Edit files

nano file.txt
vim file.txt

🚀 Final Thoughts

Mastering these 20 Linux commands will massively boost your productivity as a developer. They are the foundation for:

  • server administration
  • DevOps work
  • shell scripting
  • backend deployment
  • debugging
  • automation


This content originally appeared on DEV Community and was authored by Farhad Rahimi Klie