Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

The Linux System Administrator's Guide, Summaries of Linux skills

The Topics covered in the work 1- Introduction (Linux or GNU/Linux what is it) (Trade Mark) 2- Overview of Linux System A- Various part of an operating system B- Important part of the Kernel C- Major services in a UNIX system a-Init b- logins from terminals c- Syslog d- Periodic command execution e- Graphical user interface f- Networking g- Network logins h- Network file system i- mail, printing j- The File system layout Our next level of topic published in 15 October 2023

Typology: Summaries

2021/2022

Available from 09/24/2023

prateek-agrawal-2
prateek-agrawal-2 🇮🇳

1 document

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Linux Operating System
Diploma Certificate in Computer Science
Bachelor’s Degree First Year Course in Computer
Science
Relevant to all University Course
The Linux System's Guide
Chapter 1. Introduction.......
1.1. Linux or GNU/Linux, that is the question...........
1.2. Trademarks.........................................
Chapter 2. Overview of a Linux
System.......................................
2.1. Various parts of an operating system....................................
2.2. Important parts of the kernel................................................
2.3. Major services in a UNIX system........................................
2.3.1. init....................................................................................
2.3.2. Logins from terminals......................................................
2.3.3. Syslog..............................................................................
2.3.4. Periodic command execution: cron and at......................
2.3.5. Graphical user interface.................................................
2.3.6. Networking....................................................................
2.3.7. Network logins..............................................................
2.3.8. Network file systems....................................................
2.3.9. Mail...............................................................................
2.3.10. Printing......................................................................
2.3.11. The file system layout..................................................
Coming Soon -
Chapter 3. Overview of the Directory Tree
Chapter 4. Hardware, Devices, and Tools
.
In next Documents with in 2 week.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download The Linux System Administrator's Guide and more Summaries Linux skills in PDF only on Docsity!

Linux Operating System

Diploma Certificate in Computer Science

Bachelor’s Degree First Year Course in Computer

Science

Relevant to all University Course

The Linux System's Guide

Chapter 1. Introduction....... 1.1. Linux or GNU/Linux, that is the question........... 1.2. Trademarks......................................... Chapter 2. Overview of a Linux System....................................... 2.1. Various parts of an operating system.................................... 2.2. Important parts of the kernel................................................ 2.3. Major services in a UNIX system........................................ 2.3.1. init.................................................................................... 2.3.2. Logins from terminals...................................................... 2.3.3. Syslog.............................................................................. 2.3.4. Periodic command execution: cron and at...................... 2.3.5. Graphical user interface................................................. 2.3.6. Networking.................................................................... 2.3.7. Network logins.............................................................. 2.3.8. Network file systems.................................................... 2.3.9. Mail............................................................................... 2.3.10. Printing...................................................................... 2.3.11. The file system layout..................................................

Coming Soon -

Chapter 3. Overview of the Directory Tree

Chapter 4. Hardware, Devices, and Tools

In next Documents with in 2 week.

Chapter 1. Introduction

"In the beginning, the file was without form, and void; and emptiness was upon the face of the bits. And the Fingers of the Author moved upon the face of the keyboard. And the Author said, Let there be words, and there were words." The Linux System Administrator's Guide, describes the system administration aspects of using Linux. It is intended for people who know next to nothing about system administration (those saying what is it?''), but who have already mastered at least the basics of normal usage. This manual doesn't tell you how to install Linux; that is described in the Installation and Getting Started document. See below for more information about Linux manuals. System administration covers all the things that you have to do to keep a computer system in usable order. It includes things like backing up files (and restoring them if necessary), installing new programs, creating accounts for users (and deleting them when no longer needed), making certain that the file system is not corrupted, and so on. If a computer were, say, a house, system administration would be called maintenance, and would include cleaning, fixing broken windows, and other such things. The structure of this manual is such that many of the chapters should be usable independently, so if you need information about backups, for example, you can read just that chapter. However, this manual is first and foremost a tutorial and can be read sequentially or as a whole. This manual is not intended to be used completely independently. Plenty of the rest of the Linux documentation is also important for system administrators. After all, a system administrator is just a user with special privileges and duties. Very useful resources are the manual pages, which should always be consulted when you are not familiar with a command. If you do not know which command you need, then the **apropos** command can be used. Consult its manual page for more details. While this manual is targeted at Linux, a general principle has been that it should be useful with other UNIX based operating systems as well. Unfortunately, since there is so much variance between different versions of UNIX in general, and in system administration in particular, there is little hope to cover all variants. Even covering all possibilities for Linux is difficult, due to the nature of its development. There is no one official Linux distribution, so different people have different setups and many people have a setup they have built up themselves. This book is not targeted at any one distribution. Distributions can and do vary considerably. When possible, differences have been noted and alternatives given. For a list of distributions and some of their differences see http://en.wikipedia.org/wiki/Comparison_of_Linux_distributions. In trying to describe how things work, rather than just listingfive easy steps'' for each task, there is much information here that is not necessary for everyone, but those parts are marked as such and can be skipped if you use a preconfigured system. Reading everything will, naturally, increase your understanding of the system and should make using and administering it more productive. Understanding is the key to success with Linux. This book could just provide recipes, but what would you do when confronted by a problem this book had no recipe for? If the book can provide understanding, then recipes are not required. The answers will be self evident.

