SlideShare a Scribd company logo
SHELL AND ITS TYPES
IN LINUX
Prof. Neeraj Bhargava
Mrs. Shubha Chaturvedi
Department of Computer Science, School of Engineering & System Science
MDS University Ajmer, Rajasthan
Linux Shell
• Computer understand the language of 0's and
1's called binary language.
• In early days of computing, instruction are
provided using binary language, which is
difficult for all of us, to read and write.
• So in O/s there is special program called Shell.
• Shell accepts your instruction or commands in
English and translate it into computers native
binary language.
This is what Shell does for users
• It's environment provided for user interaction.
• Shell is an command language interpreter
that executes commands read from the
standard input device (keyboard) or from a
file.
• Linux may use one of the following most
popular shells (In MS-DOS, Shell name is
COMMAND.COM which is also used for same
purpose, but it's not as powerful as our Linux
Shells are!)
Different Types of Shells
• In UNIX there are two major types of shells:
1. The Bourne shell (includes sh, ksh, and bash)
2. The C shell (includes csh and tcsh)
• If you are using a Bourne-type shell, the
default prompt is the $ character.
• If you are using a C-type shell, the default
prompt is the % character.
The different types of Bourne shells as follow:
1. Bourne shell (sh)
2. Korn shell (ksh)
3. Bourne Again shell (bash)
4. POSIX shell (sh)
The different C-type shells follow:
1. C shell (csh)
2. TENEX/TOPS C shell (tcsh)
Types of Shells
• Any of the above shell reads command from user
(via Keyboard or Mouse) and tells Linux O/s what
users want.
• If we are giving commands from keyboard it is
called command line interface ( Usually in-front
of $ prompt. This prompt is depend upon your
shell and environment that you set or by your
System Administrator, therefore you may get
different prompt ).
• NOTE: To find your shell type following
command $ echo $SHELL
The Original Bourne Shell
• The original UNIX shell was written in the mid-1970s
by Stephen R. Bourne while he was at AT&T Bell Labs
in New Jersey.
• The Bourne shell was the first shell to appear on
UNIX systems, thus it is referred to as "the shell.“
• The Bourne shell is usually installed as /bin/sh on
most versions of UNIX. For this reason, it is the shell
of choice for writing scripts to use on several
different versions of UNIX.
Features of Bourne Shell
In addition to being a command interpreter, the
Bourne shell is a powerful language with a
programming syntax similar to that of the ALGOL
language. Features of the original Bourne shell :
1. Process control
2. Variables
3. Regular expressions
4. Flow control and Loops
5. Powerful input and output controls
6. Functions
Drawbacks of Bourne shell
Drawbacks of the original Bourne shell is that
it is hard to use interactively.
1. No file name completion
2. No command history or command editing
3. Difficulty in executing multiple background
processes or jobs
The C Shell
• Bill Joy developed the C shell while he was at the
University of California at Berkeley in the early 1980s.
• It was designed to make interactive use of the shell
easier for users.
• Another design goal was to change the syntax of the
shell from the Bourne shell's older ALGOL style to the
newer C style.
• The C language style of the C shell was intended as an
improvement because the C language was familiar to
the programmers working on UNIX at Berkeley.
• The idea was that a shell that used C language style
syntax would be easier to write scripts in than a shell
that used the ALGOL style syntax.
Drawbacks of C Shell
The C shell could not be used for much more
than the most trivial scripts. Some of the
major drawbacks are :
1. Weak input and output controls
2. Lack of functions
3. Confusing syntax due to a "lazy" command
interpreter.
Features of C Shell
Although the C shell did not catch on for scripts, it has become
extremely popular for interactive use. Some this popularity follow:
1. Command History. You can recall commands you previously executed
for re- execution. You can also edit the command before it is re-
executed.
2. Aliases. You can create short mnemonic names for commands.
Aliases are a simplified form of the Bourne shell functions.
3. File Name Completion. You can have the C shell automatically
complete a filename by just typing a few characters of the file's
name.
4. Job Controls. The C shell enables you to execute multiple processes
and control them using the jobs command.
The C shell is usually installed on most systems as /bin/csh.
The TENEX/TOPS C shell, tcsh, is a newer version of the C shell
that enables you to scroll through the command history using the up
and down arrow keys.
Korn shell
• David Korn of AT&T Bell Labs wrote the Korn
shell, ksh, which incorporates all the C shell's
interactive features into the Bourne shell's
syntax.
• In recent years, most vendors have started to
ship the Korn shell with their versions of UNIX.
• Usually you will find it installed as /bin/ksh or
/usr/bin/ksh.
Features of Korn shell
Features that the Korn shell brings to the
Bourne shell include the following:
• Command history and history substitution
• Command aliases and functions
• File name completion
• Arrays
• Built-in integer arithmetic
There are 3 major versions of ksh available:
• The Official version (ksh) :The Official version
is available in binary format (no sources).
• The Public Domain version (pdksh): The Public
Domain version is available in both binary and
source format
• The Desktop version (dtksh) :The Desktop
version provides the capability to create and
display Graphical User Interfaces (GUIs) using
ksh syntax.
POSIX shell
• The POSIX shell is another variant of the Korn
shell.
• Currently, the only major vendor shipping the
POSIX shell is Hewlett-Packard.
• In HP-UX 11.0 (Hewlett Packard Unix), the
POSIX shell is installed as /bin/sh. The Bourne
shell is installed as /usr/old/bin/sh.
The Bourne Again Shell
• The Bourne Again shell, bash, was developed as part of the
GNU project and has replaced the Bourne shell, sh, for
GNU-based systems like Linux.
• All major Linux distributions, including Red Hat, Slackware,
and Caldera, ship with bash as their sh replacement.
• Although it includes C shell (csh and tcsh) and Korn shell
(ksh) features, bash retains syntax compatibility with the
Bourne shell, enabling it to run almost all Bourne shell
scripts.
• bash was written by Brian Fox of the Free Software
Foundation and is currently maintained by Chester Ramey
of Case Western Reserve University.
• Because bash is an implementation of the IEEE
POSIX 1003.2/ISO 9945.2 Shell and Tools
specification, it is extremely portable and can
be built on most UNIX systems.
• It has also been ported to QNX, Minix, OS/2,
and Windows 95/NT. Currently, only Linux
ships with the Bourne Again shell. It is
installed as /bin/bash. On most Linux systems,
it is also installed as /bin/sh.
Features of the Bourne Again Shell
• Some features that bash includes in addition to
those of the Korn shell are :
• Name completion for variable names, usernames,
host names, commands, and filenames
• Spelling correction for pathnames in the cd
command
• Arrays of unlimited size
• Integer arithmetic in any base between 2 and 64
Ad

