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:
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.Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?