The document discusses Red Hat Linux version 9. It covers major Linux distributions, Red Hat Enterprise Linux 3 products, administration utilities like man pages and log files, user and system identification, file and directory permissions, process management, system startup and shutdown, login and terminals, and device management. The document is a lecture on Linux administration and contains information presented across multiple modules or sections.
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
158 views
Red Hat Linux Version 9
The document discusses Red Hat Linux version 9. It covers major Linux distributions, Red Hat Enterprise Linux 3 products, administration utilities like man pages and log files, user and system identification, file and directory permissions, process management, system startup and shutdown, login and terminals, and device management. The document is a lecture on Linux administration and contains information presented across multiple modules or sections.
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 38
Red Hat Linux version 9
[Zahid Mehboob] HAMDARD UNIVERSITY KARACHI
Zahid Mehboob HAMDARD
1 UNIVERSITY Major Linux Distributions
Red Hat Linux
Caldera OpenLinux S.u.S.E Linux Debian GNU/Linux Slackware Linux MkLinux (For Power Macintosh)
Zahid Mehboob HAMDARD
2 UNIVERSITY Red Hat Enterprise Linux 3 Product Red Hat Enterprise Linux AS Red Hat Enterprise Linux ES Red Hat Enterprise Linux WS
In May 2004 a new member of the Red Hat
Enterprise Linux products family was introduced: – Red Hat Desktop
Zahid Mehboob HAMDARD
3 UNIVERSITY Module 2 Administration Utilities Man Pages Identifying The Linux System Identifying The Active Users Inspecting Log Files
Zahid Mehboob HAMDARD
4 UNIVERSITY Online Manuals
Online manuals in many section: May very
on system 1. user command 6. games & daemons 2. system calls 7. environments,tables 3. C library routines 8. maintenance command 4. devices & interface 9. kernal reference guide 5. file formats
Zahid Mehboob HAMDARD
5 UNIVERSITY Identifying The Linux System The “uname” command shows system inofrmation Options -a all information -n system name (nodename on network) -s OS name -r OS release number -v OS version number -m machine hardware -p processor type Zahid Mehboob HAMDARD 6 UNIVERSITY Identifying Active Users The “who” command shows who is currently logged on – Information kept in /var/run/utmp – A history of every login is also kept in /var/log/wtmp You can also used short “w” command
Zahid Mehboob HAMDARD
7 UNIVERSITY Inspecting Log Files Use a “pager” such as less or more – can be slow when working with large log files Use “grep” to look for particular words Use the “tail” command to look at the last few lines Use “pico” or “joe” to read the whole file
Zahid Mehboob HAMDARD
8 UNIVERSITY Module 3 Files & Directories Directory Structure File System Concepts Access Control & File and Directory Permissions
Zahid Mehboob HAMDARD
9 UNIVERSITY Access Control Three types of users, plus super user – User (or owner) – Group (any user in same group) – Other Three types of protection – Read – Write – Execute
Zahid Mehboob HAMDARD
10 UNIVERSITY File & Directory Permissions File permissions – r-read file – w-write file – x-execute file (program or shell script) Directory permissions – r-read directory file (doesn't access to files) – w-write to directory (create, rename & delete files – x-search directory (pass through & access files)
Zahid Mehboob HAMDARD
11 UNIVERSITY Module 4 Process Management Process & Daemons Signals The at command Cron jobs
Zahid Mehboob HAMDARD
12 UNIVERSITY Program & Processes A program is an executable file A process is a instance of a program being executed Linux allows many processes to be executing “simultaneously” – the kernal arranges for each process to have a share of the CPU and automatically switches from executing one process to executing another
Zahid Mehboob HAMDARD
13 UNIVERSITY Daemons Daemon processes provide system functionality – the key attribute of a daemon process is the fact that its not attached to a terminal – when the event occurs, the daemon wakes up, services the event, then goes to sleep – the daemon will fork a new child process to service the event so that it can quickly look for another event
Zahid Mehboob HAMDARD
14 UNIVERSITY Checking On Processes Use the “ps” command to examine processes Key columns in output listings PID process ID TIME program CPU time UID owning user TTY controlling terminal COMMAND command use to run process
Zahid Mehboob HAMDARD
15 UNIVERSITY Signals Signals are used to communicate with a running process – processes define how to react to signals – most signals ignored by default – some cause process termination – signals defined by name (or number) System administrations usually use signals to eliminate a process
Zahid Mehboob HAMDARD
16 UNIVERSITY Sending Signals Use the “kill” command to send signals
HUP (1) terminal hang up (power off)
KILL (9) kill immediately (process can not ignore and dies immediately)
Zahid Mehboob HAMDARD
17 UNIVERSITY The at Command Execute command at a specified time or run the commands on a batch queue – at time [date] [increments]
Commands are read from stdin
Zahid Mehboob HAMDARD
18 UNIVERSITY Module 5 System Startup & Shutdown Bootstrap Procedure Run Levels System Startup Files Shutdown Procedure
Zahid Mehboob HAMDARD
19 UNIVERSITY Standard Boot Process Linux loader (grub) resides in the MBR of the hard drive Loaded the Linux kernal starts running – initialize devices, virtual memory etc. – initialize internal tables (processes, files, etc) – create scheduler process (number 0) – run the first process (number 1) /sbin/init
Zahid Mehboob HAMDARD
20 UNIVERSITY Run Levels Run Levels are standard under Linux 0- power down level 1- administration mode 2- basic multi-user level 3- full multi-user mode with NFS & networking 4- not used 5- X11 mode logon and logoff from X prompt 6- halt & reboot Use “init” to change run levels if users not logged in Zahid Mehboob HAMDARD 21 UNIVERSITY Run Command Scripts The run command scripts invoked by init via /etc/inittab Each rc script in /etc/rc.d controls changes to named run level Each scripts runs startup programs in directory /etc/rc.d The scripts look in directories under /etc/rc.d/init.d for scripts to run for the required run level
Zahid Mehboob HAMDARD
22 UNIVERSITY Shutting down Use shutdown to close down the system – warns users what is happening – issues the init command shutdown –h now shutdown –h 10:00
Zahid Mehboob HAMDARD
23 UNIVERSITY Module 6 Login & Terminals Loggin on Terminal issues Getty & mingetty process
Zahid Mehboob HAMDARD
24 UNIVERSITY Logging into Linux Logging into Linux involves several stages 1. The connection with the port is established and login prompt issued – perform /sbin/mingetty – initialed by init from the inittab file 2. The username and password are obtained and verified – this is performed by the /bin/login program 3. The user’s login shell (from /etc/password) is invoked
Zahid Mehboob HAMDARD
25 UNIVERSITY Working with Terminals Use “ tty ” to identify the current port Use “ stty ” to examine port setting
Zahid Mehboob HAMDARD
26 UNIVERSITY Module 7 Device Management The /dev directory Device Interface Major & Minor Device Numbers Block & Character Devices Disk Slicing Information
Zahid Mehboob HAMDARD
27 UNIVERSITY The Devices Directory Devices defined in /dev when the system is installed – contains all possible devices – entry in /dev does not imply the device driver is in the kernal – without an entry in /dev,device is not accessible Linux device names are not standard – manufacturers have developed their own naming conventions – A few device names are standard (/dev/null, /dev/tty) Zahid Mehboob HAMDARD 28 UNIVERSITY Device Interface Devices interface through files – files kept in /dev & sub-directories Two types of devices – character devices with file type c – block devices with file type b Every device is defined by two numbers – major number is unique to each device driver – minor number identifies different devices controlled by the same controller
Zahid Mehboob HAMDARD
29 UNIVERSITY Useful Devices /dev/null null device /dev/tty pseudo (virtual) device for user’s login terminal /dev/console usual name for the system console /dev/ttynn directly connected terminals /dev/ptsnnn X-window and network pseudo terminals /dev/fd0 common name for floppy disk drive /dev/ftape link to tape drive /dev/hdx IDE disks /dev/sdx SCSI disks /dev/cdrom usually a link to CD-ROM drive /dev/lp0 parallel printer port
Zahid Mehboob HAMDARD
30 UNIVERSITY Module 8 File Systems File System Overview Monitoring Disks Making a File System File System Utilities
Zahid Mehboob HAMDARD
31 UNIVERSITY File System Types A file system type defines how the disk data is structured – ext2fs (2nd extended file system) standard across all linux distributions – all linux systems can include support for Microsoft’s FAT, FAT-32 & NTFS for use with DOS/Windows systems – also supports for OS/2 & NFS Use the “mkfs” command for making a file system Zahid Mehboob HAMDARD 32 UNIVERSITY Mounting a File System Use mount to add a file system to the tree structure – the root file system is mounted by the kernal at boot time – use the block device for mount File systems can be mounted onto any directory – directory is called the mount point – /mnt provided as standard temporary mount point Umount file systems using umount – Specify the mount point to umount
Zahid Mehboob HAMDARD
33 UNIVERSITY Module 15 Monitoring and Updating Process (CPU) activity Disk access (I/O) activity Memory Utilization Reconfigure the Kernal
Zahid Mehboob HAMDARD
34 UNIVERSITY CPU Process Reporter(top) Use “top” to monitor the system – can look at current system performance Collects data on cpu, memory etc.
Zahid Mehboob HAMDARD
35 UNIVERSITY Configuring Linux Kernel Parameters Three methods of configuration (cd/usr/src/linux) make config/menuconfig/xconfig Use “make” to build the kernal make clean remove old binaries make dep attach all necessary dependencies make zgrub compressed image & update grub make zimage make compressed image make bzimage if kernal is too big for compressed