What is Linux Shell?
In
Linux and Unix, a shell refers to a program that is used to interpret
the typed commands the user sends to the operating system. The closest analogy in windows is MS-DOS, Shell name is COMMAND.COM which is also used for same purpose, but it's not as powerful as our Linux Shells are!
Computer understand the language of 0's and 1's called binary language.
In
early days of computing, instruction are provided using binary
language, which is difficult for all of us, to read and write. So in OS there is special program called Shell. Shell accepts your instruction or
commands in English (mostly) and if its a valid command, it is pass to
kernel.
Shell is a user program or it's environment provided for
user interaction. Shell is an command language interpreter that executes
commands read from the standard input device (keyboard) or from a file. Shell is not part of system kernel, but uses the system kernel to execute programs, create files etc.
Several shells are available for Linux including:
- BASH ( Bourne-Again SHell ) - Most common shell in Linux. It's Open Source.
- CSH (C SHell) - The C shell's syntax and usage are very similar to the C programming language.
- KSH (Korn SHell) - Created by David Korn at AT & T Bell Labs. The Korn Shell also was the base for the POSIX Shell standard specifications.
- TCSH - It is an enhanced but completely compatible version of the Berkeley UNIX C shell (CSH).
Note: For Linux, the Bash is the default
- For handling files/data easily
- For routing jobs, such as system administration, without writing programs
- However, the shell script is not efficient, therefore, not good for time consuming calculation
Shell Prompt
There are various ways to get shell access:
- Terminal - Linux desktop provide a GUI based login
system. Once logged in you can gain access to a shell by running X
Terminal (XTerm), Gnome Terminal (GTerm), or KDE Terminal (KTerm)
application.
- Connect via secure shell (SSH) - You will get a shell prompt as soon as you log in into remote server or workstation.
- Use the console - A few Linux system also provides a
text-based login system. Generally you get a shell prompt as soon as you
log in to the system.
How do I find out my current shell name?
Tip: To find all available shells in your system type following command:
$ cat /etc/shells
(In case the /etc/shells file has more than one shell listed under it,
then it means that more than one shell is supported by your platform.)
Note that each shell does the same job, but each understand a different command syntax and provides different built-in functions.
The shell provides an interface to Linux where you can type or enter
commands using the keyboard. It is known as the command line interface
(CLI). To find out your current shell type following command
Tip: To find your current shell type following command
$ echo $SHELL
Comments
Post a Comment