DEV Community

Alberto Barrago
Alberto Barrago

Posted on

15 Terminal Commands Every Developer Should Actually Use

Whether you're deploying code, debugging tricky issues, or managing your project files, mastering these terminal commands will boost your speed and efficiency.


1. scp — Secure Copy

Copy files and folders between your local machine and a remote server over SSH.

# Copy a file to remote
scp ./app.tar.gz user@remote:/var/www/

# Copy a directory recursively
scp -r ./project user@remote:/home/user/
Enter fullscreen mode Exit fullscreen mode

2. tar — Archive and Extract

Create or extract .tar.gz compressed archives.

# Create an archive
tar -czvf archive.tar.gz ./folder

# Extract an archive
tar -xzvf archive.tar.gz
Enter fullscreen mode Exit fullscreen mode

3. rm — Remove Files or Directories

Use carefully, especially with -rf.

# Remove a file
rm file.txt

# Remove a directory recursively
rm -rf ./build
Enter fullscreen mode Exit fullscreen mode

4. cp, mv — Copy and Move

Move or duplicate files and folders.

cp file.js ./backup/
mv draft.md ./articles/
Enter fullscreen mode Exit fullscreen mode

5. grep — Search Within Files

Search through text using patterns.

# Find TODOs in the codebase
grep -r "TODO" ./src
Enter fullscreen mode Exit fullscreen mode

6. chmod, chown — Permissions and Ownership

Control access and file ownership.

chmod +x script.sh           # Make a script executable
chown user:group file.txt    # Change file owner and group
Enter fullscreen mode Exit fullscreen mode

7. curl — API and Web Requests

Interact with web services from the terminal.

curl https://api.github.com/users/yourusername
curl -X POST -d '{"name":"dev"}' https://example.com/api
Enter fullscreen mode Exit fullscreen mode

8. ping, traceroute — Network Troubleshooting

Diagnose network issues.

ping google.com
traceroute github.com
Enter fullscreen mode Exit fullscreen mode

9. ssh — Remote Server Access

Login and work on remote machines securely.

ssh [email protected]
Enter fullscreen mode Exit fullscreen mode

10. top, htop — Monitor System Resources

Check running processes and memory usage.

top    # Built-in system monitor
htop   # Enhanced version (requires install)
Enter fullscreen mode Exit fullscreen mode

11. apt, brew — Install Packages

Install development tools or libraries.

# Debian, Ubuntu
sudo apt install git

# macOS with Homebrew
brew install node
Enter fullscreen mode Exit fullscreen mode

12. make — Run Defined Tasks (When Available)

Automate build, test, or install processes.

make test
make build
Enter fullscreen mode Exit fullscreen mode

⚠️ make only works if a Makefile exists in the project. Common in C/C++, DevOps, and some Python or JS tools.


13. gpg — Encrypt and Decrypt Files

Keep sensitive data safe.

gpg -c secrets.txt        # Encrypt
gpg secrets.txt.gpg       # Decrypt
Enter fullscreen mode Exit fullscreen mode

14. find — Locate Files

Search files by name or type.

find . -name "*.log"
Enter fullscreen mode Exit fullscreen mode

15. xargs — Run Commands on Input Lists

Useful for batch processing from files or piped input.

cat files.txt | xargs rm  # Delete all files listed in files.txt
Enter fullscreen mode Exit fullscreen mode

Final Tip

Mastering these commands won't just save you time, they'll also make you feel more at home in your terminal—whether you're shipping code to production or just exploring a new repo.

Feel free to bookmark this list or share it with a teammate who's still googling how to scp every time 😄

ps. I use Ghostty after many years of iterm2.


Learn More

Want to level up even further? Check out explainshell.com, it breaks down shell commands line-by-line so you can understand what each part does. I love IT!

Top comments (2)

Collapse
 
dotallio profile image
Dotallio

Love seeing xargs and grep get their shoutout - couldn't live without them. Is there one command you reach for daily that didn't make your list?

Collapse
 
albz profile image
Alberto Barrago

Oh, that's a tough one, 'cause there are so many commands you just can't live without! But if I had to pick just one I use constantly and that often gets overlooked 'cause it's so simple, I'd have to say cd. I mean, you literally can't do anything in the terminal without changing directories😅