Troubleshooting
Common errors and fixes.
Every Linux user sees error messages, every single day. The trick is to actually read them. They almost always tell you what's wrong. Let's meet the most common ones, and their fixes.

- Everyone sees errors
- Read the message
- It tells you what's wrong
Four classic errors
Linux is case sensitive, so notes dot capital TXT doesn't exist. CD into a file says, not a directory. A script without the X says, permission denied. And RM on a folder says, is a directory. Each message names the exact problem.
cat notes.TXT cat: notes.TXT: No such file or directory cd Documents/cv.txt bash: cd: Documents/cv.txt: Not a directory ./deploy.sh bash: ./deploy.sh: Permission denied rm Music rm: cannot remove 'Music': Is a directory
Error, meaning, fix
Here's your quick guide. Command not found usually means a typo, or the program isn't installed. No such file means check the name, the case, and where you are, with PWD. Permission denied means check LS dash L, and maybe use CH mod, or sudo. And no space left means find the big files with DU.
| Error | Usually means | Try |
|---|---|---|
| command not found | typo, or not installed | check spelling, apt install |
| No such file or directory | wrong name, case, or folder | ls, pwd, Tab |
| Permission denied | not allowed | ls -l, chmod, sudo |
| Is a directory | it's a folder | rm -r, cd |
| No space left on device | disk full | df -h, du -sh * |
A calm routine
When something fails, stay calm, and follow a routine. Read the whole message, slowly. Check where you are, and who you are. Check the file exists, with LS. Look at the logs, if it's a service. And search the exact error message online. Someone has almost always had it before.
| key | value |
|---|---|
| Read | the whole message |
| Where and who | pwd, whoami |
| Check | ls -l, the logs |
| Search | the exact message |
Summary
Error messages tell you what's wrong, if you read them. Check the name, the case, where you are, and the permissions. Next, tricks that make you faster.
Key takeaways- Read the error
- pwd, ls -l
- Search the message