A tiny UNIX shell written in C.
-
Parses commands from standard input and executes them until a command exit is evaluated;
-
Terminates the foreground process upon input of
^D
; -
Change directory using
cd
command, and display files/directories within a directory usingls
as well as all other built-in functions; -
Executes any number of processes in background (i.e., in parallel with the foreground process), including in particular, the ability to start another process while a process has been temporarily suspended;
-
Informs the user when the background process finishes or is waiting for an input from the terminal;
-
Informs the user what commands are executing in the background via the
jobs
command, includes information about the state of the process (i.e. suspended, background, waiting for input, etc.); -
Terminates involuntarily a background processes by through the
kill
command.
-
Open Terminal/Command Prompt.
-
Navigate to the
src
directory containing thekcsh.c
file (and theheaders.h
file). -
Compile the shell program using the following command:
gcc -g -lreadline kcsh.c -o kcsh
-
Run the shell by typing
./kcsh
(or simplykcsh
on Windows) and pressing enter.