Download Linux Pres1 - Parent Directory

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

AmigaOS wikipedia , lookup

Library (computing) wikipedia , lookup

DNIX wikipedia , lookup

Linux adoption wikipedia , lookup

Process management (computing) wikipedia , lookup

Commodore DOS wikipedia , lookup

MTS system architecture wikipedia , lookup

RSTS/E wikipedia , lookup

Spring (operating system) wikipedia , lookup

Batch file wikipedia , lookup

Security-focused operating system wikipedia , lookup

Plan 9 from Bell Labs wikipedia , lookup

OS 2200 wikipedia , lookup

Burroughs MCP wikipedia , lookup

Smallfoot wikipedia , lookup

Computer file wikipedia , lookup

Master boot record wikipedia , lookup

CP/M wikipedia , lookup

VS/9 wikipedia , lookup

Unix security wikipedia , lookup

Booting wikipedia , lookup

Windows NT startup process wikipedia , lookup

Transcript
Linux can be generally divided into four major components:
1. KERNEL – OS, ultimate boss
The kernel is the core program that runs programs and manages Hardware
devices and mostly written in “C”.
Allocates the system resources, scheduling of task and memory management.
2. SHELL – interface between user and kernel
The Shell provides an interface for the user. It receives commands from the
user and sends those commands to the Kernel for execution. Linux shell is
BASH shell. It can be described as an interpreter between the USER and the
Machine.
3. FILE STRUCTURE – file organization
File Structure organizes the way; the files are stored to or retrieved from a
storage device. Files are organized into directories, each directory may contain
many number of sub directories
Structure of file system is hierarchical. It provides a logical method of
organizing and managing information.
Types of File System
Ordinary files :
No system imposed structure.
Contains any desired information.
Identified by “_” in the first column of the output of ls –l command.
There may be two types of regular files
Executable-Executable files are program that can be run
Non-Executable-Non-executable files are text or data files.
Directory Files
Contains the information about various files stored in the directory.
Identified by “d” in the first column of the output of ls –l command.
Each directory contains an entry for itself and its directory file.
Entry for itself named as “.” And its parent shown by “..”
Types of File System
Special Files
Represents a physical device e.g. Terminal, Disk Drives etc.
Reads and writes to special files in the same way it writes to ordinary
files.
There are two types of device files : Block and Character.
1. Character special files are used for un-buffered I/O to/from the
Device.
2. Block special files refer to disk drives, data is transferred in fixed
blocks.
Directory Structure of Root File System.
/
- Root directory that is base of the file system. It contains all other
files and directories in a logical manner irrespective of their
physical location.
/bin
- Contains the executable programs of Linux operating system
such as cat , cp, ls, more, etc.
/dev
- Contains special files that represent devices attached to the
system, such as floppy disk. Hard
disk, printers etc.
/etc
- System configuration files are kept here.
/boot
- Linux kernel and other files needed by boot loader are kept here.
These files may be kept at any other location also, but are normally kept at
/boot.
/home - Home directories of all users are kept here.
/mnt
- This directory contains temporarily mounted file system such as
CDROM and floppy drive.
/usr
- contains sub directories of X window system.
/var
- contains various system files, such as log files.
/tmp
- contains temporary files created by system, are normally deleted
as the system boots up.
4. UTILITIES – built-in
Linux has various inbuilt software programs called utilities. The utilities are
specialized programs such as Editors, Compilers and communication
programs.
Linux Startup process
When you startup a Linux system, a series of events occur after you
Power On and before you receive a login prompt. This sequence is referred
to as the boot process. The kernel is the core program that runs programs and
manages Hardware devices and mostly written in “C”.
1. BIOS-Starts checks for hardware devices. The BIOS performs its checks
and then looks to the MBR, which contains the first boot loader, such as
LILO or GRUB after finding LILO or GRUB, the BIOS initiates LILO or
GRUB.
2. LILO or GRUB -Then reads in the partition table as looks for the second
stage boot loader on the partition listed in the /etc/lilo.conf or
/etc/grub.conf file
3. The second stage boot loader (/boot/boot.b) finds the KERNEL image and
runs it.
4. The kernel starts the init process by running /sbin/init. Then init process
starts getty process for the console prompt $ or #.
Shutdown process
[root@server]# init 0
[root@server]# halt
[root@server]# Shutdown –y –g0 –i0
Run levels
Linux has different levels of operation, referred to as run level. You can select
the default run level by editing your /etc/inittab file.
- Functionality
•0
- This run level is used to shutdown the system
•1
- Single User mode - Only one user may log on and that user will be
operating as the super user. This mode is mainly for maintenance and repair.
•2
- Multi user mode - Users are allowed to log on, but the network has
not yet been initialized.
• 3.
- Full multi user mode-All services and network have been initialized.
•5
- This run level will cause the System to boot directly into the
graphical X window system. Bypassing the console.
• 6.
- This run level used to reboot the System.
Boot Process
STRUCTURE OF GRUB.CONF
(/boot/grub/grub.conf)
Installing LILO or GRUB
In order to boot your Red Hat Linux system, you usually need to install LILO
(the LInux LOader)or GRUB (Grand Unified Boot loader) .You may install
LILO/GRUB in one of the two places :
(1)
The master boot record (MBR)
The recommended place to install boot Loader, unless the MBR already starts
another operating system loader, such as System Commander or OS/2's Boot
Manager. The MBR is a special area on your hard drive that is automatically
loaded by your computer's BIOS, and is the earliest point at which Boot Loader
can take control of the boot process. If you install Boot Loader in the MBR,
when your machine boots, Boot Loader will present a prompt. You can then
boot Red Hat Linux or any other operating system that you have configured
Boot Loader to boot.
(2)
The first sector of your root partition
Recommended if you are already using another boot loader on your system
(such as OS/2's Boot Manager). In this case, your other boot loader will take
control first. You can then configure that boot loader to start LILO/GRUB
(which will then boot Red Hat Linux).
If you choose to install LILO, please select where you would like LILO to be
installed on your system .If your system will use only Red Hat Linux, you
should choose the MBR. For systems with Windows 95/98, you should install
LILO to the MBR so that LILO can boot both operating systems.