SlideShare a Scribd company logo
The Shell Game 2



         Kevin O'Brien
Washtenaw Linux Users Group
   http://www.lugwash.org
Varieties of Shell
●   In Linux, you always have choices, whether
    you like it or not ☺
●   With shells you have choices
●   The Bourne-Again Shell (bash) is most likely
    the default you have on your system now
●   But you can use others as well
Why use different shells?
●   Like any other choice, you would select
    different shells because they have special
    capabilities you want to make use of
●   They may have special commands, or use
    less resources, or maybe you just feel more
    comfortable with one shell rather than another
Bourne shell (sh)
●   The original Unix shell
●   Written by Stephen Bourne at Bell Labs in
    1974
●   A simple shell, with small size and few
    features
●   Every Unix-like system either has sh, or has a
    shell that incorporates everything in sh
Bourne-Again Shell (bash)
●   The default for all Linux systems
●   Also runs on virtually all Unix-like systems,
    and there is even a version available for
    Windows
●   Bash is a superset of sh, that is, it
    incorporates everything that is in sh, but then
    adds to it
●   It is very flexible, and a good choice for
    beginners. The rest of this series will use bash
    to illustrate using a shell.
Almquist Shell (ash)
●   Basically a clone of sh
●   Very small memory requirements
●   Thus it is useful for small embedded systems
C Shell (csh)
●   Created by Bill Joy while he was at UC
    Berkeley
●   Syntax very similar to the C programming
    language
Korn shell (ksh)
●   Developed by David Korn at Bell Labs in 1983
●   Superset of SH, with many features of the C
    Shell as well
●   Advanced scripting capabilities similar to what
    is in awk, sed, and perl
TENEX C Shell (tcsh)
●   Based on C Shell
●   Adds features not found in C Shell
●   Now the default shell on some BSD systems
    (FreeBSD and Darwin)
Z Shell
●   Written by Paul Falstad around 1990
●   Simlar to ksh, but has features from csh as
    well
●   Attempt to use the programmability of the ksh
    with csh features
You can choose
●   You can make a temporary switch of your
    shell
●   Or you can change the default if you find one
    you like better
Temporary switch
●   A shell is an executable file (everything in
    Linux is a file)
●   So you just run it
●   For example, to change to the original Bourne
    shell, just type “sh” at the prompt
●   To go back to the Bourne-Again shell, just
    type “bash” at the prompt
●   When you change, notice that the prompt itself
    looks different
Changing the default 1
●   Suppose you find a shell you like better, and
    you want that to be the shell you always want
    to see when you boot up your computer
●   First, find out the full path of the shell, i.e.,
    what is the full path, starting from the root, to
    the executable file that contains the shell
●   To get clues, open up /etc/shells and
    etc/passwd
●   For example, bash is usually /bin/bash
Changing the Default 2
●   Once you know the full path to the shell you
    now want to be the default, use the change
    shell command (chsh)
●   This will open a brief dialog to make the
    change, and will ask you for your password to
    authorize it
Whose shell is this, anyway?
●   One thing you need to remember is that the
    choice of shell is only being made for the
    person logged in
●   You could have multiple users on a system,
    and have each one make their own shell
    choice
●   Tip: always try out a shell temporarily before
    making a permanent change

More Related Content

PDF
The Shell Game Part 1: What is a shell?
PDF
ODP
Multicore
ODP
Linux logging
PPTX
Containers - Cloud Phoenix March Meetup
PDF
Introduction to Docker
ODP
Virtualization with qemu-kvm and libvirt on openSUSE 42.2
The Shell Game Part 1: What is a shell?
Multicore
Linux logging
Containers - Cloud Phoenix March Meetup
Introduction to Docker
Virtualization with qemu-kvm and libvirt on openSUSE 42.2

What's hot (20)

