Sams Teach Yourself Unix in 10 MinutesAbout the Author
Robert Shimonski is a well-known networking and security expert consulting out of the Long Island, New York area. Rob has authored over 30 books on information technology that include topics specializing in systems engineering with Unix and Microsoft technologies, as well as networking and security design with Check Point and Cisco technologies.
Rob has also deployed state-of-the-art technology in hundreds of companies worldwidejust recently designing and implementing a global MPLS network spanning hundreds of sites. Rob was fortunate to have been able to keep up with his love for Unix by deploying Linux systems and freeware networking and security tools such as Ethereal, NMIS, and MRTG, to name a few.
Because of Rob's unique blend of Unix- and Linux-related real world experience, Rob has served as a technical editor and author on countless Unix- and Linux- related articles and books. Rob was also the networking and security expert chosen to help develop and design LinuxWorld Magazine. You can view LinuxWorld Magazine at http://www.linuxworld.com. To learn more about Roberts's book projects, please visit him at http://www.rsnetworks.net.
© Copyright Pearson Education. All rights reserved.
IntroductionIntroduction
Welcome to Sams Teach Yourself Unix in 10 Minutes
Welcome to Sams Teach Yourself Unix in 10 Minutes. If you are new to Unix or just want to learn more about it, you have undoubtedly chosen the perfect companion for your journey. Whatever your reasons were for picking up this book, you will be glad that you did, because it is filled with useful information to help you learn Unix. This book's mission is to ensure that you walk away with a fundamental understanding of Unix, how to navigate and use it, and how to become more productive with it. Another goal of this book is to show you other avenues for gathering information that will help you continue your education beyond the lessons herein.
Unix Overview
Because of growing market share from companies such as Red Hat, Sun, IBM, and Novell, it's no wonder that Unix is becoming more and more of a household name. Unix (and Linux, which is Linus Torvald's version of Unix) is now found in most firewall and Web-server-based systems as well as all the way to the desktop for end user productivity and development. Unix has deep roots in the computer industry. First surfacing in universities and the military, it began to grow more and more in use with the massive development and expansion of the Internet. Once Linux was released, the landscape of Unix changed forever. Now, Linux (an easier to use version of the Unix operating system) and Unix are both found almost everywhere you look, and to ignore them is simply impossible.
Some common versions of Unix (called distributions, or distros for short) you may have heard of are Sun Solaris, IBM AIX, FreeBSD, Red Hat Linux, SuSE Linux (also known as Novell SUSE), and SCO ACE. Although these versions of the Unix operating system have differences, they all share the same thing: a basic Unix kernel that can be openly worked on and developed by anyone with the knowledge to do so. In this book, we will focus on the similarities between all versions of Unix so that you can use any one of them and still be productive.
Unix is a very powerful multitasking operating system. Multitasking refers to performing multiple tasks at once; in this context, it more specifically means that a user can run multiple programs simultaneously within one single logon of the system. Unix is also a multiuser operating system. What this means is that many users can simultaneously (and securely) use the same machine. In addition, Unix is open source software, which means that users are free to look at and modify its code. This is not the case with proprietary versions of Unix, but most versions are open source, so unless you are working with a specific vendor that does not allow its version of Unix to be altered, it's safe to assume that most versions (especially Linux versions) can be modified. Another powerful tool to unleash with Unix is the power of coding and scripting. Entire user communities work with and help develop Unix programs, and this is what keeps the system growing, developing, and getting better each and every year. This is not commonly seen with other proprietary operating system platform vendors such as Microsoft. Most of these vendors release closed source systems, which means you cannot freely write code that works blindly with these systems.
There is much more to learn about Unix. You are encouraged to find out more about its history and origins on the Web; this way, we can focus more written pages on teaching you how to use Unix. (At the end of this book, however, there is a reference section that will help you locate additional information on Unix, its history, and where it is going in the future.) So, now that you know that Unix is rapidly growing in use, let's take a second to understand why this book is so important, how this book should be used, how this book is organized, and how you will learn Unix productively.
Versions of Unix
Before we get too involved in this book, there is one thing that needs to be made clear: There are many versions of Unix, also called flavors or distros (short for distributions). In this book, all versions will be referenced as "Unix" unless there is something specific that needs to be said about a certain version or distribution. Since Unix, Linux, and all its cousins are so similar, they are said to be in the same family, but as you know, people in your family don't all look or act the same, do they? Nonetheless, you can think of Unix as a family of sorts, one with a great heritage, many grandparents, and plenty of recorded history to laugh about.
This book (just like the first edition) has been written to be as general as possible and to not favor any one vendor or implementation. This way, you can learn in the least confusing way possible; after all, the more complications you are exposed to while learning, the more your learning progress is hindered. Again, in this book, Unix is Unix unless otherwise noted.
Note - If something in an example doesn't work on your system, don't be alarmedcheck the online manuals or ask other users of your machine. Different versions of Unix sometimes have slightly different versions of commandsit will be worth your time to learn how things work on your system as well as how things work on other distributions of Unix.
Teach Yourself Unix in 10 Minutes
In each 10-minute lesson, you are given a small amount of material to master. In most cases, the material in each lesson builds on that presented in the previous lesson, so although you can jump around between lessons, you will be best served to start the book at the beginning and move through it in order. You can come back and forth as you master each lesson, in case you forget a command or how to do something.
This book is divided into seven parts. Part I, "Learning the Unix Environment: Baby Steps," covers logging in to a Unix (or Linux) system so you can begin to learn Unix. You will learn how to get into Unix (and Linux) so that you can work within it. Part I also shows you the essentials of how to help yourself, which is important when using any new system. Learning how to find and use documentation is one of the keys to survival when it comes to learning Unix. Part II, "Navigating the Unix File System," covers the file system, how to navigate it, and so on. Part III, "File System Utilities," explains how to manipulate and work with files as well as how to use some of the tools that come with the system to edit, archive, and compress files. Part IV, "Working with the Shell," covers working with the shell and how to use scripts. Although you won't become a master of shell scripting overnight, you will start to see how powerful Unix can be if you know how to work with it. Part V, "Environment Customization," covers user utilities as well as how to modify your environment. Part VI, "Networking and Communications," is new to the second edition of this book; you will learn how to print with Unix as well as how to set up basic networking and security. Part VII, "Tips and Tricks," covers advanced topics and some Linux so that you can work within Linux (since it's easier to get and use) and learn Unix in the convenience of your home or anywhere else you may want to put a new Linux- or Unix-based system.
How Do You Use Unix?
Unless you're simply using a Unix machine as a platform for a prepackaged commercial application, most of your interaction with Unix is likely to be textual commands typed at a command-line prompt. Most implementations of Unix do provide a graphical user interface (GUI); however, even when running the GUI, much of what you are likely to do involves typing commands into terminal windows that are available in the GUI. We will be covering both in this book, because some versions of Unix install graphically as well as allow you to initially log in to the system graphically. This being said, it is imperative to learn the fundamentals of both methods if you are to progress past the login portion of this book presen...