SlideShare a Scribd company logo
1 of 15
Download to read offline
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

What's hot

Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windows
mikehie
 
Unix is my IDE
Unix is my IDEUnix is my IDE
Unix is my IDE
tkramar
 
An overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technologyAn overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technology
OpenVZ
 
How To Setup NVIDIA CUDA Drvier on Ubuntu
How To Setup NVIDIA CUDA Drvier on UbuntuHow To Setup NVIDIA CUDA Drvier on Ubuntu
How To Setup NVIDIA CUDA Drvier on Ubuntu
SEUNGWOO LEE
 

What's hot (20)

VirtualOS-using-Qemu
VirtualOS-using-QemuVirtualOS-using-Qemu
VirtualOS-using-Qemu
 
Creating VM for pfsense
Creating VM for pfsenseCreating VM for pfsense
Creating VM for pfsense
 
Scale2013
Scale2013Scale2013
Scale2013
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Top Lightweight Linux Distros
Top Lightweight Linux DistrosTop Lightweight Linux Distros
Top Lightweight Linux Distros
 
Virtual Machine LAMP on Windows
Virtual Machine LAMP on WindowsVirtual Machine LAMP on Windows
Virtual Machine LAMP on Windows
 
Linux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzipLinux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzip
 
Docker 入門 Introduction to Docker
Docker 入門  Introduction to DockerDocker 入門  Introduction to Docker
Docker 入門 Introduction to Docker
 
LUG - Install Fest 2008
LUG - Install Fest 2008LUG - Install Fest 2008
LUG - Install Fest 2008
 
Linux server backup solution
Linux server backup solutionLinux server backup solution
Linux server backup solution
 
Deep dive-oz
Deep dive-ozDeep dive-oz
Deep dive-oz
 
Unix is my IDE
Unix is my IDEUnix is my IDE
Unix is my IDE
 
Conair
ConairConair
Conair
 
Os Bernier
Os BernierOs Bernier
Os Bernier
 
An overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technologyAn overview of OpenVZ virtualization technology
An overview of OpenVZ virtualization technology
 
Desktop Application In Linux
Desktop Application In LinuxDesktop Application In Linux
Desktop Application In Linux
 
Making the Move to Linux from an Enterprise Perspective
Making the Move to Linux from an Enterprise PerspectiveMaking the Move to Linux from an Enterprise Perspective
Making the Move to Linux from an Enterprise Perspective
 
How To Setup NVIDIA CUDA Drvier on Ubuntu
How To Setup NVIDIA CUDA Drvier on UbuntuHow To Setup NVIDIA CUDA Drvier on Ubuntu
How To Setup NVIDIA CUDA Drvier on Ubuntu
 
Docker techzone
Docker techzoneDocker techzone
Docker techzone
 
Libusb
LibusbLibusb
Libusb
 

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

Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
Mustafa Qasim
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
Sherif Mousa
 
Bash shell programming in linux
Bash shell programming in linuxBash shell programming in linux
Bash shell programming in linux
Norberto Angulo
 

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

Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
 
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
 
The Shell Game Part 3: Introduction to Bash
The Shell Game Part 3: Introduction to BashThe Shell Game Part 3: Introduction to Bash
The Shell Game Part 3: Introduction to Bash
 
Shell Scripting in Linux
Shell Scripting in LinuxShell Scripting in Linux
Shell Scripting in Linux
 
Licão 05 scripts exemple
Licão 05 scripts exempleLicão 05 scripts exemple
Licão 05 scripts exemple
 
Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell Course 102: Lecture 10: Learning About the Shell
Course 102: Lecture 10: Learning About the Shell
 
Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02
 
UnixShells.ppt
UnixShells.pptUnixShells.ppt
UnixShells.ppt
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
Intro to Bash
Intro to BashIntro to Bash
Intro to Bash
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
 
Shell_Scripting.ppt
Shell_Scripting.pptShell_Scripting.ppt
Shell_Scripting.ppt
 
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
 
Lightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFSLightweight Virtualization: LXC containers & AUFS
Lightweight Virtualization: LXC containers & AUFS
 
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
 
Shell programing|Shel Scripting
Shell programing|Shel ScriptingShell programing|Shel Scripting
Shell programing|Shel Scripting
 
Shell Basics
Shell BasicsShell Basics
Shell Basics
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Bash shell programming in linux
Bash shell programming in linuxBash shell programming in linux
Bash shell programming in linux
 

More from Kevin OBrien

More from Kevin OBrien (19)

American icon pmi
American icon   pmiAmerican icon   pmi
American icon pmi
 
Tls 1.3
Tls 1.3Tls 1.3
Tls 1.3
 
Forward Secrecy
Forward SecrecyForward Secrecy
Forward Secrecy
 
Diffie_Hellman-Merkle Key Exchange
Diffie_Hellman-Merkle Key ExchangeDiffie_Hellman-Merkle Key Exchange
Diffie_Hellman-Merkle Key Exchange
 
Password best practices and the last pass hack
Password best practices and the last pass hackPassword best practices and the last pass hack
Password best practices and the last pass hack
 
SSL certificates
SSL certificatesSSL certificates
SSL certificates
 
Encryption basics
Encryption basicsEncryption basics
Encryption basics
 
Passwords
PasswordsPasswords
Passwords
 
Hardware Discovery Commands
Hardware Discovery CommandsHardware Discovery Commands
Hardware Discovery Commands
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Help, my computer is sluggish
Help, my computer is sluggishHelp, my computer is sluggish
Help, my computer is sluggish
 
The ps Command
The ps CommandThe ps Command
The ps Command
 
Installing Software, Part 3: Command Line
Installing Software, Part 3: Command LineInstalling Software, Part 3: Command Line
Installing Software, Part 3: Command Line
 
Installing Software, Part 2: Package Managers
Installing Software, Part 2: Package ManagersInstalling Software, Part 2: Package Managers
Installing Software, Part 2: Package Managers
 
Installing Software, Part 1 - Repositories
Installing Software, Part 1 - RepositoriesInstalling Software, Part 1 - Repositories
Installing Software, Part 1 - Repositories
 
Installing Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System ConsiderationsInstalling Linux: Partitioning and File System Considerations
Installing Linux: Partitioning and File System Considerations
 
The ifconfig Command
The ifconfig CommandThe ifconfig Command
The ifconfig Command
 
Find and Locate: Two Commands
Find and Locate: Two CommandsFind and Locate: Two Commands
Find and Locate: Two Commands
 
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 4: Bash ShortcutsThe Shell Game Part 4: Bash Shortcuts
The Shell Game Part 4: Bash Shortcuts
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

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