QR CookingNotes

CookingNotes

Your Personal Recipe Book

Get it on Google Play
QR FiNoteMe

FiNoteMe

Smart Finance Tracker

Get it on Google Play
linuxserver • If you're new to Linux, you might run into confusing errors like “command not found,” “permission denied,” or “disk full.” Don’t worry—these issues happen to everyone, even experienced developers. This beginner-friendly guide walks you through the most common Linux problems and shows you how to fix them step-by-step.

10 Common Linux Problems and How to Fix Them (Beginner-Friendly Guide)

5 Min Read Verified Content

Linux is amazing—fast, powerful, stable—but let's be honest:
sometimes it throws errors that look like they came straight from The Matrix.

If you’re new to Linux (or feel like a “dummy”), this guide is perfect for you.
We’ll go through real problems, explain why they happen, and show exact steps to fix them in a friendly and relaxed way.

Let’s get into it.



1. “Command Not Found”

Why This Happens

Linux simply can’t find the command you typed. Usually because:

  • The program isn’t installed

  • You misspelled the command

  • The file isn’t in your PATH

How to Fix It (Step-by-Step)

Step 1: Check if you typed it correctly

A single typo causes this 90% of the time.

python3 --version


Step 2: Install the command if it doesn’t exist

Ubuntu / Debian:

sudo apt install python3

CentOS / Fedora:

sudo dnf install python3


Step 3: If the program exists but cannot run, add it to PATH

export PATH=$PATH:/your/program/path

Make it permanent:

echo 'export PATH=$PATH:/your/program/path' >> ~/.bashrc


2. “Permission Denied”

Why This Happens

Linux protects files and directories with strict permissions.
You’re trying to:

  • Run a script without “execute” permission

  • Open a file that belongs to another user

  • Access something that requires admin rights

Fix It Step-by-Step

Step 1: Allow the script to run

chmod +x script.sh

Step 2: Use sudo when the command needs root access

sudo systemctl restart apache2

Step 3: Fix file ownership if needed

sudo chown youruser:youruser filename


3. Package Manager Errors (APT, DNF, etc.)

Common Errors

  • Unable to locate package

  • Repository not found

  • Dpkg interrupted

  • Failed to lock dpkg

Fix It Step-by-Step

Step 1: Update package lists

sudo apt update

Step 2: Fix broken installs

sudo apt --fix-broken install

Step 3: If dpkg is locked

sudo rm /var/lib/dpkg/lock-frontend sudo dpkg --configure -a


4. “Disk Full” Even Though It Looks Empty

Why It Happens

Logs, caches, temporary files, or old kernels can quietly fill your storage.

Fix It Step-by-Step

Step 1: Check your disk

df -h

Step 2: Clean the APT cache

sudo apt clean

Step 3: Remove old kernels

sudo apt autoremove --purge

Step 4: Find the biggest folders

du -sh /*


5. Internet Not Working (DNS Failures)

Why It Happens

Your DNS resolver isn’t working, or the network service crashed.

Fix It Step-by-Step

Step 1: Check if your network interface is up

ip a

Step 2: Restart the network service

sudo systemctl restart NetworkManager


Step 3: Test DNS

ping google.com

If IP works but domain doesn’t:

ping 8.8.8.8


Step 4: Fix /etc/resolv.conf

sudo nano /etc/resolv.conf

Add:

nameserver 8.8.8.8


6. “Port Already in Use”

Why It Happens

Another program is already using the port you want.

Fix It Step-by-Step

Step 1: Find which process uses the port

sudo lsof -i :3000


Step 2: Stop or kill it

sudo kill -9 PID


Step 3: Or restart the service

sudo systemctl restart nginx


7. Filesystem Becomes Read-Only

Why It Happens

Linux detects a disk error and protects your data by switching to read-only mode.


Fix It Step-by-Step


Step 1: Remount the system

sudo mount -o remount,rw /


Step 2: Force a filesystem check on next boot

sudo touch /forcefsck sudo reboot


8. SSH Errors (“Permission Denied” or “Timed Out”)

Why It Happens

Permissions wrong, service down, or firewall blocking the port.


Fix It Step-by-Step

Step 1: Restart SSH

sudo systemctl restart ssh

Step 2: Fix SSH key permissions

chmod 600 ~/.ssh/id_rsa chmod 700 ~/.ssh

Step 3: Allow SSH in firewall

sudo ufw allow ssh


9. “No Space Left on Device” (Inodes Full)

Why It Happens

Too many tiny files fill up inode space.

Fix It Step-by-Step

Step 1: Check inode usage

df -i

Step 2: Find directory with too many files

sudo find / -xdev -type f | wc -l

Step 3: Delete unnecessary files (logs, temp, cache)

sudo rm -rf /var/log/*.gz


10. Frozen Linux System


Why It Happens

Heavy apps, GPU issues, or memory leaks.


Fix It Step-by-Step


Step 1: Open TTY

Press:

Ctrl + Alt + F2


Step 2: Kill heavy process

top kill -9 PID


Step 3: Reboot if needed

sudo reboot
Advertisement
Back to Linuxserver