1.2. Trademarks

Microsoft, Windows, Windows NT, Windows 2000, and Windows XP are trademarks and/or registered trademarks of Microsoft Corporation. Red Hat is a trademark of Red Hat, Inc., in the United States and other countries. SuSE is a trademark of Novell. Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd. GNU is a registered trademark of the Free Software Foundation. Other product names mentioned herein may be trademarks and/or registered trademarks of their respective companies.

Chapter 2. Overview of a Linux System

"God saw everything that he had made, and saw that it was very good. " −− Bible King James Version. Genesis 1: This chapter gives an overview of a Linux system. First, the major services provided by the operating system are described. Then, the programs that implement these services are described with a considerable lack of detail. The purpose of this chapter is to give an understanding of the system as a whole, so that each part is described in detail elsewhere.

2.1. Various parts of an operating system

UNIX and 'UNIX−like' operating systems (such as Linux) consist of a kernel and some system programs. There are also some application programs for doing work. The kernel is the heart of the operating system. In fact, it is often mistakenly considered to be the operating system itself, but it is not. An operating system provides many more services than a plain kernel. It keeps track of files on the disk, starts programs and runs them concurrently, assigns memory and other resources to various processes, receives packets from and sends packets to the network, and so on. The kernel does very little by itself, but it provides tools with which all services can be built. It also prevents anyone from accessing the hardware directly, forcing everyone to use the tools it provides. This way the kernel provides some protection for users from each other. The tools provided by the kernel are used via system calls. Seemanual page section 2 for more information on these. The system programs use the tools provided by the kernel to implement the various services required from an operating system. System programs, and all other programs, run `on top of the kernel', in what is called the user mode. The difference between system and application programs is one of intent: applications are intended for getting useful things done (or for playing, if it happens to be a game), whereas system programs are needed to get the system working. A word processor is an application; mount is a system program. The difference is often somewhat blurry, however, and is important only to compulsive categorizers. An operating system can also contain compilers and their corresponding libraries (GCC and the C library in particular under Linux), although not all programming languages need be part of the operating system. Documentation, and sometimes even games, can also be part of it. Traditionally, the operating system has been defined by the contents of the installation tape or disks; with Linux it is not as clear since it is spread all over the FTP sites of the world.

2.2. Important parts of the kernel

The Linux kernel consists of several important parts: process management, memory management, hardware device drivers, filesystem drivers, network management, and various other bits and pieces. Figure 2−1 shows some of them. Figure 2−1. Some of the more important parts of the Linux kernel

2.3.1. init

The single most important service in a UNIX system is provided by init init is started as the first process of every UNIX system, as the last thing the kernel does when it boots. When init starts, it continues the boot process by doing various startup chores (checking and mounting filesystems, starting daemons, etc). The exact list of things that init does depends on which flavour it is; there are several to choose from. Init usually provides the concept of single user mode , in which no one can log in and root uses a shell at the console; the usual mode is called multiuser mode. Some flavours generalize this as run levels ; single and multiuser modes are considered to be two run levels, and there can be additional ones as well, for example, torun X on the console. Linux allows for up to 10 run levels , 0−9, but usually only some of these are defined by default. Run level 0 is defined as system halt''. Run level 1 is defined assingle user mode''. Run level 3 is defined as "multi user" because it is the run level that the system boot into under normal day to day conditions. Run level 5 is typically the same as 3 except that a GUI gets started also. Run level 6 is defined as ``system reboot''. Other run levels are dependent on how your particular distribution has defined them, and they vary significantly between distributions. Looking at the contents of /etc/inittab usually will give some hint what the predefined. Run levels are and what they have been defined as. In normal operation, init makes sure getty is working (to allow users to log in) and to adopt orphan processes (processes whose parent has died; in UNIX all processes must be in a single tree, so orphans must be adopted). When the system is shut down, it is init that is in charge of killing all other processes, unmounting all file systems and stopping the processor, along with anything else it has been configured to do.

2.3.2. Logins from terminals

Logins from terminals (via serial lines) and the console (when not running X) are provided by the getty program. Init starts a separate instance of getty for each terminal upon which logins are to be allowed. Getty reads the username and runs the login program, which reads the password. If the username and password are correct, login runs the shell. When the shell terminates, i.e., the user logs out, or when login terminated because the username and password didn't match, init notices this and starts a new instance of getty. The kernel has no notion of logins, this is all handled by the system programs.

2.3.3. Syslog

The kernel and many system programs produce error, warning, and other messages. It is often important that these messages can be viewed later, even much later, so they should be written to a file. The program doing this is syslog. It can be configured to sort the messages to different files according to writer or degree of importance. For example, kernel messages are often directed to a separate file from the others, since kernel messages are often more important and need to be read regularly to spot problems. Chapter 15 will provide more on this.

2.3.4. Periodic command execution: cron and at

Both users and system administrators often need to run commands periodically. For example, the system administrator might want to run a command to clean the directories with temporary files (/tmp and /var/tmp) from old files, to keep the disks from filling up, since not all programs clean up after themselves correctly. The cron service is set up to do this. Each user can have a crontab file, where she lists the commands she wishes to execute and the times they should be executed. The cron daemon takes care of starting the commands when specified. The at service is similar to cron , but it is once only: the command is executed at the given time, but it is not repeated. We will go more into this later. See the manual pages cron(1), crontab(1), crontab(5), at(1) and atd(8) for more in depth information. Chapter 13 will cover this.

2.3.5. Graphical user interface

UNIX and Linux don't incorporate the user interface into the kernel; instead, they let it be implemented by user level programs. This applies for both text mode and graphical environments. This arrangement makes the system more flexible, but has the disadvantage that it is simple to implement a different user interface for each program, making the system harder to learn. The graphical environment primarily used with Linux is called the X Window System (X for short). X also does not implement a user interface; it only implements a window system, i.e., tools with which a graphical user interface can be implemented. Some popular window managers are: fvwm ,icewm , black box , and Window maker. There are also two popular desktop managers, KDE and Gnome.

2.3.6. Networking

Networking is the act of connecting two or more computers so that they can communicate with each other. The actual methods of connecting and communicating are slightly complicated, but the end result is very useful. UNIX operating systems have many networking features. Most basic services (file systems, printing, backups, etc) can be done over the network. This can make system administration easier, since it allows centralized administration, while still reaping in the benefits of micro computing and distributed computing, such as lower costs and better fault tolerance. However, this book merely glances at networking; see the Linux Network Administrators' Guide http://www.tldp.org/LDP/nag2/index.html for more information, including a basic description of how networks operate.

2.3.10. Printing

Only one person can use a printer at one time, but it is uneconomical not to share printers between users. The printer is therefore managed by software that implements a print queue : all print jobs are put into a queue and whenever the printer is done with one job, the next one is sent to it automatically. This relieves the users from organizing the print queue and fighting over control of the printer. Instead, they form a new queue at the printer, waiting for their printouts, since no one ever seems to be able to get the queue software to know exactly when anyone's printout is really finished. This is a great boost to intra−office social relations. The print queue software also spools the printouts on disk, i.e., the text is kept in a file while the job is in the queue. This allows an application program to spit out the print jobs quickly to the print queue software; the application does not have to wait until the job is actually printed to continue. This is really convenient, since it allows one to print out one version, and not have to wait for it to be printed before one can make a completely revised new version. You can refer to the Printing−HOWTO located at http://www.tldp.org/HOWTO/Printing−HOWTO/index.html for more help in setting up printers.

2.3.11. The file system layout

The file system is divided into many parts; usually along the lines of a root file system with /bin , /lib , /etc , /dev , and a few others; a /usr file system with programs and unchanging data; /var file system with changing data (such as log files); and a /home for everyone's personal files. Depending on the hardware configuration and the decisions of the system administrator, the division can be different; it can even be all in one file system. Chapter 3 describes the file system layout in some little detail; the File system Hierarchy Standard. covers it in somewhat more detail. This can be found on the web at: http://www.pathname.com/fhs/