More Related Content

What's hot (20)

Unix ppt
Unix pptUnix ppt
Unix ppt
sudhir saurav
 
Linux ppt
Linux pptLinux ppt
Linux ppt
lincy21
 
Linux security
Linux securityLinux security
Linux security
trilokchandra prakash
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
Ashita Agrawal
 
Kernels and its types
Kernels and its typesKernels and its types
Kernels and its types
ARAVIND18MCS1004
 
Architecture of Linux
 Architecture of Linux Architecture of Linux
Architecture of Linux
SHUBHA CHATURVEDI
 
Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
Emertxe Information Technologies Pvt Ltd
 
UNIX Operating System ppt
UNIX Operating System pptUNIX Operating System ppt
UNIX Operating System ppt
OECLIB Odisha Electronics Control Library
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
Stephen Ahiante
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
Nishant Munjal
 
Linux basics
Linux basicsLinux basics
Linux basics
Santosh Khadsare
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
Vibrant Technologies & Computers
 
Linux operating system ppt
Linux operating system pptLinux operating system ppt
Linux operating system ppt
Achyut Sinha
 
Unix File System
Unix File SystemUnix File System
Unix File System
student(MCA)
 
Architecture of operating system
Architecture of operating systemArchitecture of operating system
Architecture of operating system
Supriya Kumari
 
Operating system components
Operating system componentsOperating system components
Operating system components
Syed Zaid Irshad
 
Memory management
Memory managementMemory management
Memory management
Rajni Sirohi
 
Unix operating system
Unix operating systemUnix operating system
Unix operating system
ABhay Panchal
 
Virtual machine
Virtual machineVirtual machine
Virtual machine
Nikunj Dhameliya
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
Harshith Meela
 

Similar to Shell and its types in LINUX (20)

Bash vs C Shell vs Korn Shell | Edureka
Bash vs C Shell vs Korn Shell | EdurekaBash vs C Shell vs Korn Shell | Edureka
Bash vs C Shell vs Korn Shell | Edureka
Edureka!
 
2
22
2
Gaurang Pachani
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
Anu Chaudhry
 
Licão 02 shell basics bash intro
Licão 02 shell basics bash introLicão 02 shell basics bash intro
Licão 02 shell basics bash intro
Acácio Oliveira
 
Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02
Ben Mohammed Esskhayri
 
Redirection of output and input in unix/linux
Redirection of output and input in unix/linuxRedirection of output and input in unix/linux
Redirection of output and input in unix/linux
Panu Ausavasereelert
 
Introduction to Shell Scripting: All About It
Introduction to Shell Scripting: All About ItIntroduction to Shell Scripting: All About It
Introduction to Shell Scripting: All About It
Qubited
 
Shell Basics
Shell BasicsShell Basics
Shell Basics
Shilpi Goel
 
Programming_Under_Unix_Chapter1 (1).pptx
Programming_Under_Unix_Chapter1 (1).pptxProgramming_Under_Unix_Chapter1 (1).pptx
Programming_Under_Unix_Chapter1 (1).pptx
sufiankedir156
 
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptxProgramming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
sufiankedir156
 
BWU_BTA_22_508_cSd how os are implemented.pptx
BWU_BTA_22_508_cSd how os are implemented.pptxBWU_BTA_22_508_cSd how os are implemented.pptx
BWU_BTA_22_508_cSd how os are implemented.pptx
Venom789
 
Bn1025 demo basic unix
Bn1025 demo  basic unixBn1025 demo  basic unix
Bn1025 demo basic unix
conline training
 
The Shell Game Part 2: What are your shell choices?
The Shell Game Part 2: What are your shell choices?The Shell Game Part 2: What are your shell choices?
The Shell Game Part 2: What are your shell choices?
Kevin OBrien
 
linux and shell programming for information.pptx
linux and shell programming for information.pptxlinux and shell programming for information.pptx
linux and shell programming for information.pptx
PanjatcharamVg
 
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrrLINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
0710harish
 
Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
Emertxe Information Technologies Pvt Ltd
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
VIKAS TIWARI
 
Linux notes
Linux notesLinux notes
Linux notes
Teja Bheemanapally
 
Linux forensics
Linux forensicsLinux forensics
Linux forensics
Santosh Khadsare
 
UnixShells.ppt
UnixShells.pptUnixShells.ppt
UnixShells.ppt
EduardoGutierrez111076
 
Bash vs C Shell vs Korn Shell | Edureka
Bash vs C Shell vs Korn Shell | EdurekaBash vs C Shell vs Korn Shell | Edureka
Bash vs C Shell vs Korn Shell | Edureka
Edureka!
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
Anu Chaudhry
 
Licão 02 shell basics bash intro
Licão 02 shell basics bash introLicão 02 shell basics bash intro
Licão 02 shell basics bash intro
Acácio Oliveira
 
Redirection of output and input in unix/linux
Redirection of output and input in unix/linuxRedirection of output and input in unix/linux
Redirection of output and input in unix/linux
Panu Ausavasereelert
 
Introduction to Shell Scripting: All About It
Introduction to Shell Scripting: All About ItIntroduction to Shell Scripting: All About It
Introduction to Shell Scripting: All About It
Qubited
 
Programming_Under_Unix_Chapter1 (1).pptx
Programming_Under_Unix_Chapter1 (1).pptxProgramming_Under_Unix_Chapter1 (1).pptx
Programming_Under_Unix_Chapter1 (1).pptx
sufiankedir156
 
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptxProgramming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
Programming_Chapter1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.pptx
sufiankedir156
 
BWU_BTA_22_508_cSd how os are implemented.pptx
BWU_BTA_22_508_cSd how os are implemented.pptxBWU_BTA_22_508_cSd how os are implemented.pptx
BWU_BTA_22_508_cSd how os are implemented.pptx
Venom789
 
The Shell Game Part 2: What are your shell choices?
The Shell Game Part 2: What are your shell choices?The Shell Game Part 2: What are your shell choices?
The Shell Game Part 2: What are your shell choices?
Kevin OBrien
 
linux and shell programming for information.pptx
linux and shell programming for information.pptxlinux and shell programming for information.pptx
linux and shell programming for information.pptx
PanjatcharamVg
 
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrrLINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
0710harish
 
Bash shell scripting
Bash shell scriptingBash shell scripting
Bash shell scripting
VIKAS TIWARI
 
Ad

More from SHUBHA CHATURVEDI (20)

Unix and its Components
Unix and its ComponentsUnix and its Components
Unix and its Components
SHUBHA CHATURVEDI
 
Linux Advantages and Disadvantages
Linux Advantages and DisadvantagesLinux Advantages and Disadvantages
Linux Advantages and Disadvantages
SHUBHA CHATURVEDI
 
Linux Features
Linux FeaturesLinux Features
Linux Features
SHUBHA CHATURVEDI
 
Introduction and history of linux
Introduction and history of linuxIntroduction and history of linux
Introduction and history of linux
SHUBHA CHATURVEDI
 
Block Cipher and Operation Modes
Block Cipher  and Operation Modes Block Cipher  and Operation Modes
Block Cipher and Operation Modes
SHUBHA CHATURVEDI
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Stream Ciphers
Stream CiphersStream Ciphers
Stream Ciphers
SHUBHA CHATURVEDI
 
Symmetric Key Algorithm
Symmetric Key AlgorithmSymmetric Key Algorithm
Symmetric Key Algorithm
SHUBHA CHATURVEDI
 
Product Cipher
Product CipherProduct Cipher
Product Cipher
SHUBHA CHATURVEDI
 
Transposition cipher techniques
Transposition cipher techniquesTransposition cipher techniques
Transposition cipher techniques
SHUBHA CHATURVEDI
 
Polygraphic Substitution Cipher - Part 2
Polygraphic Substitution Cipher  - Part 2Polygraphic Substitution Cipher  - Part 2
Polygraphic Substitution Cipher - Part 2
SHUBHA CHATURVEDI
 
Polygraphic Substitution Cipher -Part 1
Polygraphic Substitution Cipher  -Part 1Polygraphic Substitution Cipher  -Part 1
Polygraphic Substitution Cipher -Part 1
SHUBHA CHATURVEDI
 
Homophonic Substitution Cipher
Homophonic Substitution CipherHomophonic Substitution Cipher
Homophonic Substitution Cipher
SHUBHA CHATURVEDI
 
Polyalphabetic Substitution Cipher
Polyalphabetic Substitution CipherPolyalphabetic Substitution Cipher
Polyalphabetic Substitution Cipher
SHUBHA CHATURVEDI
 
Monoalphabetic Substitution Cipher
Monoalphabetic Substitution  CipherMonoalphabetic Substitution  Cipher
Monoalphabetic Substitution Cipher
SHUBHA CHATURVEDI
 
Classical encryption techniques
Classical encryption  techniquesClassical encryption  techniques
Classical encryption techniques
SHUBHA CHATURVEDI
 
Types of attack -Part3 (Malware Part -2)
Types of attack -Part3 (Malware Part -2)Types of attack -Part3 (Malware Part -2)
Types of attack -Part3 (Malware Part -2)
SHUBHA CHATURVEDI
 
CLASSICAL ENCRYPTION TECHNIQUE- PART 1
CLASSICAL ENCRYPTION TECHNIQUE- PART 1CLASSICAL ENCRYPTION TECHNIQUE- PART 1
CLASSICAL ENCRYPTION TECHNIQUE- PART 1
SHUBHA CHATURVEDI
 
CONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTIONCONVENTIONAL ENCRYPTION
CONVENTIONAL ENCRYPTION
SHUBHA CHATURVEDI
 
CRYPTOGRAPHY
CRYPTOGRAPHYCRYPTOGRAPHY
CRYPTOGRAPHY
SHUBHA CHATURVEDI
 
Linux Advantages and Disadvantages
Linux Advantages and DisadvantagesLinux Advantages and Disadvantages
Linux Advantages and Disadvantages
SHUBHA CHATURVEDI
 
Introduction and history of linux
Introduction and history of linuxIntroduction and history of linux
Introduction and history of linux
SHUBHA CHATURVEDI
 
Block Cipher and Operation Modes
Block Cipher  and Operation Modes Block Cipher  and Operation Modes
Block Cipher and Operation Modes
SHUBHA CHATURVEDI
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design Principles
SHUBHA CHATURVEDI
 
Transposition cipher techniques
Transposition cipher techniquesTransposition cipher techniques
Transposition cipher techniques
SHUBHA CHATURVEDI
 
Polygraphic Substitution Cipher - Part 2
Polygraphic Substitution Cipher  - Part 2Polygraphic Substitution Cipher  - Part 2
Polygraphic Substitution Cipher - Part 2
SHUBHA CHATURVEDI
 
Polygraphic Substitution Cipher -Part 1
Polygraphic Substitution Cipher  -Part 1Polygraphic Substitution Cipher  -Part 1
Polygraphic Substitution Cipher -Part 1
SHUBHA CHATURVEDI
 
Homophonic Substitution Cipher
Homophonic Substitution CipherHomophonic Substitution Cipher
Homophonic Substitution Cipher
SHUBHA CHATURVEDI
 
Polyalphabetic Substitution Cipher
Polyalphabetic Substitution CipherPolyalphabetic Substitution Cipher
Polyalphabetic Substitution Cipher
SHUBHA CHATURVEDI
 
Monoalphabetic Substitution Cipher
Monoalphabetic Substitution  CipherMonoalphabetic Substitution  Cipher
Monoalphabetic Substitution Cipher
SHUBHA CHATURVEDI
 
Classical encryption techniques
Classical encryption  techniquesClassical encryption  techniques
Classical encryption techniques
SHUBHA CHATURVEDI
 
Types of attack -Part3 (Malware Part -2)
Types of attack -Part3 (Malware Part -2)Types of attack -Part3 (Malware Part -2)
Types of attack -Part3 (Malware Part -2)
SHUBHA CHATURVEDI
 
CLASSICAL ENCRYPTION TECHNIQUE- PART 1
CLASSICAL ENCRYPTION TECHNIQUE- PART 1CLASSICAL ENCRYPTION TECHNIQUE- PART 1
CLASSICAL ENCRYPTION TECHNIQUE- PART 1
SHUBHA CHATURVEDI
 
Ad

Recently uploaded (20)

LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
LDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini UpdatesLDMMIA Reiki Master Spring 2025 Mini Updates
LDMMIA Reiki Master Spring 2025 Mini Updates
LDM Mia eStudios
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Quality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdfQuality Contril Analysis of Containers.pdf
Quality Contril Analysis of Containers.pdf
Dr. Bindiya Chauhan
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Presentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem KayaPresentation of the MIPLM subject matter expert Erdem Kaya
Presentation of the MIPLM subject matter expert Erdem Kaya
MIPLM
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 