PPTX
VirtualOS-using-Qemu
PPTX
Creating VM for pfsense
PDF
Scale2013
PPTX
Introduction to Docker
PDF
Top Lightweight Linux Distros
PPTX
Virtual Machine LAMP on Windows
PPT
Linux Backup System using rsync, tar, gzip
PDF
Docker 入門 Introduction to Docker
PDF
LUG - Install Fest 2008
DOCX
Linux server backup solution
PDF
Deep dive-oz
PDF
Unix is my IDE
PDF
ODP
Os Bernier
PPT
An overview of OpenVZ virtualization technology
ODP
Desktop Application In Linux
PPTX
Making the Move to Linux from an Enterprise Perspective
PDF
How To Setup NVIDIA CUDA Drvier on Ubuntu
PPTX
Docker techzone
PPTX
Libusb
VirtualOS-using-Qemu
Creating VM for pfsense
Scale2013
Introduction to Docker
Top Lightweight Linux Distros
Virtual Machine LAMP on Windows
Linux Backup System using rsync, tar, gzip
Docker 入門 Introduction to Docker
LUG - Install Fest 2008
Linux server backup solution
Deep dive-oz
Unix is my IDE
Os Bernier
An overview of OpenVZ virtualization technology
Desktop Application In Linux
Making the Move to Linux from an Enterprise Perspective
How To Setup NVIDIA CUDA Drvier on Ubuntu
Docker techzone
Libusb
Ad

Similar to The Shell Game Part 2: What are your shell choices? (20)

PPT
Shell and its types in LINUX
PPTX
Licão 02 shell basics bash intro
PDF
The Shell Game Part 3: Introduction to Bash
PPTX
shell script programming introduction and fundamentals
PPT
Shell Scripting in Linux
PPTX
Licão 05 scripts exemple
PDF
Course 102: Lecture 10: Learning About the Shell
PDF
Unixshellscript 100406085942-phpapp02
PPT
UnixShells.pptfhfehrguryhdruiygfjtfgrfjht
PPT
UnixShells.ppt
PDF
Linux Directory Structure
PPTX
PDF
Unix Shell Scripting
PPT
linux minimal os tutorial - by shatrix
PPT
Shell_Scripting.ppt
PDF
Linux systems - Getting started with setting up and embedded platform
PDF
Lightweight Virtualization: LXC containers & AUFS
PPTX
Redirection of output and input in unix/linux
PDF
Improve Command Line Productivity - RHCSA (RH134).pdf
PPTX
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
Shell and its types in LINUX
Licão 02 shell basics bash intro
The Shell Game Part 3: Introduction to Bash
shell script programming introduction and fundamentals
Shell Scripting in Linux
Licão 05 scripts exemple
Course 102: Lecture 10: Learning About the Shell
Unixshellscript 100406085942-phpapp02
UnixShells.pptfhfehrguryhdruiygfjtfgrfjht
UnixShells.ppt
Linux Directory Structure
Unix Shell Scripting
linux minimal os tutorial - by shatrix
Shell_Scripting.ppt
Linux systems - Getting started with setting up and embedded platform
Lightweight Virtualization: LXC containers & AUFS
Redirection of output and input in unix/linux
Improve Command Line Productivity - RHCSA (RH134).pdf
LINUX (1).pptxtytyyyyyyuuuuuuuuuuurttttttrrrrrr
Ad

More from Kevin OBrien (19)

