AI Hints
Home›Linux Tutorial›Troubleshooting and Tricks
Linux · Lesson 115 of 120

Troubleshooting

Common errors and fixes.

⏱ 2 min read▶ Video at 2:34:06🎓 Free
Watch this lesson in the Linux courseWatch on YouTube ↗Full Linux course

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.

Troubleshooting
From the video: Troubleshooting
  • 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.

Terminal
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.

ErrorUsually meansTry
command not foundtypo, or not installedcheck spelling, apt install
No such file or directorywrong name, case, or folderls, pwd, Tab
Permission deniednot allowedls -l, chmod, sudo
Is a directoryit's a folderrm -r, cd
No space left on devicedisk fulldf -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.

keyvalue
Readthe whole message
Where and whopwd, whoami
Checkls -l, the logs
Searchthe 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
Next up: Productivity Tricks — work faster in the terminal