Difference between shells


I am new to Linux. I would like to ask what is the difference between the types of shells in Linux for example Cshells, sh/Bourne shells and dos shell. What is it that makes them different and when we use different shells?

What about the differences between terminals and consoles?

Thanks for reading and sorry for being naive in this.
Thanks so much. Regards
Who is Participating?
DanEgliConnect With a Mentor Commented:
A short question, but a long answer :>

1) Shells:
there are really only 4 shells that are common to almost any linux distro:

Bash == Borne Again SHell. NICE! Lot of feature, but a bit big in the memory area (uses a LOT of memory)
sh == BASH's predecessor, the bourne SHell. Doesn't really exist anymore. It's a link to bash in most distros.

KSH == Korn SHell. A half way point between BASH and old Borne shell stuff. The original Korn shell was a commercial product. Thats why you may notice this is called pdksh. The pd is for Public Domain. It's a free rewrit that someone did for Korn. Shell. I use it a lot for scripts that require patern matching and patern substitution on strings.

ZSH == Lightweight contender against bash. Has a lot of the same features (not all of them) and a much smaller memory footprint. I don't use it but I know folks who do.

CSH/TCSH == C SHell / Turbo C SHell
These are moderately powerful shells (TCSH being stringer than CSH) that don't use the normal unix scripting language. Instead they use a more C like syntax for their scripts. I personally don't like it but a friend of mine swears by it.

2) Difference between terminals and consoles:
a TERMINAL is a remote entry port or a local entry port. If I telnet to my ISP's mail server, the logon screen is displayed on my TERMINAL screen. The CONSOLE represents the physical keyboard/mouse/monitor attached to the machine. If someone is logged into a terminal, they're probably remote. If they're logged in through the CONSOLE, then they MUST be physically at the computer.

The choice of shell seems to be a matter of personal preference. Since BASH and TCSH are the most full featured shells in common use most people starting out in Unix/Linux will use one of these. The first one you get to know reasonably well will probably be the one you use for a long time to come.
In the Unix world, the console is considered to be the terminal that the system boots up on.  All other screen devices are usually referred to as terminals (as in dumb terminals).  Dumb terminals do not have memory or a hard disk drive and are usually a cheaper alternative for connecting users to a Unix system.  A PC can be considered a terminal if it is connected via a serial line to the Unix system and is running terminal emulation software.  An Xterminal would be a terminal that has graphics capability.  A true dumb terminal is not a networking device and would connect using a serial port.  In the Linux world, I would consider the console to be the monitor where you see Linux boot messages.  All other screen devices would be considered terminals.

Although bash is a link to sh, sh is the original Unix shell and has its limitations.  The bash seems to incorporate the best features from previous shells such as history, aliases, foreground/background tasking, etc.  Some of us that use versions of Unix that do not have bash tend to rely on sh since it is on all Unix systems.  Other shells evolved over the years with enhanced features compared to sh.  For example, csh was developed by University of California at Berkeley (UCB) and gave us aliases and command history.  If you are pretty much a Linux user, I would use the bash shell.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.