Intro to UNIX Shells

A UNIX Shell is in simplest terms, a command line interpreter, that takes the users input and gives it to the Kernel. If you are familiar with DOS, you will remember the 'command.com' that file takes the users information and passes it to the operating system in a way it can be understood by the system. With DOS you only had one type of shell, but with UNIX you have a variety, each with their own abilities, pluses and minuses.

Keep in mind as you read about these shells, that though they may have major differences when they were created, that they have been updated and many features that were once only available in a single shell, may be available in other shells. This is more of a history lesson.

'sh'
The Bourne shell, named after its creator Steve Bourne is the oldest shell for most major distributions of UNIX and LINUX. Most shells today are in some fashion derived from the Bourne shell.

'csh'
The C Shell. The C shell is a great shell that has many advantages over the original Bourne shell, it was the first to introduce a history (the ability to scroll up, to view past commands). Also the C Shell as the name implies also integrates a great portion of the C programming language. If you are able to program in C, you can pretty much do it all in a shell script or from the command line, if you so desired.

'ksh'
The Korn Shell. Named after its creator David Korn. This shell is able to do most of the things both the Bourne, and C Shell can do, and improves on them. For instance, the history feature is available, plus you are able to call up the history, edit the command, and then re-run it.

'bash'
The Bourne-Again Shell. This is probably the most widely used shell to date, and is the default shell for most newer Linux distributions. Again it integrates most of the above features and improves upon them. It was developed by the Free Software Foundation.

There are many other shells out there, but chances are if you are using a UNIX style operating system, you are using one of the above mentioned shells. My personal favourite is the bash shell, which also happens to be the first one I was exposed towards, so I may be biased. However typically when shell scripting, I use the korn shell because of its programming friendly structure.

How do you know what UNIX shell I am using?

Type "ps" and then hit return at your shell prompt and you should get something similar to:

$ ps
PID TTY TIME CMD
13087 pts/1 00:00:00 bash
13121 pts/1 00:00:00 ps

The numbers under PID, TTY, TIME etc should all be different from machine to machine, and the number of lines of programs running may also. But one line you have will be probably "bash" "csh" "sh" "ksh".

Another way to check is to type the following:

grep your-user-name /etc/passwd (eg grep ken /etc/passwd)

Which will return you something along the lines of:

ken:x:501:501:Ken:/home/ken:/bin/bash

The last portion of that line is '/bin/bash' which tells you your default shell when you login.

Ken Dennis
Ken.Dennis@Gmail.com
http://KenDennis-RSS.homeip.net/

In The News:


pen paper and inkwell


cat break through


C++ Tutorials: 3, Program Flow (If, Else, While, For)

Program Flow is what you think it is. How the... Read More

Microsoft CRM for Large Corporation ? Security

Microsoft Business Solutions CRM proved to be reliable solution in... Read More

Do You Know These Facts About Spyware ?

Imagine something that follows you home and sets itself up... Read More

Microsoft Great Plains Upgrade ? Version 8.0 Overview for IT Director/Controller

If you have Microsoft Great Plains as main accounting and... Read More

Free Microsoft Word Online Training Tutorial Resources

Microsoft Word is one of the most popular office applications... Read More

Programming Language Migration Path

While I was preparing some personal background information for a... Read More

Microsoft Great Plains Implementation: Collection Management ? Overview For Consultant

Microsoft Business Solutions Great Plains is very good fit for... Read More

Introduction To ISDN, Part II

In the previous ISDN article, we looked at how and... Read More

DB Integration - Software for Combine MS Access Databases

Our company, Novaprof Inc., developed unique software - DB Integration.... Read More

Great Plains Customization ? Programming Auto-apply in Accounts Receivable

Microsoft Great Plains is one of three Microsoft Business Solutions... Read More

Outlook... Not Just for Email! Using Your Outlook Calendar

Microsoft Outlook is one of the most widely used software... Read More

Professional XP Style Icons in Software and Website Development

Using professional icons in your application or website can bring... Read More

SyncUp ? A File/Folder Synchronizer For Windows

SyncUp, a file synchronizer is designed to assist the home... Read More

Review on QuarkXpress 6.0

After almost two decades of existence, Quark has become the... Read More

Linux ? Keyboard Or Mouse

Just stress testing one of the latest Linux distributions. Been... Read More

Microsoft CRM Integration with IBM Lotus Notes Domino ? Machinery Dealership Example

IBM Lotus Notes with Domino email server is traditional document... Read More

5 Easy File Management Tips in Microsoft Word

How many steps does it take you to locate and... Read More

Chinese Input - Step by Step Instruction on How to Input Chinese Characters in English Windows XP

Enabling Chinese input is quick and easy, there are only... Read More

Computer Phones ? Facts and Fallacies

The stakes are high when considering security, privacy, and savings,... Read More

Microsoft Great Plains Customization Tools Evolution ? Overview for Consultant

When Great Plains Software introduced the first graphical accounting application... Read More

How to Get The Best Accounting Software For Your Small Business

Buying accounting software is a major investment. It's an important... Read More

Spyware, What is it?

Spyware, what it is and what it does. Basically, spyware... Read More

Software Upgrades Arent Always the Best Move

When my daughter was getting into AOL instant messaging (AIM)... Read More

Microsoft CRM Customization Secrets ? Second Edition

This article is for advanced Microsoft CRM SDK C# developers.... Read More

Hubris - Definition: Microsofts Passport

Before September of 1995, Microsoft ignored the Internet because their... Read More

Causes of ERP Failures

ERP is the acronym of Enterprise Resource Planning. Multi-module ERP... Read More

Easy Guide to RAID Recovery

What is RAID RECOVERY?RAID stands for Redundant Array of Inexpensive... Read More

Alien Intruders!

You probably didn't casually invite, or extend a formal attendance... Read More

Understanding XML Server

XML Server can be a Web Server that stores the... Read More

Spyware, Adware, etc. -- Terms and Common Sense

When reading an article where some term is used often,... Read More

Dig Out That Worm

Internet worms. Is your PC infected?If your computer has become... Read More

Cisco Certification: Introduction To ISDN, Part V

The major reason I recommend getting your hands on real... Read More

IT Strategy for Large Corporation: ERP/MRP/CRM, Unix/Linux/Windows, Microsoft/Java

Combining Microsoft Business Solutions Great Plains ERP with non-Microsoft Business... Read More