Welcome to MINISHELL project! This project involves creating a basic shell (similar to Bash) to deepen your understanding of processes and file descriptors in a Unix-like operating system.
The minishell project is a 42Network Project designed to help you gain hands-on experience with:
- Processes: How to create and manage processes using system calls like
fork(),exec(), andwait(). - File Descriptors: Understanding standard input, output, and error streams, and how to redirect them. By implementing your own shell, you will explore these concepts in depth and develop a stronger grasp of how Unix-like operating systems function under the hood.
- Execute built-in commands like
cd,exit, andecho. - Launch external programs.
- Handle pipe
|. - Implement input/output redirection (
>,>>,<) and also Heredoc<<. - Support for basic environment variables.
- Signals (
Ctrl ^ C,Ctrl ^ \).
To install and run the minishell, follow these steps:
- Install libreadline if it's not installed
sudo apt update
sudo apt install libreadline-dev
sudo apt install libreadline8- Clone the repository:
git clone https://github.com/amineichou/minishell.git
- Navigate to the project directory:
cd minishell - Compile:
make
- Run
./minishell - Example
minishell> ls -la
minishell> cd /path/to/directory
minishell> echo "Hello, World!" > output.txtHappy coding!