Shell Basics

Shell is a command prompt that accepts the commands you type there and basically makes the computer do what you tell it to.In the old days,shell was the only user interface available on a Unix-like system such as Linux.Nowadays, we have graphical user interfaces (GUI) in addition to command line interfaces (CLI).Linux was also designed as a multi-user operating system.which means that you can have more than one shell running at the same time.
On most Linux systems a program called BASH an enhanced version of the original Unix shell program written by Steve Bourne acts as the shell program.

Different types of Shells
  •  Bourne Shell (sh)
  •  C shell (csh)
  •  Tc shell (tcsh)
  •  Korn sell (ksh)
  •  Bourne again shell (Bash)

To find the available shells in your linux machine type
# cat /etc/shells

To view which shell is using
#echo $SHELL

Some examples to try in terminal 

$ echo D*
Desktop Documents

$ echo [[:upper:]]*
Desktop Documents Music Pictures Public Templates Videos

$ echo /usr/*/share
/usr/kerberos/share /usr/local/share

$ echo $((8 + 8))

$ echo {A..Z}
A B C D E F ... Z

$ echo "$(cal)"

Auguest 2011
Su Mo Tu We Th Fr Sa
                1  2
 3  4  5  6  7  8  9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29

Terminal  is a program that opens a window and lets you interact with the shell. There are a bunch of different terminal emulators you can use.

Shell script  is a series of command written in plain text file.The shell reads this file and carries out the commands as though they have been entered directly on the command line.

Shell Basics Shell Basics Reviewed by vivek sathisan on 10:30 Rating: 5

No comments:

© Copyright to vivek sathisan. Powered by Blogger.