What is a Shell?
Interface between the user and the operating system.
Name a type of Shell.
What is the Bourne Shell (sh)?
The standard shell in most UNIX systems and normally the default shell
What is the Korn Shell (ksh)?
A superset of the Bourne shell, supporting most sh scripts
What characterizes the C Shell (csh)?
A shell that utilizes C language-styled syntax
What is the Bourne Again Shell (bash)?
A standard shell in Linux based on the Bourne shell
What command switches from ksh to bash?
$bash
What command do you use to exit from bash?
bash$ exit
What happens when commands run by default?
The shell waits for the command to terminate before returning to the prompt.
How do you run a command in the background?
Use the ampersand symbol (&) at the end of the command line.
What does the command ‘% emacs test.txt &’ do?
It starts the emacs editor without waiting for it to exit.
What happens when a process runs in the background?
It cannot be terminated using CTRL-C.
What command is used to send signals to processes?
kill
Which signal is the strongest request to kill a process?
-9 signal
What command lists currently running processes?
ps (process status)
What does the tee command do?
Sends command output to both a file and the standard output.
What is the syntax to use tee with ls?
% ls | tee filesindir
What will be saved in the file called filesindir?
tut1 tut2 tut3
What does the command % cat filesindir do?
Displays the contents of filesindir.
What is the outcome of ls | tee filesindir?
Lists current directory files and saves to filesindir.
What does the echo command do?
Displays the text passed to it, followed by newline.
How would you use echo to display ‘hello there’?
% echo ‘hello there’ hello there
What is another way to use echo?
% echo “hello there” hello there
What is the equivalent command to echo?
% printf “%s\n” “string”