Categories
Linux Tutorial Series

Linux Tutorial Series – 195 – Fixing errors

Here is the video version, if you prefer it:

Fixing errors, also known as troubleshooting, is a process or removing errors from your bash script.

If you adhere to the rule which I laid out before, which was “Use single quotes to enclose values unless you have a concrete reason not to”, you will be fine most of the time. For the times when you are not fine, literally copy and paste the error message you’re getting into Google and you will get some suggestions.

There is a finely written piece on this in (Shotts, 2019)⁠, which again, let me remind you, is free on the World Wide Web, so go read it.

Thank you for reading!

References

Shotts, W. (2019). The Linux Command Line, Fifth Internet Edition. Retrieved from http://linuxcommand.org/tlcl.php. Pages 454-467

Categories
Linux Tutorial Series

Linux Tutorial Series – 54 – Handling errors on the command line

Here is the video version, if you prefer it:

Just wanted to write a short piece on how to handle errors related to commands on the command line. Here’s how:

When you get an error, Google the relevant keywords and look at the answers. This may seem obvious, but there is probably someone that already had the same (or similar) problem and you will take care of it by Googling.

Let’s say you get a “Permission denied” error when trying to run the rm command. Then you can Google:

“permission denied rm”

or something similar.

In my perspective, the goal is to understand Linux good enough to know what is going on so that you place the things you read on the Internet in their proper context (and not just blindly copy/paste commands and hope it works). When you have the idea how the puzzle pieces fit together, then you can Google for the specific things when the need arises.

Thank you for reading!