Sei sulla pagina 1di 46

Welcome!

RH033
Red Hat Linux Essentials

Objectives

Day 1

Introduction to Linux Introduction to Red Hat Enterprise Linux [ RHEL 4.0 ] Installation of Red Hat Linux Basic Fundamentals of Red Hat Linux Using CLI and GUI shells
Using GNOME & KDE desktop shells Using Virtual Consoles Managing files and directories Using Vim Editor

Introduction to Linux

What is Linux ?

A fully-networked 32/64-Bit Unix-like Operating System Unix Tools Like sed, awk, and grep (explained later) Compilers Like C, C++, Fortran, Smalltalk, Ada Network Tools Like telnet, ftp, ping, traceroute Multi-user, Multitasking, Multiprocessor Has the X Windows GUI Coexists with other Operating Systems Runs on multiple platforms Includes the Source Code

Where did it come from?

Linus Torvalds created it with assistance from programmers around the world first posted on Internet in 1991 Linux 1.0 in 1994; 2.2 in 1999 Today used on 7-10 million computers with1000sofprogrammersworkingtoenhanceit

Open Source Software


When programmers on the Internet can read, redistribute, and modify the source for a piece of software, it evolves People improve it, people adapt it, people fix bugs. And this can happen at a speed that, compared to conventional software development, seems astonishing

How do you get it?


Download it from the Internet FromaDistribution(e.g.RedHat) Linux kernel X Windows system and GUI Web, e-mail, FTP servers Installation & configuration support 3rd party apps Hardware support

Distribution Concept Free Distributions Fedora Core Debian and Ubuntu Gentoo Slackware Many, many more Commercial Distributions Red Hat Enterprise Suse Yellow Dog

Why is it significant?

Growing popularity Powerful Runs on multiple hardware platforms Users like its speed and stability No requirement for latest hardware Itsfree Freedom 0: The freedom to run the program, as you wish Freedom 1: The freedom to study the source code and change it to do what you wish Freedom 2: The freedom to copy and redistribute the program when you wish Freedom 3: The freedom to distribute modified versions, when you wish

10

Introduction to

Red Hat Enterprise Linux [ RHEL 5.0 ]

11

Red Hat Enterprise Linux


Commercial Distribution Enterprise-targeted operating system Focused on mature open source technology 12-18 month release cycle Versions available started from 2.1, 3.0, 4.0 now 5.0 Support available up to 24 x 7 coverage plans Supports many processor architectures Intel x86-compatible, Intel Itanium 2, AMD64, IBM PowerPC on eserver iSeries and eServer pSeries and IBM Mainframe on eServer zSeries and S/390

12

The Fedora Project


Red Hat-sponsored open source project Focused on latest open source technology Rapid four to six month release cycle Available as free download from the internet An open, community-supported proving ground for technologies which may be used in upcoming enterprise products Red Hat does not provide formal support for Fedora Project

13

Installation of Red Hat Enterprise Linux

14

Types of Installations

Fresh Installation ( New ) Upgradation

Methods of Installations

Attended Unattended

Modes of Installations

GUI Based ( Graphical Installation ) CLI Based ( Text Based Installation )


15

Sources of Installation

CD-ROM Hard Disk Network NFS Server FTP Server HTTP Server

16

Conventions for Naming the Disks and Partitions

Linux uses a very different naming scheme that provides far more information than that used by MSDOS or Microsoft Windows /dev/xxyN The dev refers to the devices directory. The devices directory is where all information about devices is stored

The xx refers to the type of hard disk. The xx is replaced by hd for an Integrated Drive Electronics (IDE) hard disk and by sd for a Small Computer Systems Interface (SCSI) hard disk

IDE Hard Disk

= /dev/hd

SCSI Hard Disk = /dev/sd


17

/dev/xxyN Primary Master Primary Slave Secondary Master Secondary Slave = /dev/hda = /dev/hdb = /dev/hdc = /dev/hdd

The y is replaced by a letter representing each disk. For example, a would be the first disk and b the second

18

/dev/xxyN
The N is replaced by a number for each partition on a drive. For example, 1 would be the first partition and 2 the second

Primary partition /dev/hda1

Extended partition(/ dev/hda2) /dev/hda5 1st logical partition /dev/hda6 2nd logical partition

Primary masterIDE hard disk (/ dev /hda)

19

Primary partition /dev/hda1

Extended partition(/ dev/hda2) /dev/hda5 1st logical partition /dev/hda6 2nd logical partition

Primary masterIDE hard disk (/ dev /hda)

Primary partitions are represented by the numbers 1, 2, 3, and 4. Logical partitions start with 5.

/dev/hda1 is the device file for the first primary partition on the first EIDE disk /dev/hdb5 is the first logical partition on the second EIDE disk

20

Mount Point

The Linux operating system is a filing system Whenever you want to attach another filing system to Linux, you must tell Linux where to see the contents of the file system you are attaching. This is called the mount point. The mount point for the floppy drive file system is /media/floppy The mount point for the CD-ROM file system is /media/cdrom
21

The File System Hierarchy


In the Linux operating system, every file, directory, and device is one part of a grand hierarchy. The topmost member of this hierarchy is the root directory, and it is denoted by the symbol /

22

The Top Level Directories


Directory /bin /usr/bin /sbin /usr/sbin /var/log /home Description Contain programs available to all users Contain programs meant to be used by system administrators Contain the log files made by various applications. The log files are invaluable in keeping track of applications activities and errors Contains all the personal directories of the users of the system

/boot
/etc /media /proc

Contains the files needed by the operating system to load itself into memory
Contains the system configuration files used by various applications Contains the mount points for any removable devices in the system (such as CD-ROMs, floppy disks, and the usbdisk drives). Contains the system state information. The information in the files of this directory is maintained directly by the operating system kernel

23

Basic File System Types


A file system is the logical structure and software routines that control access to the storage space on disks. Unlike most operating systems, Linux supports several file system types. The Ext2 (Second Extended) file system is the most common Linux file system and is the second version of the Ext file system The Ext2 file system was designed to overcome deficiencies found in the Ext file system The Ext file system can handle partitions up to 2 gigabytes (GB) in size, whereas Ext2 can handle partitions up to 4 terabytes (TB) in size

24

Features of Ext2

The Ext2 file system has many other advanced features including provision for filenames up to 255 characters long Ext2 also reserves disk space on the partition for the superuser. This means that if a disk develops a problem, the superuser can still access that disk and rectify it

25

Ext3 file system

In Linux 7.2, ext2 is the default file system


Require check for consistency (e2fsck) when system is not properly shut down Ext => ext2 =>ext3

Support 256 char filenames, 4 Tera byte max filesize


Others MS-Dos, FAT32, NTFS, ISO9660 Provide stronger data integrity in event of unclean shutdown Check for consistency is needed only on rare hardware failure

Starting from Linux 7.3, ext3 is the default file system


Higher throughput, as it is optimizes hard drive head motion


Provide easy transition from ext2 to ext3 other common filesystem are MS-DOS (FAT32, NTFS, ISO9660)

26

What is Boot loader ?


boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to the operating system kernel software. The kernel, in turn, initializes the rest of the operating system
GRUB (GRand Unified Bootloader), which is installed by default, is a very powerful boot loader. GRUB can load a variety of free operating systems, as well as proprietary operating systems with chain-loading (the mechanism for loading unsupported operating systems, such as DOS or Windows, by loading another boot loader).

27

You may install the boot loader in one of two places:

The master boot record (MBR) This is the recommended place to install a boot loader, unless the MBR already starts another operating system loader, such as System Commander. 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 the boot loader can take control of the boot process. If you install it in the MBR, when your machine boots, GRUB presents a boot prompt. You can then boot Red Hat Enterprise Linux or any other operating system that you have configured the boot loader to boot. The first sector of your boot partition This is recommended if you are already using another boot loader on your system. In this case, your other boot loader takes control first. You can then configure that boot loader to start GRUB, which then boots Red Hat Enterprise Linux.

28

What is SWAP Partition ?


swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing.

29

Size of SWAP ?

At least 256 MB Twice the amount of RAM on your machine Swap should equal 2x physical RAM for up to 2 GB of physical RAM, and then 1x physical RAM for any amount above 2 GB, but never less than 32 MB. SWAP can also used after the installation Red Hat Enterprise Linux supports up to 32 swap files

30

Sample Partition Structure


Mount Point /boot / /usr /var /home SWAP Size 128 MB 2048 MB 2048 MB 512 MB 512 MB Use recommended size

31

Steps to install RHEL


Boot your computer from bootable media Start Installation Language, Keyboard and mouse selection Media selection if applicable Disk Partitioning Bootloader configuration Network and firewall configuration Authentication Setup Package Selection X server configuration

32

?
Questions

Let's Set it up......

Basic Fundamentals

35

Local Logins

Text-mode login at virtual console Graphical login

Station1: here Password: password here

Enter Your username Enter Your

36

37

Virtual Consoles

Multiple non-GUI logins are possible through the use of virtual consoles There are by default 6 available virtual consoles Available through CTRL+ALT+F[1-6] ( here F is for Function Key )

If X is running, it is available as CTRL+ALT+F7

38

The command prompt


[root@station1 ~]#
[amit@station1 ~]$

root and amit are usernames who has currently logged on the computer /root for root user /home/amit for amit user station1 is the hostname ( computer name ) of your computer ~ character represents the current user is working on to his/her home folder # character represents the current user is the super user ( Administrator) $ character represents the current user is the normal user ( Non-privileged )

39

Using CLI and GUI shells

40

What is "the shell"?


The shell is a program that takes your commands from the keyboard and gives them to the operating system to perform. In the old days, it was the only user interface available on a Unix computer. Nowadays, we have graphical user interfaces (GUIs) in addition to command line interfaces (CLIs) such as the shell.

41

Some Simple Commands

ls date cal clear pwd mkdir rmdir cd cat rm cp mv touch less more

= = = = = = = = = = = = = = =

list the files and directory display date and time display calendar clear the screen prints the name of current working directory creates the directory removes the directory changes the directory display the contents of file removes the files copy the files and directory move and rename ( files and directories ) updates the file/directory time-stamps pager command pager command

42

Redirecting Input and Output


Common Redirection Operators

> command > file >> command > file < command < file 2> command 2> file 2>> command 2>> file

directs the standard output of command to file Appends the standard output of command to file command receives its input from file Error messages from command are directed to file Error messages from command are appended to file

43

What have we learnt ?


Introduction to Linux Introduction to Red Hat Enterprise Linux [ RHEL 4.0 ]

Installation of Red Hat Linux


Basic Fundamentals of Red Hat Linux Using CLI and GUI shells Using GNOME & KDE desktop shells

Using Virtual Consoles


Managing files and directories

Day 1 Complete !!!

?
Questions

Thank You !!!

Potrebbero piacerti anche