Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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
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
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
11
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
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
14
Types of Installations
Methods of Installations
Attended Unattended
Modes of Installations
Sources of Installation
CD-ROM Hard Disk Network NFS Server FTP Server HTTP Server
16
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
= /dev/hd
/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
Extended partition(/ dev/hda2) /dev/hda5 1st logical partition /dev/hda6 2nd logical partition
19
Extended partition(/ dev/hda2) /dev/hda5 1st logical partition /dev/hda6 2nd logical partition
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
22
/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
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
Require check for consistency (e2fsck) when system is not properly shut down Ext => ext2 =>ext3
26
27
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
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
31
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
Basic Fundamentals
35
Local Logins
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 )
38
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
40
41
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
> 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
?
Questions