Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 4.21 KB

README.md

File metadata and controls

48 lines (29 loc) · 4.21 KB

Simple Linux Shell

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.

Features

  1. Executes user commands in a separate process.
  2. Supports internal commands: exit, pwd, cd, and help.
  3. Maintains the history of the last 10 commands executed.
  4. Supports the !n and !! commands for executing commands from history.
  5. Handles the SIGINT signal to display help information.
  6. Displays the current working directory in the shell prompt.

Optional Feature

  1. Enhanced cd command to support changing to the home directory, using ~ for the home folder, and - for changing back to the previous directory.

Getting Started

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

Contributing

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.

License

This project is licensed under the MIT License. See LICENSE for more information.