Could you explain the technical differences between the major Linux shells (Bourne, C, Korn)? Is a login shell different from any other shell? If so, do you have any tips for using it?

    Requires Free Membership to View

The Linux Bourne shell (bash) is the standard for Linux and is the GNU version of the standard Bourne shell. It actually incorporates many features from csh and the Korn shell. Korn was developed from the original Bourne shell, not the born again bourne shell (bash), and incorporates many of the best features of earlier command processors, and is really a superset of the Bourne shell. though is not widely used in the Linux world. It's much more widely used in the Unix area (default shell under AIX). I would say that there are really no significant functional type differences between bash and korn that would warrant you going out and downloading it. I have heard some folks say that improved array features in Korn are important, as are improvements in using double precision arithmetic. You can pick up a copy of the korn shell from http://www.research.att.com/sw/download/.

Lastly, the C shell has a reputation for having many shortcuts, and as you can tell from the name, is C friendly and you'll do well with this if you know C. I am not particularly fond of the csh, as I find the syntax to be a bit tricky. Csh is also known to be a little slower then the other shells. Though there are many similarities, there are also plenty of differences when it comes to syntax, so my recommendation is to work with one only. If you want to choose one, stay with bash, the Linux bourne shell.

The Unix shell has two purposes, one is a scripting language, the other as a command line interpreter to run commands. When you say "login" shell, that is really the second purpose. Commands are being executed from that shell. As far as tips, I would try to familiarize yourself with the .profile, which in Unix is the first file that is looked at when you log in and is used to customize your environment. Put whatever setting you want here, and it will make your life much easier.

This was first published in November 2004

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: