Linux Admin Presentation
Linux Admin Presentation
Linux
Presentation by
Ronny Budden
Linux Essential
– What is Unix ?
– The Unix operating system is a set of programs that act as a link between the computer and the user.
– The computer programs that allocate the system resources and coordinate all the details of the computer's internals is called
the operating system or the kernel.
– Users communicate with the kernel through a program known as the shell. The shell is a command line interpreter; it translates
commands entered by the user and converts them into a language that is understood by the kernel.
– Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson, Dennis Ritchie, Douglas McIlroy, and Joe
Ossanna at Bell Labs.
– There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and BSD are a few examples. Linux is also a
flavor of Unix which is freely available.
– Several people can use a Unix computer at the same time; hence Unix is called a multiuser system.
– A user can also run multiple programs at the same time; hence Unix is a multitasking environment.
– Unix Architecture
– Here is a basic block diagram of a Unix system −
Linux Essential
The main concept that unites all the versions of Unix is the following four basics −
– Kernel − The kernel is the heart of the operating system. It interacts with the hardware and most of the
tasks like memory management, task scheduling and file management.
– Shell − The shell is the utility that processes your requests. When you type in a command at your terminal,
the shell interprets the command and calls the program that you want. The shell uses standard syntax for
all commands. C Shell, Bourne Shell and Korn Shell are the most famous shells which are available with
most of the Unix variants.
– Commands and Utilities − There are various commands and utilities which you can make use of in your
day to day activities. cp, mv, cat and grep, etc. are few examples of commands and utilities. There are over
250 standard commands plus numerous others provided through 3rd party software. All the commands
come along with various options.
– Files and Directories − All the data of Unix is organized into files. All files are then organized into
directories. These directories are further organized into a tree-like structure called the filesystem.
System Bootup
If you have a computer which has the Unix operating system installed in it, then you simply need to turn on the system to make it live.
As soon as you turn on the system, it starts booting up and finally it prompts you to log into the system, which is an activity to log into the
system and use it for your day-to-day activities.
Login Unix
When you first connect to a Unix system, you usually see a prompt such as the following −
login:
System Initialization
– Linux - System Initialization
– Boot process:
– Boot process consists of the set of processes from power on the PC to login prompt comes. When a computer boots up, the BIOS is
the first program that is run.
– After it is loaded, the BIOS begins to test the system through the power on Self Test (POST) and then starts loading peripheral
devices.
– The BIOS then looks for the boot device and passes control to it. The boot device contains the Master boot record (MBR), Which starts
to boot the system via the boot loader. From here, the Grand unified boot loader (GRUB) looks to boot into the kernel that is labeled as
the default. Finally, the kernel calls the init process, which boots up the rest of the system.
– The GRUB has become the default boot loader for Red Hat, ebonite, and many; other versions of linux as well When GRUB loads, you
are given a list of kernels and additional operating systems from which you can choose to boot. By default, there is a configurable 5-
second timeout value that chooses the default kernel if you don’t make a selection and the timeout there should is reached/ After
GRUB loads the kernel, it passes control over to the kernel, which it run begins to initialize and configure the computer’s hardware.
– During the boot process, everything is logged to the /var/ log/ dmesg file. You can also use the dmesg cmd to query information about
the boot process after the system has booted. When the system’s drivers are in place, the kernel executes the /sbin / init program. In
RHEL 6, the boot process has been replaced by a new utility called upstart instead of the traditional system in its style scripts. This utility
decreases the time that it takes the system to boot and is already currently being used on other versions of lixun such as ubuntu. The init
program is the first process created by the kernel. It is responsible for the rest of the boot process and setting up the environment for the user.
First, it consults the /etc/init tab file, which defines how the rest of the boot process will go. The /etc/init tab file lists the default run level to boot
into and the system initialization script (etc/rc.d/rc.sysinit). Let’s look at the /etc/init tab file to see what the init process goes through #cat/etc/init
tab You can see that the default run level is set to 5, although six different run levels are listed. The /etc/init tab file also defines how to handle
power failures and virtual terminals.
– After the init process is done consulting the /etc/init tab file, the /etc/rc.d/rc.sys, init script is run, which handles setting
the system clock, networking, setting up the user environment & more. In Red Hat Linux, the default run level is 5. This
default run level is passed to the /etc/rc.d /rc script, which calls all the programs in the /etc/rc.d/rc#.d directory. The last
thing that you should see is the login prompt. If you have a desktop manager installed such as Gnome, you should see a GUI
login screen where you can log in to the system; otherwise, you see a text mode login. Working with Grub: The GRUB boot
loader is broken down into different stages. The code contained on the MBR is considered GRUB stage 1. It loads GRUB stage
1.5, which tries to identify the file system type (optional), or it can call GRUB stage 2 directly. Stage 2 is what calls the kernel and
loads it into memory. In stage 1, GRUB needs to search the MBR looking for an active partition from which to boot the kernel.
GRUB has its own format for looking through hard disks. The syntax of this format is (xdn[, m]) where xd is the drive
– n is the number of the disk
– m denotes the partition number.
– The syntax is very useful when troubleshooting issues with GRUB because you need to know how GRUB searches for disk
drives when trying to find the primary partition. When the primary partition found, GRUB loads the kernel, which is where you
move to stage 2. Stage 2 is the place where you will tend to spend the most time troubleshooting boot issues with the system. As
stage 2 starts, it presents you with a list of kernels that you can boot from, along with a listing of options that you can use to
modify the parameters passed to the kernel during bootup.
Package Management
– Almost all the software that is installed on a modern Linux system will be found
on the Internet. It can either be provided by the distribution vendor through
central repositories (which can contain several thousands of packages, each of
which has been specifically built, tested, and maintained for the distribution) or
be available in source code that can be downloaded and installed manually.
– Because different distribution families use different packaging systems
(Debian: *.deb / CentOS: *.rpm / openSUSE: *.rpm built specially for
openSUSE), a package intended for one distribution will not be compatible with
another distribution. However, most distributions are likely to fall into one of
the three distribution families covered by the LFCS certification.
High and low-level package tools
– The most frequent tasks that you will do with low level tools are as follows:
– 1. Installing a package from a compiled (*.deb or *.rpm) file
– The downside of this installation method is that no dependency resolution is
provided. You will most likely choose to install a package from a compiled file
when such package is not available in the distribution’s repositories and
therefore cannot be downloaded and installed through a high-level tool. Since
low-level tools do not perform dependency resolution, they will exit with an
error if we try to install a package with unmet dependencies
Upgrading a package from a
compiled file
– Again, you will only upgrade an installed package manually when it is not
available in the central repositories.
Linux – User Administration