Author: Sahaj Singh
This repository contains the code for a simple Linux shell developed as part of a lab assignment. The shell accepts user commands and then executes each command in a separate process, providing the user a prompt at which the next command is entered. The shell supports internal commands, maintains command history, and can handle signals.
- Executes user commands in a separate process.
- Supports internal commands:
exit
,pwd
,cd
, andhelp
. - Maintains the history of the last 10 commands executed.
- Supports the
!n
and!!
commands for executing commands from history. - Handles the
SIGINT
signal to display help information. - Displays the current working directory in the shell prompt.
- Enhanced
cd
command to support changing to the home directory, using~
for the home folder, and-
for changing back to the previous directory.
Clone the repository to your local machine:
git clone https://github.com/yourusername/simple-linux-shell.git
Navigate to the project directory:
cd simple-linux-shell
Compile the shell.c
file:
gcc -o shell shell.c
Run the shell:
./shell
This repository is the result of a lab assignment and is not intended for contributions. However, feel free to fork the project and make any improvements or modifications you see fit.
This project is licensed under the MIT License. See LICENSE for more information.