Minishell is a project completed during my studies at School 42. The objective of this project is to create a simple shell that replicates the basic functionalities of a Unix shell, handling command execution, redirections, pipes, environment variables, and more.
Minishell is a very small version of Bash, built from scratch in C. It features a command-line interface where users can execute built-in commands, external programs, and handle input/output redirections. The project also includes signal handling for process control.
The project is written in C and requires the cc compiler and the readline library.
- Compiling the program
To compile Minishell, run the following command in the project directory:
$ make
- Running Minishell
After compiling, start the shell by running:
$ ./minishell
You will then enter an interactive shell session where you can execute commands like:
$ echo "Hello, world!"
$ Hello, world!
$ ls -l | grep .c > files.txt
-
Built-in Commands Minishell supports:
This project requires the readline library. If, for some unknown reason, an error occurs while compiling, you can resolve it with the following command:
$ sudo apt-get install libreadline-dev