Back to Blog

Useful Linux Commands Every Developer Should Know

A collection of Linux commands I use daily for development, navigation, file management, and troubleshooting.

February 2, 20263 min read
#linux#terminal#productivity

Whether you're using a full Linux installation, WSL, or managing remote servers over SSH, knowing a handful of terminal commands can make your workflow much faster.

These are some of the commands I use regularly.

1. Check Your Current Directory

BASH
pwd

Prints the absolute path of your current working directory.

Example:

TEXT
/home/ghost/projects/portfolio

2. List Files

BASH
ls

Useful options:

BASH
ls -l

Shows detailed information.

BASH
ls -la

Shows hidden files as well.


3. Change Directory

BASH
cd Documents

Go back one directory:

BASH
cd ..

Go to your home directory:

BASH
cd ~

4. Create Files and Folders

Create a folder:

BASH
mkdir projects

Create a file:

BASH
touch notes.txt

5. Copy Files

BASH
cp file.txt backup.txt

Copy an entire directory:

BASH
cp -r portfolio backup

6. Move or Rename Files

Rename a file:

BASH
mv old.txt new.txt

Move a file:

BASH
mv notes.txt Documents/

7. Remove Files

Delete a file:

BASH
rm file.txt

Delete a folder:

BASH
rm -r folder

⚠️ Be careful with:

BASH
rm -rf

This permanently deletes files without asking for confirmation.


8. Find Files

BASH
find . -name "*.tsx"

Searches for every .tsx file in the current directory and its subdirectories.


9. Search Inside Files

BASH
grep "Next.js" README.md

Useful for finding specific text inside files.

Recursive search:

BASH
grep -R "TODO" .

10. Monitor Running Processes

BASH
top

Or the more modern alternative:

BASH
htop

Install htop on Ubuntu:

BASH
sudo apt install htop

11. Check Disk Usage

BASH
df -h

Shows available disk space in a human-readable format.


12. Check Folder Size

BASH
du -sh .

Useful when trying to locate large directories.


13. Download Files

BASH
wget https://example.com/file.zip

Or:

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

14. SSH Into Another Machine

BASH
ssh username@192.168.1.10

One of the most common commands for server administration.


15. Update Ubuntu

BASH
sudo apt update
sudo apt upgrade

Keeps your packages up to date.


Final Thoughts

Learning Linux doesn't happen overnight.

Instead of memorizing hundreds of commands, focus on the ones you use every day. Over time they'll become second nature and dramatically improve your productivity.

If you're just getting started, WSL is a great way to learn Linux without leaving Windows.