Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Shell

This project is a simple shell implemented in C that can execute basic Linux commands. It mimics a minimal shell environment where users can input commands, and the shell interprets and executes them by forking a new process.

Features

Basic Command Execution: Executes Linux commands such as ls, pwd, echo, etc.

Process Forking: Utilizes the fork() and exec() system calls to create child processes that run the commands.

Interactive Mode: Allows the user to type commands in an interactive terminal.

Exit Functionality: Type exit to quit the shell.

Technologies Used

C Programming Language

Linux System Calls (e.g., fork(), execvp(), wait(), etc.)

How It Works

The shell runs in an infinite loop, waiting for user input.

When a command is entered, the shell parses the input.

A child process is created using fork(), and the command is executed in the child process using execvp().

Installation and Usage

1- Clone the Repository:

image

2- Compile the Project: Navigate to the project directory and compile the source code:

image

3- Run the Shell

image

4- Example

image

The parent process waits for the child to finish using wait(), then prompts for the next command.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages