Friday, June 10, 2016

Linux Shell

Shell is an environment or a program for interacting with operating system. It is not a part of kernel, but uses the system kernel to execute programs.
-        A program that interprets commands.
-        Allows users to execute cmds by typing them manually at terminal, or automatically in programs called shell scripts.
-        A shell is not O. S. It is a way to interface with the O.S. And run commands.
Eg: sh, ksh, bash etc.
The bash:
-        bash stands for Bourne Again Shell.
-        Bash is a Unix shell written by Brian Fox for the GNU Project as a free software replacement for the Bourne shell (sh). Bash is successor of 'sh'. So it has all of the features of original bourne shell , plus additionals that make it easier to program with and use from the command line.
-        Since it is free software, it has been adopted as the default shell on most of linux systems.
# file Globbing
#Tab key
history:
bash stores the history of commands that can be used to repeat if needed.
$history
-        displays the list of cmds history.
-        Arrow can be used to recall the commands.
-        Also;
!c         - to repeat the last command started with c.
!!          - to repeat the last command.
!n         - to repeat the command by its number.
Shell variables:
in linux shell there are two types of variables:
-       system variables:         created by linux developers(inbuilt)
                                         defined in upper case.

-      User Defined variables:           created by users.
 Defined in lower case.
Eg:       $echo $HOME
                 $echo $PATH
Getting help:
1)    $info <cmd>
eg $info ls
2)    $man <cmd>

eg: $man logout

Labels:

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home