S&PF – Learning the Unix OS (O’Reilly)

Learning the Unix OS book cover

Learning the Unix Operating System, 5th Edition

Jerry Peek, Grace Todino & John Strang ( O’Reilly, 2002 )

O’Reilly’s Learning the Unix OS is now over 20 years old, but it still remains incredibly relevant. Ballparking it ~90% of the material is useful to us and the remaining 10% can be treated as a Unix history lesson.

This excerpt summarizes things well

This book teaches basic system utility commands to get you started with Unix… We cover a commands most useful features…


We take our second step into Linux with O’Reilly’s Learning the Unix OS / Lab-Book Page

It is a 7-day commitment if you dedicate between 2-3 hours each day to read through the book. You can treat the book as a Practical Guide to Unix. Don’t let the title fool you, much of what we learn about Unix, specifically the command line can be carried over to Linux. We will be covering the essentials of the CLI and the Unix OS, making daily use of Linux even easier.

A Simple Question

Before you begin reading the book, I want you to ask yourself a simple question.
Why should we use Linux?
That’s the first question I asked myself before I even opened the book, because I wanted to really think about what I was doing. What was the point in going through all of this?

Reasons to Use Linux

  • The FOSS nature of the OS allows groups to have a very powerful tool. Making it a great choice for smaller teams or groups without much money.
  • Linux is also capable of running on everything, from the weakest hardware to the most powerful, although its best potential can be extracted on more powerful systems.

A very basic and uninspired answer I’ll admit, but I think those are great enough reasons on their own. As we learn more and more about technology, as we go from inexperienced amateurs to true masters, this list of reasons will grow. We’ll start to see the pros and cons of the OS, come to love it or hate it, but ultimately, understand it.

I mention this because the point of this learning journey is to go from someone who sees technology as a magic black box to someone who understands and can wield it effectively. So. Always aim to keep the big picture in the back of your mind.

Book Overview

Going off my statement in the intro section of this blog you can already tell that I have a lot of praise for this book. A lot of that lies in its brevity and conciseness. You’re given exactly what you need and a little more, enough that you can go out and do further research on your own.

Chapter 1 felt great to go through, coming right off the Linux Upskill Challenge. It was a nice review of commands we’ve already covered like ps $$, who, whoami, and ls. But I was pleasantly surprised to learn about control characters. We also go through the history of bash which is an improved version of the original shell. I found that I gained the most value when we covered the section on processes.

Chapter 2 gives a look at window systems. And this is really where the Unix OS differentiates itself from the Upskill Challenge, that’s because we start covering window systems. Believe it or not, this chapter blew my mind away! That’s because window systems such as X are a layer for GUI’s whereas things like gnome, KDE plasma, etc. are window managers built on top of these systems. And these window managers can give a completely different feel to your environment.
Another important option worth mentioning is the command & option. Which allows us to start programs and put them in the background. Trust me when I say this, I use this command a lot in my scripts and daily life, an absolute essential.

Chapter 3 goes over daily task use. We cover files, the home and working directory, networked file systems. Absolute vs. Relative paths, and file permissions, all standard daily use. Remember, root always starts with a slash ( / ).

Chapter 4, where we go over File Management. Go through any textbook or serious material that covers Linux and you will see one of the biggest ideas in Linux.

“In Linux everything can be viewed as a file, in essence Directories are simply a special type of file.”

From there we move onto covering the primary wildcards, and the big 3 text editors. Vim, Emacs and Pico. Seeing as we’ve recently gone through the Linux Upskill Challenge, I would hope that my readers are no longer scared of vim.

Chapter 5 is all about Input / Output redirection. Nothing we haven’t done before; I’m not placing it here since the blog posts are more of a write-up on my thoughts and experiences. The Lab-Book does have a list of the useful flags you’d want to use for the usual I/O operations  [ > , >> , < , | , grep ]. Following that we cover the ever-important pager programs [ less, more, pg ] to summarize this chapter; pager programs and filter operators are a powerful tool that allow us to sift through loads of information fast and efficiently.

Chapter 6 is a particularly strong chapter. We begin by covering how to remotely access computers. Going over classics like telnet, rlogin, rsh and finally ssh. Truthfully, I knew about telnet and ssh but rlogin and rsh really threw me off. I think the craziest thing I found out was that you can open windows through remote connections also known as Xforwarding. After that we were introduced to CLI browsers, which was just fun to play with, imagine browsing websites through your damn terminal! Even thinking about it again makes me giddy, I think it’s just neat.

Then the real meat of Chapter 6 is the CLI tools to transfer files between systems. Where we cover some pretty important network protocols. scp/rcp/ftp, and some useful commands to go with it.
I mentioned 10% is a history lesson, well, here is the 10%. We go through sending E-mail through the shell prompt, Usenet, talk and IRC. I have always heard them mentioned before so seeing the reasoning and story behind them was very interesting.

Chapter 7, Multitasking. It was cool to get a very small pinch of some computer science. Although CS is still very far away in our roadmap, we’ll get there eventually! The main thing to keep note of is that UNIX can do many jobs at once. The OS divides the processors’ time between tasks quickly so it looks like everything is running at the same time. From there we learn some useful processor terms like PID, TTY, TIME, CMD.

Chapter 8 – Where to go from here?

At last, we arrive at the end of the book. What to do after reading through Learning the Unix OS? Well, if you’re following my roadmap, that’s pretty simple. Keep moving forward! But… you’re always free to go down any path you’d like. For me… the next step is the “Linux Journey.” Our final introductory Linux course, you may find it overkill to do three intros to Linux courses, but I think that just shows how vast this world is. No single course or book could ever hope to cover all the basics. Look forward to what comes after though, because we’ll finally start learning about scripting and much more.


Project 2 – Your first Wargame -> Over The Wire: Bandit

A screenshot snippet of Bandit from OverTheWire

Our second project will be a wargame.
Now some of you may have heard of CTFs, and wargames are related. So let us define both.

What is a wargame?
A wargame is a cyber-security challenge where competitors must exploit or defend a vulnerability in a system or application to gain or prevent access to a computer system. A wargame IS NOT time-limited.

What is a CTF?
CTFs are exercises where participants try to find strings, called “flags” which are hidden inside purposefully vulnerable programs or websites. A CTF IS time-limited.

My experience
Bandit was fun! A lot of Fun! It’s easy to get bored or frustrated with learning because of how much material you end up pouring through and bandit was a great breather. I found myself becoming more and more immersed in it as I kept playing through it. I kept track of how much time I spent on it every day. I started with just 20 minutes, then I started doing 40 minutes, until I kept going at it in 2 hr. intervals. Before finally pulling an all-nighter and finishing it in a 5-hour session. It took me about 13 hours to finish the whole wargame.

I was always a bit hesitant to read man pages, but for bandit I found myself pushing my mind to its limit trying to find the right commands to break through to the next level. I started reading through the man documentation for the listed commands. I would go through various tech articles on networking concepts, TCP/IP, ssh, YouTube and more. It was very immersive, and now, I’m much more ok with opening man pages to get a better feel for commands.

You can view bandit as the ultimate introductory Linux lab. You’ll end up learning new flags for commands you run daily. You’ll get a better grasp on user and file permissions, go over networking topics, cover data encoding, compression and decompression. You’ll learn about git; shell behavior and you’ll be forced to read the man pages.

Closing Thoughts

Going through this 20-year-old was an enlightening experience. Linux has changed immensely over the years yet at the same time, a lot of things are still the same. I got a feel for using the window systems in Linux, how to start, stop, freeze programs. Play with GUI’s, CLI web browsers, learned about the history of IRC.

The book promised to give you enough Unix knowledge to start daily driving any Unix based OS and it most certainly delivered.

What’s Next?

Next up is “Linux Journey“, where we will be finishing up our introduction to Linux. Even though we should be comfortable with the Linux CLI there are still some important topics that warrant a lookover. Primarily, the different Init Systems, processes and networking.

Fundamentals Roadmap.sh | Learning the Unix OS O’Reilly Lab-Book | Linux Journey Lab-Book

Leave a Reply