Shell and its types in LINUX

  • 1. SHELL AND ITS TYPES IN LINUX Prof. Neeraj Bhargava Mrs. Shubha Chaturvedi Department of Computer Science, School of Engineering & System Science MDS University Ajmer, Rajasthan
  • 2. Linux Shell • Computer understand the language of 0's and 1's called binary language. • In early days of computing, instruction are provided using binary language, which is difficult for all of us, to read and write. • So in O/s there is special program called Shell. • Shell accepts your instruction or commands in English and translate it into computers native binary language.
  • 3. This is what Shell does for users
  • 4. • It's environment provided for user interaction. • Shell is an command language interpreter that executes commands read from the standard input device (keyboard) or from a file. • Linux may use one of the following most popular shells (In MS-DOS, Shell name is COMMAND.COM which is also used for same purpose, but it's not as powerful as our Linux Shells are!)
  • 5. Different Types of Shells • In UNIX there are two major types of shells: 1. The Bourne shell (includes sh, ksh, and bash) 2. The C shell (includes csh and tcsh) • If you are using a Bourne-type shell, the default prompt is the $ character. • If you are using a C-type shell, the default prompt is the % character.
  • 6. The different types of Bourne shells as follow: 1. Bourne shell (sh) 2. Korn shell (ksh) 3. Bourne Again shell (bash) 4. POSIX shell (sh) The different C-type shells follow: 1. C shell (csh) 2. TENEX/TOPS C shell (tcsh)
  • 8. • Any of the above shell reads command from user (via Keyboard or Mouse) and tells Linux O/s what users want. • If we are giving commands from keyboard it is called command line interface ( Usually in-front of $ prompt. This prompt is depend upon your shell and environment that you set or by your System Administrator, therefore you may get different prompt ). • NOTE: To find your shell type following command $ echo $SHELL
  • 9. The Original Bourne Shell • The original UNIX shell was written in the mid-1970s by Stephen R. Bourne while he was at AT&T Bell Labs in New Jersey. • The Bourne shell was the first shell to appear on UNIX systems, thus it is referred to as "the shell.“ • The Bourne shell is usually installed as /bin/sh on most versions of UNIX. For this reason, it is the shell of choice for writing scripts to use on several different versions of UNIX.
  • 10. Features of Bourne Shell In addition to being a command interpreter, the Bourne shell is a powerful language with a programming syntax similar to that of the ALGOL language. Features of the original Bourne shell : 1. Process control 2. Variables 3. Regular expressions 4. Flow control and Loops 5. Powerful input and output controls 6. Functions
  • 11. Drawbacks of Bourne shell Drawbacks of the original Bourne shell is that it is hard to use interactively. 1. No file name completion 2. No command history or command editing 3. Difficulty in executing multiple background processes or jobs
  • 12. The C Shell • Bill Joy developed the C shell while he was at the University of California at Berkeley in the early 1980s. • It was designed to make interactive use of the shell easier for users. • Another design goal was to change the syntax of the shell from the Bourne shell's older ALGOL style to the newer C style. • The C language style of the C shell was intended as an improvement because the C language was familiar to the programmers working on UNIX at Berkeley. • The idea was that a shell that used C language style syntax would be easier to write scripts in than a shell that used the ALGOL style syntax.
  • 13. Drawbacks of C Shell The C shell could not be used for much more than the most trivial scripts. Some of the major drawbacks are : 1. Weak input and output controls 2. Lack of functions 3. Confusing syntax due to a "lazy" command interpreter.
  • 14. Features of C Shell Although the C shell did not catch on for scripts, it has become extremely popular for interactive use. Some this popularity follow: 1. Command History. You can recall commands you previously executed for re- execution. You can also edit the command before it is re- executed. 2. Aliases. You can create short mnemonic names for commands. Aliases are a simplified form of the Bourne shell functions. 3. File Name Completion. You can have the C shell automatically complete a filename by just typing a few characters of the file's name. 4. Job Controls. The C shell enables you to execute multiple processes and control them using the jobs command. The C shell is usually installed on most systems as /bin/csh. The TENEX/TOPS C shell, tcsh, is a newer version of the C shell that enables you to scroll through the command history using the up and down arrow keys.
  • 15. Korn shell • David Korn of AT&T Bell Labs wrote the Korn shell, ksh, which incorporates all the C shell's interactive features into the Bourne shell's syntax. • In recent years, most vendors have started to ship the Korn shell with their versions of UNIX. • Usually you will find it installed as /bin/ksh or /usr/bin/ksh.
  • 16. Features of Korn shell Features that the Korn shell brings to the Bourne shell include the following: • Command history and history substitution • Command aliases and functions • File name completion • Arrays • Built-in integer arithmetic
  • 17. There are 3 major versions of ksh available: • The Official version (ksh) :The Official version is available in binary format (no sources). • The Public Domain version (pdksh): The Public Domain version is available in both binary and source format • The Desktop version (dtksh) :The Desktop version provides the capability to create and display Graphical User Interfaces (GUIs) using ksh syntax.
  • 18. POSIX shell • The POSIX shell is another variant of the Korn shell. • Currently, the only major vendor shipping the POSIX shell is Hewlett-Packard. • In HP-UX 11.0 (Hewlett Packard Unix), the POSIX shell is installed as /bin/sh. The Bourne shell is installed as /usr/old/bin/sh.
  • 19. The Bourne Again Shell • The Bourne Again shell, bash, was developed as part of the GNU project and has replaced the Bourne shell, sh, for GNU-based systems like Linux. • All major Linux distributions, including Red Hat, Slackware, and Caldera, ship with bash as their sh replacement. • Although it includes C shell (csh and tcsh) and Korn shell (ksh) features, bash retains syntax compatibility with the Bourne shell, enabling it to run almost all Bourne shell scripts. • bash was written by Brian Fox of the Free Software Foundation and is currently maintained by Chester Ramey of Case Western Reserve University.
  • 20. • Because bash is an implementation of the IEEE POSIX 1003.2/ISO 9945.2 Shell and Tools specification, it is extremely portable and can be built on most UNIX systems. • It has also been ported to QNX, Minix, OS/2, and Windows 95/NT. Currently, only Linux ships with the Bourne Again shell. It is installed as /bin/bash. On most Linux systems, it is also installed as /bin/sh.
  • 21. Features of the Bourne Again Shell • Some features that bash includes in addition to those of the Korn shell are : • Name completion for variable names, usernames, host names, commands, and filenames • Spelling correction for pathnames in the cd command • Arrays of unlimited size • Integer arithmetic in any base between 2 and 64