1.linux Basics PDF
1.linux Basics PDF
What is Linux?
Version of UNIX
Linus Torvalds – Creator of Linux
Open Source Operating System
Free Software
Source Code Available
A Multi-user, Multitasking, Multiprocessor OS
Fully-networked 32/64-Bit Unix-like Operating System
Coexists with other Operating Systems
GUI – KDE ,GNOME
Reference: http://en.wikipedia.org/wiki/History_of_Unix
What is Unix?
Initially, Named as “UNiplexed Information Computing System
(UNICS)”
00:00:00 Hours, Jan 1, 1970 is time zero for UNIX. It is also called as
epoch.
Reference: http://en.wikipedia.org/wiki/History_of_Unix
What is Linux?
A clone of UNIX, Developed in 1991 by Linus Torvalds, a
Finnish graduate student (It was his personal project)
Consist of
Linux Kernel
IBM PowerPC
Routers, GPS
Linux is everywhere
Check www.top500.org to know the power of Linux (June-2015 List)
Why Linux is everywhere?
Open, Free or Cheap
2. Ubuntu
3. Fedora
4. RHEL
5. CentOS
Open source and Free software
GPLs
GPLv1: 1989
Source code should be published with binary
Modified version of program is GPLv1 license
GPLv2: 1991
GPLv3: 2007
GNU GPL
GNU provides
Lot of tools, applications, libraries, …
Some License
Linux Distribution
Combination of Linux Kernel, GNU Tools, Other tools and
management tools
• Stability
– It is very rarely to see the Kernel Panic
• Free Software
– There is no any charge for software
• Applications
– Some applications have NOT equivalent in Linux
• Official Support
– Companies need official support
– No one is responsible for most Linux applications
Linux Operations as a server
DNS
DHCP
Web server
Application server
NTP
NFS
NIS
Database server
FTP Server
UNIX/Linux Structure
Linux File System
Details of File System
/ root directory
/boot files for booting system
/etc configuration files
/bin important system binaries
/sbin contains system admin programs(super user)
/usr user applications
/lib dynamic libraries
/home user home directories
/root super user home dir
/var contains variable data constantly generated when
system is running
/dev device files
Linux boot process
Bootstrapping (simplified version)
init
login login
BIOS
root=/dev/hda1
timeout=5
image=/boot/vmlinuz-2.6.20
label=Linux
read-only
other=/dev/hdb1
label=Windows
table=/dev/hdb
To install it
$ lilo
Edit /boot/grub/grub.conf
Boot Loaders – GRUB (cont)
/boot/grub/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-8.el5 ro root=LABEL=/
initrd /boot/initrd-2.6.18-8.el5.img
title Windows
rootnoverify (hd1,0)
chainloader +1
Kernel Initialization
A program itself
/vmlinuz or /boot/vmlinuz
Two-stage loading process
initrd (init RAM disk)
A transient root filesystem in RAM before a real root filesystem
is available
Eg. It is used to install file system modules into the kernel
The real root filesystem
Device detection and configuration
You tell the kernel what to expect
The kernel probes the H/W itself
Kernel threads creation
Eg. init (a user process)
Startup/Init Scripts
To reboot
$ shutdown -r now
$ reboot
$ init 6
To halt
$ shutdown -h now
$ halt
$ init 0
$ poweroff
Reboot & Shutdown (cont)
To shutdown gracefully
$ shutdown -h +15
“Shutdown in 15 mins”