This repository hosts two distinct shells implemented in C: a command-line interface (CLI) shell and a graphical user interface (GUI) shell. Inspired by a Hacker Noon tutorial and the practical approach demonstrated in the lets-build-a-linux-shell GitHub repository, these shells are designed to provide hands-on experience with the internals of command interpreters in Linux.
- Command-Line Shell: A basic shell that runs in the terminal, allowing users to execute commands and scripts in a traditional text-based environment.
- GUI Shell: An extension of the command-line shell with a graphical interface, making it more accessible and user-friendly, especially for those who prefer graphical over text-based interaction.
- GCC (GNU Compiler Collection)
- GTK+ 3.0 (for the GUI shell)
- Basic knowledge of C and Linux environment
-
Clone the Repository
git clone https://github.com/ihamzatarar/Custom-Shell-Interpert.git cd Custom-Shell-Interpert
-
Build the Command-Line Shell
Navigate to the command-line shell directory:
cd CLI Shell make
-
Build the GUI Shell
Ensure GTK+ 3.0 is installed, then navigate to the GUI shell directory:
cd ../GUI Shell gcc -o shell executor.c initsh.c main.c node.c parser.c prompt.c scanner.c source.c builtins/builtins.c builtins/dump.c symtab/symtab.c $(pkg-config --cflags --libs gtk+-3.0)
- Running the CLI Shell: In the
CLI Shell
directory, execute./shell
. - Running the GUI Shell: In the
GUI Shell
directory, execute./shell
.
For detailed information about the functionality and the design of the shells, refer to the docs
folder.
- Inspiration and foundational concepts were adapted from Hacker Noon's tutorial.
- Core functionalities were based on the examples provided in lets-build-a-linux-shell.