What Are Linux / UNIX Shells?

by on June 17, 2008 · 0 comments· LAST UPDATED June 17, 2009

in , ,

Can you explain me UNIX shell? What are Shells?

A shell is nothing but the interface between UNIX / Linux and the user (i.e. you).

The shell phrases commands (the text you type) and send those to UNIX / Linux / BSD operating system to take an appropriate action.

For e.g. to see current date you type the command:
$ date
You shell will interpret the date command and sends request to operating system. Operating system will read actual date and display back on screen. A shell can be defined as follows:

A Unix shell is a command-line interpreter that provides a traditional user interface for the Unix / Linux / BSD operating systems.

A lot of everyday work is done in a command line using a shell.

It will take commands from the input channel (keyboard) and execute them. A lot of UNIX shells also have been created to help with everyday tasks such as file management, file globbing and so on.

Most UNIX like operating systems comes with a set of shells, such as sh, the Bourne Shell, and tcsh, the improved C-shell, bash and so on.

Shell As A Programming Language

A shell can also serve as a programming language. You can put all commands into a single text file and execute as a shell script. A sample shell script:

#!/bin/sh
echo "Today is `date`"
 
echo "Currently logged in users"
who
 
echo "Currently running process"
ps aux

Which Shell Do You Recommend?

It is really a matter of taste and personal choice. For e.g, if you are a C programmer you might feel more comfortable with a C-like shell such as csh or tcsh. Most new users especially with Linux background may like bash.



If you would like to be kept up to date with our posts, you can follow us on Twitter, Facebook, Google+, or even by subscribing to our RSS Feed.


{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: