Learn Linux The Hard Way (β version)
Down into the rabbit hole, diving straight in. Hello you, this is Linux:
Say hello to it. Click into this window and type hello, then press <ENTER>.
This is a simple guide written in “Learn X the hard way” style, author of which is Zed A. Shaw. The purpose of it is to give you some experience in working with Unix-like system. There are many good UNIX-Like systems out there, for example FreeBSD, OpenBSD, OpenSolaris and even MAC OS X, just to name a few. When deciding which system to use in this guide I chose Linux mainly because it is most popular UNIX-like server operating system, which means what you have much bigger chance encountering it in the wild in comparsion to other UNIX derivatives. And Linux-related skills are relatively easy transferable to other UNIX-likes.
Now I want to tell you about the details. You will encounter many detailed tables containing lists of many fields. You may think you do not need most of this information, but what I am trying to do here is to teach you the right way to approach all this scary data. And this right way is to interpret this data as mathematical formulas, where every single symbol has its meaning.
If you already have some experience with Linux you probably know a lot of commands, but do you know every field in those commands output? Let us take ls for example, which just lists all files in current directory.
user1@vm1:~$ ls -al total 32 drwxr-xr-x 2 user1 user1 4096 Jul 20 08:33 . drwxr-xr-x 4 root root 4096 Jul 2 06:19 .. -rw------- 1 user1 user1 4092 Jul 20 11:02 .bash_history -rw-r--r-- 1 user1 user1 220 Jul 2 06:19 .bash_logout -rw-r--r-- 1 user1 user1 3184 Jul 2 06:19 .bashrc -rw------- 1 user1 user1 295 Jul 2 11:34 .lesshst -rw-r--r-- 1 user1 user1 675 Jul 2 06:19 .profile -rw------- 1 user1 user1 1222 Jul 20 08:33 .viminfo
Do you know what everything here means? total at the top, d in drwxr-xr-x, numbers in the second column, numbers in the third column, what date means, what those dots . and .. are and where there are they stored?
Or you just shrug it off, thinks something like Ok, this is list of files, that is all I need right now, and all those additional fields do not matter? I think I know that the date is just modification date, and . and .. are just synonyms for this and parent directory, but I do not need other data, my brain is overflowed already. This approach is okay if all you want to do is to surf the internet, but if you want to understand your system, this will not work. The thing is, UNIX is very logical, and by teaching yourself about what data there is you will also understand how the system works, all those nitty-gritty details about running programs, storing and accessing data and interconnecting via the network.
The bottom line is, know your stuff. Pay attention to details. Understand that every piece of data on the screen has its meaning, and is called a field for a reason and do not dismiss something because finding what it does is hard. But do not go to the other extreme, then you become obsessed with all those little details and will not be able to see the big picture. If something does not make sense now and you already spent a decent amount of time researching it, sometimes it is better to write this down somewhere and return to this later, or just ask a guy who knows it, but try to understand what it does on your own first. Chances are, if you were studying even a little in the time being, you will understand that one hard part much easier.
To sum up my point about attention to details and knowing your stuff I will insert a picture about it here:
KNOW YOUR STUFF.
DO. NOT. BE. LIKE. THIS.
A little about purpose of this guide. This is sink-or-swim type of thing, the main point being is to familiarize yourself with Linux environment and lots and lots of concepts and commands. Actually, not just familiarize, but memorize! Yes, you will need to memorize stuff. Yes, it means that you must remember something to be able to recall it from your own memory at a later time. Yes, this is hard. Yes, you will need to do it by making yourself bunch cards with term on one side and explanation on another, and do this memorization before going to sleep each day. Yes, you need to make those cards yourself (only write things on them though, do not try to make paper). And yes, in the and it will pay off for you, the light will switch on in your head and it will be like Bam! I now understand this!!
Finally, if you do not understand something, ask questions right away. There is a comment section at the bottom of each exercise just for this. Or you can write me to sistemshik at yahoo.com.
- Aspiring system administrators who are interested in UNIX-like systems.
- Programmers, because a good programmer should know now to manage the system he is programming for.
- People who want to try something new and to understand what this “UNIX way” is all about.
- Familiarity with command line interface is recommended. You can get familiar with it by completing The Command Line Crash Course by Zed A. Shaw.
- Basic knowledge about operating systems in general will be a plus.
- Basic knowledge about networking will be a plus.
How to work with this guide
- Read introduction for each exercise. You may skip hard parts and return to them later.
- Type in exactly what is shown. No copy-paste is allowed.
- Compare your output with “What you should see” section.
- Read the explanation.
- Do the extra credit. Here you may skip hard parts and return to them later as well.
- Read manuals for commands you type. Reading descriptions will suffice.
- Do not rush! If you will try to complete this guide at once, it will not do you any good. One exercise a day is a perfectly reasonable pace.
To complete this tasks you need the following setup
- A computer with Internet connection.
- A bit of spare time.
If I may be permitted ...
As this is a project on which I work in my spare time, if you will find my effort useful I ask you to show your appreciation by donating whatever amount of money you wish. If you will decide to support me, I will write more tutorials like this one.