PPTX
American icon pmi
ODP
Tls 1.3
ODP
Forward Secrecy
ODP
Diffie_Hellman-Merkle Key Exchange
ODP
Password best practices and the last pass hack
ODP
SSL certificates
ODP
Encryption basics
ODP
Passwords
PDF
Hardware Discovery Commands
PDF
Introduction to linux
PDF
Help, my computer is sluggish
PDF
The ps Command
PDF
Installing Software, Part 3: Command Line
PDF
Installing Software, Part 2: Package Managers
PDF
Installing Software, Part 1 - Repositories
PDF
Installing Linux: Partitioning and File System Considerations
PDF
The ifconfig Command
PDF
Find and Locate: Two Commands
PDF
The Shell Game Part 4: Bash Shortcuts
American icon pmi
Tls 1.3
Forward Secrecy
Diffie_Hellman-Merkle Key Exchange
Password best practices and the last pass hack
SSL certificates
Encryption basics
Passwords
Hardware Discovery Commands
Introduction to linux
Help, my computer is sluggish
The ps Command
Installing Software, Part 3: Command Line
Installing Software, Part 2: Package Managers
Installing Software, Part 1 - Repositories
Installing Linux: Partitioning and File System Considerations
The ifconfig Command
Find and Locate: Two Commands
The Shell Game Part 4: Bash Shortcuts

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Electronic commerce courselecture one. Pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
Electronic commerce courselecture one. Pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Building Integrated photovoltaic BIPV_UPV.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
sap open course for s4hana steps from ECC to s4
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...

The Shell Game Part 2: What are your shell choices?

  • 1. The Shell Game 2 Kevin O'Brien Washtenaw Linux Users Group http://www.lugwash.org
  • 2. Varieties of Shell ● In Linux, you always have choices, whether you like it or not ☺ ● With shells you have choices ● The Bourne-Again Shell (bash) is most likely the default you have on your system now ● But you can use others as well
  • 3. Why use different shells? ● Like any other choice, you would select different shells because they have special capabilities you want to make use of ● They may have special commands, or use less resources, or maybe you just feel more comfortable with one shell rather than another
  • 4. Bourne shell (sh) ● The original Unix shell ● Written by Stephen Bourne at Bell Labs in 1974 ● A simple shell, with small size and few features ● Every Unix-like system either has sh, or has a shell that incorporates everything in sh
  • 5. Bourne-Again Shell (bash) ● The default for all Linux systems ● Also runs on virtually all Unix-like systems, and there is even a version available for Windows ● Bash is a superset of sh, that is, it incorporates everything that is in sh, but then adds to it ● It is very flexible, and a good choice for beginners. The rest of this series will use bash to illustrate using a shell.
  • 6. Almquist Shell (ash) ● Basically a clone of sh ● Very small memory requirements ● Thus it is useful for small embedded systems
  • 7. C Shell (csh) ● Created by Bill Joy while he was at UC Berkeley ● Syntax very similar to the C programming language
  • 8. Korn shell (ksh) ● Developed by David Korn at Bell Labs in 1983 ● Superset of SH, with many features of the C Shell as well ● Advanced scripting capabilities similar to what is in awk, sed, and perl
  • 9. TENEX C Shell (tcsh) ● Based on C Shell ● Adds features not found in C Shell ● Now the default shell on some BSD systems (FreeBSD and Darwin)
  • 10. Z Shell ● Written by Paul Falstad around 1990 ● Simlar to ksh, but has features from csh as well ● Attempt to use the programmability of the ksh with csh features
  • 11. You can choose ● You can make a temporary switch of your shell ● Or you can change the default if you find one you like better
  • 12. Temporary switch ● A shell is an executable file (everything in Linux is a file) ● So you just run it ● For example, to change to the original Bourne shell, just type “sh” at the prompt ● To go back to the Bourne-Again shell, just type “bash” at the prompt ● When you change, notice that the prompt itself looks different
  • 13. Changing the default 1 ● Suppose you find a shell you like better, and you want that to be the shell you always want to see when you boot up your computer ● First, find out the full path of the shell, i.e., what is the full path, starting from the root, to the executable file that contains the shell ● To get clues, open up /etc/shells and etc/passwd ● For example, bash is usually /bin/bash
  • 14. Changing the Default 2 ● Once you know the full path to the shell you now want to be the default, use the change shell command (chsh) ● This will open a brief dialog to make the change, and will ask you for your password to authorize it
  • 15. Whose shell is this, anyway? ● One thing you need to remember is that the choice of shell is only being made for the person logged in ● You could have multiple users on a system, and have each one make their own shell choice ● Tip: always try out a shell temporarily before making a permanent change