The Shell Game Part 1: What is a shell?


Published on

Beginning an exploration of the Linux shell by answering the question "What is a shell?"

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

The Shell Game Part 1: What is a shell?

  1. 1. The Shell Game, Part 1 Kevin O'Brien Washtenaw Linux Users Group
  2. 2. What is a Shell? “A shell is a program that provides the traditional, text-only user interface for Linux and other Unix- like operating systems. Its primary function is to read commands that are typed into a console (i.e., an all-text display mode) or terminal window (an all-text window) in a GUI (graphical user interface) and then execute (i.e., run) them.” --
  3. 3. Why “Shell”? ● At its most fundamental, the OS consists of a kernel, which is the heart of the OS ● The kernel keeps track of different processes running, gives them CPU time as needed, handles interaction with peripheral devices, etc. ● The Shell surrounds all of this, and creates a way to interact with it.
  4. 4. So what is a shell? ● It is the basic way for a person to interact with a computer ● This is done by typing in commands ● If you open a terminal window, you are using the shell ● If you cannot boot into a GUI interface, you can usually boot into a shell and fix things
  5. 5. Servers ● Servers commonly do not even bother to install a GUI. Everything is done via the shell. ● This saves on resources, since you do not have to devote RAM and CPU cycles to the GUI, and can instead devote them to serving files, or whatever.
  6. 6. Headless Servers ● Sometimes a server is set up without a monitor even attached. This is called “Headless”. ● Server administration is done via a terminal connection of some kind, commonly via ssh
  7. 7. ssh ● Ssh stands for Secure Shell ● This is the replacement for telnet, which was used in the old days ● Telnet is not secure, that is why it was replaced
  8. 8. Server Administration ● Pretty much all server administration in Linux or indeed any Unix-like operating system is done via the shell ● This is not just because the shell saves on resources. It is also the case that the shell is more efficient, and more powerful, than any GUI.
  9. 9. Tip for new users ● Buy a box of 3X5 index cards, and keep the box by your computer ● Every time you find a useful command, write it down. You may want to use this command again at a later time. ● Sometimes you will want to group related commands
  10. 10. Example Card – Fixing an Install ● Here is a set of commands I put on one card to help me when I have a problem with an install on my Kubuntu machine – Sudo dpkg --configure -a – Sudo apt-get -f install – Sudo fuser -vik /var/lib/dpkg/lock
  11. 11. Why you need to know this ● Jaunty upgrade → No video! ● No way to launch a GUI ● But I could go into failsafe mode, and get a shell prompt ● With the help of a command I found online, I got my video up and running again
  12. 12. Coming attractions ● This is the first in a series of short presentations designed for the newcomer to Linux ● In future installments we will look at choices among shells, techniques for the most common shell (bash), and some tips and tricks to help move you to being an expert