1 Overview of UNIX and Linux In This Chapter A Short History of UNIX and Linux Similarities and Differences UNIX/Linux Systems Command-line Interfaces versus Graphical Interfaces Why UNIX or Linux? Summary Exercises T his chapter provides a brief background of UNIX® and Linux®, and explains the motivation behind the contents of the rest of the book. Beginning with a brief description of the common UNIX and Linux systems, you will learn why these systems are important as compared to non-UNIX and non-Linux oper- ating systems. The chapter concludes with an explanation of graphical and non- graphical interfaces and environments. A SHORT HISTORY OF UNIX AND LINUX In the early 1960s, the first computing operating systems were designed to allow only a single user to run one program at a time. This meant that the computing sys- tem was restricted in use for one person at a given time. Moreover, if more than one 1 2 Introduction to UNIX/Linux person needed to use the system, each person needed to schedule a specific time to use the system. In addition, the user could issue only one computer task at a time and waited for the task to complete before issuing another task. These restrictions greatly limited the operation and employment of these very expensive computing systems. As a result, only large businesses, educational institutions, and govern- mental agencies could afford to use them. Over time, more people needed to do their work on computers, along with an increasing number of tasks. Consequently, there was an overwhelming need for a computing system that could support not only multiple users at a time, but also could handle multiple tasks or programs at a time. To address these pressing needs, the Multics Project, which means Multiplexed Information and Computing Service (Multics), was created to help design and develop a multiuser system. The Multics Project brought together many prominent businesses and educational institutions, including AT&T, the Massachusetts Institute of Technology, and General Electric. After a few years, the project created a prototype multiuser system that could sup- port several users simultaneously. But it failed to achieve many of its original grand goals and the project was disbanded in the late 1960s. After the breakup of the Multics Project, some of its more visionary members, notably K. Thompson, D. M. Ritchie, M. D. McIlroy, and J. F. Ossanna, decided to develop a system independently based on many of the Multics concepts. The out- come was UNIX—a multiuser, multitasking operating system. As a result of their efforts, the C programming language was developed to facilitate the development and eventual portability of UNIX onto new hardware. By the mid 1970s, AT&T re- alized these farsighted individuals had created a functional multiuser and multi- tasking system, and regained interest. Over the next decade or so, AT&T provided UNIX systems to various education institutions and businesses. Because UNIX was designed to be both a multiuser and an interactive time- sharing operating system, other computing manufacturers developed and sold cus- tom versions of UNIX designed specifically for their own computing systems. Some of these manufacturers and their systems included IBM’s developed version, AIX®; Hewlett Packard’s version, HP-UX®; and Sun Microsystems’s versions, SunOS® and Solaris®. In 1991, Linus Torvalds announced he developed a PC-based system called Linux, which functioned as the large UNIX systems installed by the major hardware vendors. Linux targeted PC hardware, which was inexpensive, readily available, and numerous. Because of the open source nature of Linux, which meant its source code was freely available and sharable between users and machines, it gave Linux’s users the ability to modify the functionality of source code as desired. The Linux audience grew to include a large number of technical users worldwide, who pro- vided new source code that added to the system, fixed “bugs,” optimized perfor- mance, and provided support for various hardware platforms. Linux versions soon Overview of UNIX and Linux 3 became available for non-PC systems as well, allowing for its use on virtually any platform or hardware combination. SIMILARITIES AND DIFFERENCES OF UNIX/LINUX SYSTEMS In this book, the term UNIX/Linux refers to UNIX and Linux systems in general. Any UNIX/Linux system will provide the same basic concepts, such as files, direc- tories, permissions, jobs, processes, redirection, and piping, which are discussed in the following chapters. This book focuses on the major features and commands common to nearly all UNIX/Linux systems, meeting the needs of most users. While each UNIX/Linux system uses many common concepts, the look or feel of each system may vary; some variations depend on how commands or utilities are installed or how accounts are configured on the system. A command usually refers to a simple task that is built in to an interface—a program or device that controls the way equipment or programs work together—such as navigating to different di- rectories in a filesystem. An application or utility refers to a program or software package that accomplishes certain tasks, such as creating a backup collection of files or viewing system performance. Certain commands and applications are found on any UNIX/Linux system, and you will learn more about these in later chapters. Many factors affect which commands or utilities are available. One such factor is the role of the system. For example, a programming system typically provides all applications needed to compile, debug, and optimize a program, whereas a Web server may not, if the policies of a business or educational institution predetermine the selection of commands or utilities available. Typically, users select an interface and how that it is used. See Chapter 3, “Getting Started with UNIX/Linux” and Chapter 11, “Basic Account and System Maintenance,” for further information. Another difference among systems involves the appearance of the environment and the ways users issue operations. These differences are also affected by the role of the system or what applications are installed. COMMAND-LINE INTERFACE VERSUS GRAPHICAL INTERFACES A user interacts with the computing system using a keyboard, mouse, or both. A command-line interface needs commands typed in via a keyboard and a graphical interface (also called a graphical user interface or GUI) uses icons activated by a mouse click. Sometimes a graphical interface requires keyboard input, such as en- tering a filename. These interfaces change the look and layout of a program on the screen or the system itself for interaction with the user. 4 Introduction to UNIX/Linux Evolving simplification of computing hardware promotes icon popularity, but this does not mean command-line interfaces are no longer important. On the con- trary, the range of operations a user can initiate by pointing and clicking a mouse is much smaller than by using keyboard commands. Understanding this can be vital when you need a command to accomplish a task in a specific manner. Many times a command-line interface is a more efficient and preferred ap- proach. For example to specify a filename with a command-line interface, you sim- ply type the filename. To specify a filename with a graphical interface, you must point, click (possibly multiple times), and then key in the information. The addi- tional hand movements needed to change from keyboard to mouse can be fatigu- ing and time consuming. In addition, some machines have a dedicated function that limits its use. A business or institution policy may limit which applications a machine can run or provide to a user. For example, a file, Web, or database server may be responsible for high-traffic volumes or fast responses. A policy may dictate that the system not use a graphical environment or a mouse, as these features increase the workload for the machine, consequently, hampering its ability to attend to its responsibilities. Moreover, if you access another machine over the network, as you will learn in Chapter 12, “Network-Based Utilities,” command-line interfaces are often how you interact with that other computer system. The focus of this book is on command lines that are similar and available across the various UNIX/Linux systems, however, interfaces that use graphics are not ig- nored. On the contrary, graphical interfaces provide command-line interfaces within a terminal (workstation visual display) window, as explained more com- pletely in Chapter 3. It is actually common for a user to have a graphical interface on their system along multiple open command-line terminal windows, so each command line can be used for different work. WHY UNIX/LINUX? UNIX and Linux are examples of operating systems, or system-level software that contains the necessary support to use and manage the CPU, disk, monitor, and other hardware. An operating system controls the hardware and contains the sup- port to load and run application software to create documents, write programs, manipulate graphics, surf the Internet, or accept user commands. In simple terms, application software is a program you use to create documents, draw figures, and accomplish other work. To recap, a computer operating system controls and runs the basic software operating on a computer, underneath things like word proces- sors and spreadsheets, and controls all the hardware in an organized and pre- dictable way. Overview of UNIX and Linux 5 While other operating systems are available, UNIX or Linux is often preferred for its reliability, security, and speed. Many businesses demand their critical sys- tems, such as databases, file servers, Web servers, and production servers run on UNIX or Linux. Because UNIX and Linux systems have been around for several years, many bugs and security issues have been discovered and resolved. UNIX and Linux systems are also able to survive and continue operating after a failure of a hardware component such as a disk, CPU, or network connection. Many academic environments—particularly those in technical fields and at the graduate level—use UNIX or Linux for their work. UNIX and Linux systems pro- vide a number of ways to accomplish sophisticated tasks, such as analyzing pro- gram performance and changing or adding operating system functionality. Academic environments not only favor UNIX or Linux because of these features and its reliability, but also to provide their students exposure to a system that they may very well use in the workplace. Open Source Linux systems and software are also attractive choices because of their low (or no) cost and extensive support benefits. A system or piece of software that is open source is generally free to use, and easily available by Internet download. A large team of technical users create updates (fixes) and make them available to other open source users. Because of the many features and benefits of Linux, you can use the compan- ion software to install and learn. The discussion is general enough for most, if not all, UNIX/Linux systems. If you wish to install and use this provided system, please refer to Chapter 2, “Installing a Linux (Fedora™) System.” SUMMARY This chapter provided a brief history about the evolution of UNIX/Linux. Differ- ences between the UNIX/Linux systems currently in use were explained, as well as an overview of how they may be used. A description of the book’s focus and pur- pose was explained and various UNIX/Linux concepts were demonstrated, in a manner intended to accommodate the widest audience and variety of uses possible. EXERCISES 1. What are the differences between a command-line interface and a graphi- cal interface? 2. How are UNIX systems and Linux systems different? 3. What are some reasons that one may choose UNIX/Linux over some other operating system? 6 Introduction to UNIX/Linux 4. Using on-line resources, find some UNIX systems. Give the name for each of those systems as well as the company(s) that provide each system. 5. Using on-line resources, find some Linux systems. Give the name for each of those systems as well as the company(s) that provide each system.