Minishell is a simple implementation of a terminal shell, allowing you to execute commands, use pipes, and navigate directories. It supports running system programs and implements basic shell functionalities.
To compile Minishell, simply run:
makeThis will generate the executable file minishell.
Now, to start the shell, run:
./minishell✅ Execution of system commands
✅ Input and output redirection (<, >, >>)
✅ Pipe support (|)
✅ Built-in commands (cd, exit, pwd, echo)
You can use system commands like:
ls -lOr provide the absolute path of the command:
/bin/ls -lMinishell supports chaining commands using pipes:
cat README.md | grep shellRedirecting the output of a command to a file:
ls > file_list.txtReading input from a file:
cat < file_list.txtAppending output to a file without overwriting:
echo "New line" >> file.txtMinishell also implements some built-in commands, which do not require execve():
| Command | Description |
|---|---|
cd <directory> |
Changes to the specified directory |
pwd |
Displays the current directory |
echo <text> |
Prints the text to the screen |
exit |
Closes Minishell |