Skip to content

ihamzatarar/Custom-Shell-Interpert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom C Shells: CLI & GUI

About

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.

Features

  • 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.

Getting Started

Prerequisites

  • GCC (GNU Compiler Collection)
  • GTK+ 3.0 (for the GUI shell)
  • Basic knowledge of C and Linux environment

Installation

  1. Clone the Repository

    git clone https://github.com/ihamzatarar/Custom-Shell-Interpert.git
    cd Custom-Shell-Interpert
  2. Build the Command-Line Shell

    Navigate to the command-line shell directory:

    cd CLI Shell
    make
  3. 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)

Usage

  • Running the CLI Shell: In the CLI Shell directory, execute ./shell.
  • Running the GUI Shell: In the GUI Shell directory, execute ./shell.

Documentation

For detailed information about the functionality and the design of the shells, refer to the docs folder.

Screenshots

Screenshot 2024-01-15 at 12 28 59 AM Screenshot 2024-01-15 at 12 28 46 AM Screenshot 2024-01-15 at 12 30 10 AM Screenshot 2024-01-15 at 12 30 18 AM \

License

GNU GENERAL PUBLIC LICENSE

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published