For Legend look here
The main program a user interacts with after login is the
This is a program that interprets the user command and initiates the desired
The basic commands to know in unix are:
The shell program is a computer program that allows the user to enter a command
to the computer, that this then should execute.
There are several different programs that provide this functionality:
Basic shell program installed on any linux distribution
bash: Bourne Again Shell
Shell program with some additional features.
Advanced shell program, extensible and a lot features.
fish: Friendly Interactive Shell
A modern user friendly, but in some aspects not compatible to normal shell of
Commands have a name without whitespaces and can have options or parameter
to alter their behaviour.
Parameters or Options of commands are seperated by spaces.
That means, if a parameter or option needs to include a space character, there
are two options:
- Escape Space:
- Wrap in quotation marks:
Other special characters:
is used to encapsulate names/strings with spaces, and will also part of
$Variableexpansion, if needs to be used as such:
", but without variable expansion. Escape:
<used in shells to redirect a stream to somewhere else.
(Pipe Symbol) used to send output of one command to another
Input and Output of Shell
Unix shells have three builtin character streams:
- Output Stream STDOUT has number 1
- Error Output STDERR has number 2
- Input Stream STDIN has number 0
Working with input and output
Repeat something from input to output:
echo Text that will be repeated by shell # Text that will be repeated by shell
Redirect STDOUT to File:
echo Text that will go to STDOUT goes to file > file
Redirect STDERR to STDOUT:
some_command 2>1 # Can be combined with other redirects: some_command 2>1 1> file
Hand output of one command to another command to process further:
some_command | another_command