- MiniShell is a simple Linux shell written in C++.
- It supports running basic commands, handling directory changes (cd), and keeps a simple command history.
- This project was built to deepen my understanding of system calls (fork(), execvp(), wait()) and Linux internals.
-
Run standard Linux commands : Supports external commands like ls, pwd, date, echo, etc. using execvp
-
Prompt Display : Colored Prompt using ANSI escape codes
-
cdcommand : to change directories using chdir() -
Exit Command :
exitterminates the shell loop -
History Command : Keeps a maximum of 50 commands, trimming the oldest
-
Execute Commands from History : Supports
!Nto execute the N-th command in history -
Basic error handling : Prints user-friendly messages when fork() or execvp() fail
-
Signal Handling : Gracefully handles
Ctrl+Cwithout exiting the shell -
Command Piping : Support for
|for chaining commands -
Command Redirection : Support for
>and `>>' for redirection
-
C++
-
Linux System Programming (fork, execvp, wait, chdir)
-
GCC Compiler
-
Git for version control
git clone https://github.com/qwerty-arun/MiniShell.git
cd MiniShellg++ main.cpp -o minishell./minishell-
How Linux creates and manages processes.
-
How command execution actually works under the hood.
-
Handling user input and system calls properly.
-
Building real-world C++ projects.
-
Add support for piping (|) and redirection (>, <)
-
Handle Command Chaining (&&, || and ;)
-
Implement tab-autocomplete for commands
-
aliascommand -
Job Control: implement
fg,bgandjobscommands -
Support Environment Variables
-
Supporting background execution using '&'
