SlideShare a Scribd company logo
UNIX OPERATING SYSTEM
- Ravi
www.etraining.guru
What is an Operating System ?
Definition: An Operating system (OS) is a collection of softwares
that manages computer hardware resources and provides
common services for computer programs. (as per Wikipedia!)
A simple definition - An Operating System is an interface between Hardware and User.
CircularView
HorizontalView
Examples of Operating Systems
DOS - Disk Operating System, a product of IBM. Not very user friendly!
Windows - A product of Microsoft. User friendliness through GUI
MacOS - Macintosh, a product of Apple. User friendliness through GUI
Unix - Originally CUI, now has GUI as well
Linux - Supports both CUI & GUI
If Windows is an OS, what are Windows 95, 98, ME, NT, 2000, XP, 7, and 8?
Similarly, Unix and Linux OS’s have various flavors/versions too. Lets first look at Unix Evolution …
Unix Evolution
“MULTI”cs
(MULTIplexed Information and Computing Service)
“UNI”X
By, Dennis Ritchie, Brain kernighan and Ken Thompson @AT&T Bell
Laboratories in early 1970's
Unix Evolution …
• Is the name of the family of operating systems
developed at Bell Laboratories around 1969.
• Was largely the creation of two programmers working
at Bell Laboratories, Ken Thompson and Brain
Kernighan.
• Was initially used in academic environments and
spread quickly to commercial environments also
• Has got 90% of it developed in ‘C’ language and, 10%
machine specific assembly code.
• Basic UNIX system occupies around 10 MB disk space
on PCs.
Unix Evolution …
Note: You can also call these Single Unix Specifications as POSIX - Portable Operating System Interface for UNIX
Unix Evolution …
Open source (vs) Closed Source (vs) Mixed source?
Unix Evolution …
Unix Evolution …
What is LINUX?
Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net. It
aims towards POSIX compliance.
Below are few popular Linux distributions:
• Debian - A non-commercial distribution maintained by a volunteer developer community with a
strong commitment to free s/w principles
• Ubuntu - A popular desktop and server distribution derived from Debian
• Fedora - A community distribution sponsored by American company Red Hat
• openSUSE - A community distribution mainly sponsored by American company Novell
• Mageia, Mint Linux, slackware, etc
Unix/Linux Main Features
Multitasking Capabilities
Multi-User Capabilities
Hierarchical Directory Structure
Security
Portability
UNIX Architecture
KernelShell
Tools &
Applications
H/W
UNIX Architecture …
Categorized as three levels:
• Kernel - Core/Heart of the Operating System
• Shell - User interface with Operating System
•Tools and Applications - Utilities and User Programs
Note: In detail, will be covered in later sections …
Dumb Terminals / Nodes
UNIX Server < --- > Terminals
Working in Unix Environment
Few things to remember …
Working in Unix is majorly through commands
Syntax: command option(s) filename(s)
You must type spaces between commands, options, and filenames
Unix is case sensitive
Unix has a lot of commands! Don’t try to byheart all of them
uname
Command Name: uname
Syntax: uname [option] …
Description: Print system information
Usage:
uname -a ==> Print all information
uname -s ==> Kernal name
uname -n ==> node name
uname -r ==> Kernal release
uname -o ==> operating system
uname -son ==> Kernal name + os + node name
uname -m ==> m/c hardware name
uname -i ==> Hardware platform
man
Command Name: man
Syntax: man [command]
Description: Online manual pages; In built google!
Usage:
man uname ==> to display “uname” manual pages
man man ==> to display “man” manual pages
Note: In manual pages, q is to quit/come back to command prompt.
“Space Bar” is to scroll to next page
User Related
• who – Shows who is logged on
• w – Shows who is logged on and what they are doing
• whoami – Effective userid
• who am i – details about the userid
PS: man –k who  searches for word who in all man
pages
Unix MISC commands
• tty – Displays the terminal id
• stty –a
Example: stty intr ^a (To use CTRL + a for interrupt)
• ifconfig – To get IP address
Example: /sbin/ifconfig | grep 'inet addr:'| grep -v
'127.0.0.1' | cut -d: -f2 | awk '{ print $1}‘
Unix MISC Commands
• cal
• banner
• clear
• alias
Date Command
• Gets/sets the date and time in the UNIX server
machine
• Some Options : %D, %T, %A, %B, %H, %d
• Examples
- $ date
- $ date +%D
- $ date +%T
- $ date +%d-%m-%Y
Date command contd…
• Setting system time: (Needs root permission)
Example: $date MMDDhhmmYYYY.ss
Where, MM – month
DD – day
YYYY – year
hh – hour is based on 24 hour
mm – minutes
ss – seconds
Before we move on to next concept …
uname
man
who
w
whoami
who am i
tty
ifconfig
cal
banner
stty
date
clear
alias
UNIX FILE SYSTEM
What is a filesystem?
A filesystem is a logical collection of files on a partition or disk. You can view
filesystems using df (or) bdf commands
Unix uses a hierarchical file system structure, much like an upside-down tree, with
root (/) at the base of the file system and all other directories spreading from there.
In Unix everything is a file - a stream of bytes. Unix treats documents, directories,
hard-drives, CD-Roms, modems, keyboards, printers, monitors, terminals, etc as
files.
For each file in the filesystem, UNIX stores administrative information in a
structure known as Inode (Index node).
ls -I /etc/passwd
stat /etc/passwd
•
Unix File system (tree) Structure
UNIX File System
3 types of files
• Ordinary - Under user control (Ex: Notepad/wordpad in windows)
•Directory - to hold list of files (like a folder in windows)
• Speical - For example, device drivers, raw devices, etc
File System Commands
• pwd Print Working Directory
• ls
• cd
• mkdir
• touch
ls – List directory contents
• Syntax: ls [OPTIONS] [FILE(s)]
Examples: ls –l Long Listing
ls –la to list hidden files
ls –ltr To list files based upon modified time
ls –l /home/cdctrg32/ravi/copyme (listing other user files)
Note: . is Current working directory, .. is Parent working directory
cd – Change Directory
• syntax: cd [options] [directory]
• Example: To go to root directory, cd /
• cd . (You will be in pwd)
•cd .. (One directory up)
• cd - (Changes to previous working directory)
• cd Enter (Changes to Home directory)
mkdir – create directories
• Syntax: mkdir [OPTIONS] [Directories] …
• Example: cd Enter (You will be placed in your home directory)
mkdir training (Creates a new training directory)
ls –l training (View recently created directory)
cd training (Now you will be placed in training directory)
pwd; ls (Bingo!!! No files created yet)
cp – copy files and directories
• Syntax: cp [OPTIONS] [SOURCE] [DEST] …
• Example: cd training;
cp /home/cdctrg32/ravi/copyme mycopy (file copy)
cp –R /home/cdctrg32/ravi/copy_dir . (directory copy)
mv – move/rename files
• Syntax: mv [OPTIONS] SOURCE DEST
• Example: cd training
mv mycopy mvcopy
ln – links b/w files
• Syntax: ln [OPTION] target dest
• Example: cd training
ln /home/cdctrg32/ravi/linkme linkme
• ls –l linkme
-rw-rw-r-- 2 cdctrg32 cdctrg32 49 Jul 21 22:49 linkme
Note: type “cat linkme”. The usage of cat will be covered in later
sessions
File Permissions
• ls –l filename will display as below:
-rw-rw-r-- 1 cdctrg32 cdctrg32 17 Jul 21 22:55 filename
Field 1: a set of ten permission flags.
Field 2: link count (don't worry about this)
Field 3: owner of the file
Field 4: associated group for the file
Field 5: size in bytes
Field 6-8: date of last modification (format varies, but always 3
fields)
Field 9: name of file
• Field 1: Contains 10 characters
1 - directory flag, 'd' if a directory, '-' if a normal file, something else
occasionally may appear here for special devices.
2,3,4 - read, write, execute permission for User (Owner) of file
5,6,7 - read, write, execute permission for Group
8,9,10 - read, write, execute permission for Other
• Permissions are set according to numbers. Read is 4. Write is 2.
Execute is 1. The sums of these numbers give combinations of
these permissions:
• 0 = no permissions whatsoever; this person cannot read,
write, orexecute the file
• 1 = execute only
• 2 = write only
• 3 = write and execute (1+2)
• 4 = read only
• 5 = read and execute (4+1)
• 6 = read and write (4+2)
• 7 = read and write and execute (4+2+1)
• The below file has 664 permissions
-rw-rw-r-- 1 cdctrg32 cdctrg32 17 Jul 21 22:55 filename
• To give write permission to other group users,
chmod 666 filename
• To take out permission from all other users: chmod 600 filename
• Note: id command tells the default group id
• Example: Can you cat the below file to see the contents of the file
cat /home/cdctrg32/ravi/passwords
• Nope. But why?
chgrp & chown
• chgrp NewGroupName File/Directoryname
• chown Newownername File/Directoryname
touch
• creates empty file
• changes the file timestamp
• Example: touch filename
Note: touch command is mostly used in system build time. But
how?
umask
• User file creation mode mask – 4 digit octal number that unix uses
to determine the file permission for newly created files
• (666 – umask) value is the default permissions
• Exercise: Change the umask value to 000 and create a new file.
more – less – head - tail
• cp /home/cdctrg32/ravi/largefile .;
• cat largefile (Bingo!!!)
• more – Forward only
• less - forward and backward movement
• head -10 largefile /* First 10 lines of the file */
• tail -10 largefile /* Last 10 lines of the file */ **To view Log Files**
• which <command> – Displays the path of the commands
• whereis <command> - More info than which
• whatis <command> - quick introduction about the command
• ldd – prints library dependencies
Example: ldd /bin/ls
• file <filename> - displays the file type
history command
• history – displays the history of typed commands
Usage: history 20
!! Repeats the last command
!number -> reruns the command given at the given line
• passwd – To change your password
Online Training in Unix Linux Shell Scripting in Hyderabad

More Related Content

What's hot

A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
Tusharadri Sarkar
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
Wave Digitech
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
Harish1983
 
Unix ppt
Unix pptUnix ppt
A beginners introduction to unix
A beginners introduction to unixA beginners introduction to unix
A beginners introduction to unix
zafarali1981
 
Techbuddy: Introduction to Linux session
Techbuddy: Introduction to Linux sessionTechbuddy: Introduction to Linux session
Techbuddy: Introduction to Linux session
Ashish Bhatia
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentalsDima Gomaa
 
QSpiders - Unix Operating Systems and Commands
QSpiders - Unix Operating Systems  and CommandsQSpiders - Unix Operating Systems  and Commands
QSpiders - Unix Operating Systems and Commands
Qspiders - Software Testing Training Institute
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
Ramasubbu .P
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to UnixSudharsan S
 
Linux commands
Linux commandsLinux commands
Linux commands
Mannu Khani
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
Rajesh Kumar
 
Linux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScITLinux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScIT
vignesh0009
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Linux commands
Linux commands Linux commands
Linux commands
debashis rout
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
Mohit Belwal
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
raj upadhyay
 
Unix
UnixUnix
Unix
Erm78
 

What's hot (20)

A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
 
Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013Unix Linux Commands Presentation 2013
Unix Linux Commands Presentation 2013
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Unix ppt
Unix pptUnix ppt
Unix ppt
 
A beginners introduction to unix
A beginners introduction to unixA beginners introduction to unix
A beginners introduction to unix
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Techbuddy: Introduction to Linux session
Techbuddy: Introduction to Linux sessionTechbuddy: Introduction to Linux session
Techbuddy: Introduction to Linux session
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
QSpiders - Unix Operating Systems and Commands
QSpiders - Unix Operating Systems  and CommandsQSpiders - Unix Operating Systems  and Commands
QSpiders - Unix Operating Systems and Commands
 
Linux Commands
Linux CommandsLinux Commands
Linux Commands
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Basic Unix
Basic UnixBasic Unix
Basic Unix
 
Linux basic commands tutorial
Linux basic commands tutorialLinux basic commands tutorial
Linux basic commands tutorial
 
Linux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScITLinux practicals T.Y.B.ScIT
Linux practicals T.Y.B.ScIT
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux commands
Linux commands Linux commands
Linux commands
 
Unix OS & Commands
Unix OS & CommandsUnix OS & Commands
Unix OS & Commands
 
Terminal Commands (Linux - ubuntu) (part-1)
Terminal Commands  (Linux - ubuntu) (part-1)Terminal Commands  (Linux - ubuntu) (part-1)
Terminal Commands (Linux - ubuntu) (part-1)
 
Unix
UnixUnix
Unix
 

Similar to Online Training in Unix Linux Shell Scripting in Hyderabad

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Chander Pandey
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
Rajesh Kumar
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
Mohammad Reza Beygi
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
Priyadarshini648418
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
VikrantSChohaan
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
RanjitKumarPanda5
 
Linux
LinuxLinux
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
Michael Olafusi
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
Anatoliy Okhotnikov
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
Nitesh Nayal
 
Introduction about linux
Introduction about linuxIntroduction about linux
Introduction about linux
ABHISHEK KUMAR
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
Prasanth V
 
Spsl unit1
Spsl   unit1Spsl   unit1
Spsl unit1
Sasidhar Kothuru
 
Unix environment [autosaved]
Unix environment [autosaved]Unix environment [autosaved]
Unix environment [autosaved]
Er Mittinpreet Singh
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux Kuldeep Tiwari
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
Rohit Sansiya
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
Deepak Upadhyay
 
Linux basic
Linux basicLinux basic
Linux basic
Pragyagupta37
 

Similar to Online Training in Unix Linux Shell Scripting in Hyderabad (20)

Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01Linuxtraining 130710022121-phpapp01
Linuxtraining 130710022121-phpapp01
 
Unix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptxUnix Shell Script - 2 Days Session.pptx
Unix Shell Script - 2 Days Session.pptx
 
Unix _linux_fundamentals_for_hpc-_b
Unix  _linux_fundamentals_for_hpc-_bUnix  _linux_fundamentals_for_hpc-_b
Unix _linux_fundamentals_for_hpc-_b
 
PowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programmingPowerPoint_merge.ppt on unix programming
PowerPoint_merge.ppt on unix programming
 
redhat_by_Cbitss.ppt
redhat_by_Cbitss.pptredhat_by_Cbitss.ppt
redhat_by_Cbitss.ppt
 
Linux Basics.pptx
Linux Basics.pptxLinux Basics.pptx
Linux Basics.pptx
 
Linux
LinuxLinux
Linux
 
UNIX/Linux training
UNIX/Linux trainingUNIX/Linux training
UNIX/Linux training
 
Linux introduction (eng)
Linux introduction (eng)Linux introduction (eng)
Linux introduction (eng)
 
3. intro
3. intro3. intro
3. intro
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
Introduction about linux
Introduction about linuxIntroduction about linux
Introduction about linux
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Spsl unit1
Spsl   unit1Spsl   unit1
Spsl unit1
 
Unix environment [autosaved]
Unix environment [autosaved]Unix environment [autosaved]
Unix environment [autosaved]
 
Presentation for RHCE in linux
Presentation  for  RHCE in linux Presentation  for  RHCE in linux
Presentation for RHCE in linux
 
cisco
ciscocisco
cisco
 
Linux: Everyting-as-a-service
Linux: Everyting-as-a-serviceLinux: Everyting-as-a-service
Linux: Everyting-as-a-service
 
Linux fundamentals
Linux fundamentalsLinux fundamentals
Linux fundamentals
 
Linux basic
Linux basicLinux basic
Linux basic
 

More from Ravikumar Nandigam

Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Ravikumar Nandigam
 
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Ravikumar Nandigam
 
2 db2 instance creation
2 db2 instance creation2 db2 instance creation
2 db2 instance creation
Ravikumar Nandigam
 
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
Ravikumar Nandigam
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
Ravikumar Nandigam
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
Ravikumar Nandigam
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guru
Ravikumar Nandigam
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
Ravikumar Nandigam
 
Netezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in IndiaNetezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in India
Ravikumar Nandigam
 

More from Ravikumar Nandigam (14)

Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
 
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in HyderabadOnline Training in IBM DB2 LUW/UDB DBA in Hyderabad
Online Training in IBM DB2 LUW/UDB DBA in Hyderabad
 
2 db2 instance creation
2 db2 instance creation2 db2 instance creation
2 db2 instance creation
 
2 db2 instance creation
2 db2 instance creation2 db2 instance creation
2 db2 instance creation
 
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
 
online training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBAonline training for IBM DB2 LUW UDB DBA
online training for IBM DB2 LUW UDB DBA
 
Course content (netezza dba)
Course content (netezza dba)Course content (netezza dba)
Course content (netezza dba)
 
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In HyderabadIBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
IBM DB2 LUW UDB DBA Online Training by Etraining Guru In Hyderabad
 
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guruIBM DB2 LUW/UDB DBA Training by www.etraining.guru
IBM DB2 LUW/UDB DBA Training by www.etraining.guru
 
IBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guruIBM DB2 LUW UDB DBA Training by www.etraining.guru
IBM DB2 LUW UDB DBA Training by www.etraining.guru
 
data loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.gurudata loading and unloading in IBM Netezza by www.etraining.guru
data loading and unloading in IBM Netezza by www.etraining.guru
 
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guruIBM DB2 LUW UDB DBA Online Training by Etraining.guru
IBM DB2 LUW UDB DBA Online Training by Etraining.guru
 
Netezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in IndiaNetezza Online Training by www.etraining.guru in India
Netezza Online Training by www.etraining.guru in India
 

Recently uploaded

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 

Online Training in Unix Linux Shell Scripting in Hyderabad

  • 1. UNIX OPERATING SYSTEM - Ravi www.etraining.guru
  • 2. What is an Operating System ? Definition: An Operating system (OS) is a collection of softwares that manages computer hardware resources and provides common services for computer programs. (as per Wikipedia!) A simple definition - An Operating System is an interface between Hardware and User. CircularView HorizontalView
  • 3. Examples of Operating Systems DOS - Disk Operating System, a product of IBM. Not very user friendly! Windows - A product of Microsoft. User friendliness through GUI MacOS - Macintosh, a product of Apple. User friendliness through GUI Unix - Originally CUI, now has GUI as well Linux - Supports both CUI & GUI If Windows is an OS, what are Windows 95, 98, ME, NT, 2000, XP, 7, and 8? Similarly, Unix and Linux OS’s have various flavors/versions too. Lets first look at Unix Evolution …
  • 4. Unix Evolution “MULTI”cs (MULTIplexed Information and Computing Service) “UNI”X By, Dennis Ritchie, Brain kernighan and Ken Thompson @AT&T Bell Laboratories in early 1970's
  • 5. Unix Evolution … • Is the name of the family of operating systems developed at Bell Laboratories around 1969. • Was largely the creation of two programmers working at Bell Laboratories, Ken Thompson and Brain Kernighan. • Was initially used in academic environments and spread quickly to commercial environments also • Has got 90% of it developed in ‘C’ language and, 10% machine specific assembly code. • Basic UNIX system occupies around 10 MB disk space on PCs.
  • 6. Unix Evolution … Note: You can also call these Single Unix Specifications as POSIX - Portable Operating System Interface for UNIX
  • 7. Unix Evolution … Open source (vs) Closed Source (vs) Mixed source?
  • 10. What is LINUX? Linux is a Unix clone written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX compliance. Below are few popular Linux distributions: • Debian - A non-commercial distribution maintained by a volunteer developer community with a strong commitment to free s/w principles • Ubuntu - A popular desktop and server distribution derived from Debian • Fedora - A community distribution sponsored by American company Red Hat • openSUSE - A community distribution mainly sponsored by American company Novell • Mageia, Mint Linux, slackware, etc
  • 11. Unix/Linux Main Features Multitasking Capabilities Multi-User Capabilities Hierarchical Directory Structure Security Portability
  • 13. UNIX Architecture … Categorized as three levels: • Kernel - Core/Heart of the Operating System • Shell - User interface with Operating System •Tools and Applications - Utilities and User Programs Note: In detail, will be covered in later sections …
  • 14. Dumb Terminals / Nodes UNIX Server < --- > Terminals
  • 15.
  • 16. Working in Unix Environment
  • 17. Few things to remember … Working in Unix is majorly through commands Syntax: command option(s) filename(s) You must type spaces between commands, options, and filenames Unix is case sensitive Unix has a lot of commands! Don’t try to byheart all of them
  • 18. uname Command Name: uname Syntax: uname [option] … Description: Print system information Usage: uname -a ==> Print all information uname -s ==> Kernal name uname -n ==> node name uname -r ==> Kernal release uname -o ==> operating system uname -son ==> Kernal name + os + node name uname -m ==> m/c hardware name uname -i ==> Hardware platform
  • 19. man Command Name: man Syntax: man [command] Description: Online manual pages; In built google! Usage: man uname ==> to display “uname” manual pages man man ==> to display “man” manual pages Note: In manual pages, q is to quit/come back to command prompt. “Space Bar” is to scroll to next page
  • 20. User Related • who – Shows who is logged on • w – Shows who is logged on and what they are doing • whoami – Effective userid • who am i – details about the userid PS: man –k who  searches for word who in all man pages
  • 21. Unix MISC commands • tty – Displays the terminal id • stty –a Example: stty intr ^a (To use CTRL + a for interrupt) • ifconfig – To get IP address Example: /sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}‘
  • 22. Unix MISC Commands • cal • banner • clear • alias
  • 23. Date Command • Gets/sets the date and time in the UNIX server machine • Some Options : %D, %T, %A, %B, %H, %d • Examples - $ date - $ date +%D - $ date +%T - $ date +%d-%m-%Y
  • 24. Date command contd… • Setting system time: (Needs root permission) Example: $date MMDDhhmmYYYY.ss Where, MM – month DD – day YYYY – year hh – hour is based on 24 hour mm – minutes ss – seconds
  • 25. Before we move on to next concept … uname man who w whoami who am i tty ifconfig cal banner stty date clear alias
  • 27. What is a filesystem? A filesystem is a logical collection of files on a partition or disk. You can view filesystems using df (or) bdf commands Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of the file system and all other directories spreading from there. In Unix everything is a file - a stream of bytes. Unix treats documents, directories, hard-drives, CD-Roms, modems, keyboards, printers, monitors, terminals, etc as files. For each file in the filesystem, UNIX stores administrative information in a structure known as Inode (Index node). ls -I /etc/passwd stat /etc/passwd
  • 28. • Unix File system (tree) Structure
  • 29. UNIX File System 3 types of files • Ordinary - Under user control (Ex: Notepad/wordpad in windows) •Directory - to hold list of files (like a folder in windows) • Speical - For example, device drivers, raw devices, etc
  • 30. File System Commands • pwd Print Working Directory • ls • cd • mkdir • touch
  • 31. ls – List directory contents • Syntax: ls [OPTIONS] [FILE(s)] Examples: ls –l Long Listing ls –la to list hidden files ls –ltr To list files based upon modified time ls –l /home/cdctrg32/ravi/copyme (listing other user files) Note: . is Current working directory, .. is Parent working directory
  • 32. cd – Change Directory • syntax: cd [options] [directory] • Example: To go to root directory, cd / • cd . (You will be in pwd) •cd .. (One directory up) • cd - (Changes to previous working directory) • cd Enter (Changes to Home directory)
  • 33. mkdir – create directories • Syntax: mkdir [OPTIONS] [Directories] … • Example: cd Enter (You will be placed in your home directory) mkdir training (Creates a new training directory) ls –l training (View recently created directory) cd training (Now you will be placed in training directory) pwd; ls (Bingo!!! No files created yet)
  • 34. cp – copy files and directories • Syntax: cp [OPTIONS] [SOURCE] [DEST] … • Example: cd training; cp /home/cdctrg32/ravi/copyme mycopy (file copy) cp –R /home/cdctrg32/ravi/copy_dir . (directory copy)
  • 35. mv – move/rename files • Syntax: mv [OPTIONS] SOURCE DEST • Example: cd training mv mycopy mvcopy
  • 36. ln – links b/w files • Syntax: ln [OPTION] target dest • Example: cd training ln /home/cdctrg32/ravi/linkme linkme • ls –l linkme -rw-rw-r-- 2 cdctrg32 cdctrg32 49 Jul 21 22:49 linkme Note: type “cat linkme”. The usage of cat will be covered in later sessions
  • 37. File Permissions • ls –l filename will display as below: -rw-rw-r-- 1 cdctrg32 cdctrg32 17 Jul 21 22:55 filename Field 1: a set of ten permission flags. Field 2: link count (don't worry about this) Field 3: owner of the file Field 4: associated group for the file Field 5: size in bytes Field 6-8: date of last modification (format varies, but always 3 fields) Field 9: name of file
  • 38. • Field 1: Contains 10 characters 1 - directory flag, 'd' if a directory, '-' if a normal file, something else occasionally may appear here for special devices. 2,3,4 - read, write, execute permission for User (Owner) of file 5,6,7 - read, write, execute permission for Group 8,9,10 - read, write, execute permission for Other
  • 39. • Permissions are set according to numbers. Read is 4. Write is 2. Execute is 1. The sums of these numbers give combinations of these permissions: • 0 = no permissions whatsoever; this person cannot read, write, orexecute the file • 1 = execute only • 2 = write only • 3 = write and execute (1+2) • 4 = read only • 5 = read and execute (4+1) • 6 = read and write (4+2) • 7 = read and write and execute (4+2+1)
  • 40. • The below file has 664 permissions -rw-rw-r-- 1 cdctrg32 cdctrg32 17 Jul 21 22:55 filename • To give write permission to other group users, chmod 666 filename • To take out permission from all other users: chmod 600 filename • Note: id command tells the default group id
  • 41. • Example: Can you cat the below file to see the contents of the file cat /home/cdctrg32/ravi/passwords • Nope. But why?
  • 42. chgrp & chown • chgrp NewGroupName File/Directoryname • chown Newownername File/Directoryname
  • 43. touch • creates empty file • changes the file timestamp • Example: touch filename Note: touch command is mostly used in system build time. But how?
  • 44. umask • User file creation mode mask – 4 digit octal number that unix uses to determine the file permission for newly created files • (666 – umask) value is the default permissions • Exercise: Change the umask value to 000 and create a new file.
  • 45. more – less – head - tail • cp /home/cdctrg32/ravi/largefile .; • cat largefile (Bingo!!!) • more – Forward only • less - forward and backward movement • head -10 largefile /* First 10 lines of the file */ • tail -10 largefile /* Last 10 lines of the file */ **To view Log Files**
  • 46. • which <command> – Displays the path of the commands • whereis <command> - More info than which • whatis <command> - quick introduction about the command • ldd – prints library dependencies Example: ldd /bin/ls • file <filename> - displays the file type
  • 47. history command • history – displays the history of typed commands Usage: history 20 !! Repeats the last command !number -> reruns the command given at the given line • passwd – To change your password

Editor's Notes

  1. Ravikumar Nandigam
  2. Circular View
  3. Similarly, Unix and Linux have various flavors/versions too. Lets first look at Unix Evolution …
  4. Dennis Ritchie and Ken Thompson @AT&amp;T Bell Laboratories in early 1970&amp;apos;s
  5. Note: You can also call these Single Unix Specifications as POSIX - Portable Operating System Interface for UNIX
  6. Open Source (vs) Closed Source (vs) Mixed Source
  7. Below are popular Linux distributions:
  8. Unix is a command based operating system
  9. Command Name: uname
  10. q is to quit/come back to command prompt. Tab is to scroll to next page
  11. Unix uses a hierarchical file system structure, much like an upside-down tree, with root (/) at the base of the file system and all other directories spreading from there.
  12. Unix Tree Structure