Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NovaShell

A Unix-like shell built from scratch in C to explore operating system fundamentals, process management, command execution, and shell internals.

Language Platform Status License


📖 Overview

NovaShell is a custom command-line shell developed from scratch in C as part of a deep dive into systems programming and operating system concepts.

The project aims to recreate the core functionality of modern Unix shells while providing hands-on experience with:

  • Process creation and management
  • System calls
  • File descriptors
  • Pipes and redirection
  • Signal handling
  • Command parsing
  • Job control
  • Shell architecture

Rather than treating the terminal as a black box, NovaShell explores how shells actually work internally.


✨ Features

Current Features

  • Interactive shell prompt
  • Command parsing
  • External command execution
  • Built-in commands
  • Error handling

Planned Features

  • Input/Output Redirection (>, <, >>)
  • Pipes (|)
  • Environment Variables
  • Command History
  • Tab Completion
  • Job Control
  • Background Processes (&)
  • Signal Handling
  • Custom Configuration File
  • Shell Scripting Support

🏗️ Architecture

User Input
     │
     ▼
 Command Parser
     │
     ▼
 Tokenizer
     │
     ▼
 Command Dispatcher
     │
 ┌───┴──────────┐
 ▼              ▼
Built-ins    External Commands
                 │
                 ▼
             fork()
                 │
                 ▼
             execvp()

📂 Project Structure

NovaShell/
│
├── src/
│   ├── main.c
│   ├── parser.c
│   ├── executor.c
│   ├── builtins.c
│   └── utils.c
│
├── include/
│   ├── parser.h
│   ├── executor.h
│   └── builtins.h
│
├── docs/
│
├── tests/
│
├── Makefile
├── README.md
└── LICENSE

⚙️ Technologies Used

  • C
  • GCC
  • POSIX APIs
  • Linux System Calls
  • Make

🧠 Concepts Explored

NovaShell demonstrates understanding of:

  • Operating Systems
  • Systems Programming
  • Process Management
  • Fork-Exec Model
  • Inter-Process Communication
  • File Descriptors
  • Unix Architecture
  • Shell Design
  • Memory Management

🚀 Getting Started

Prerequisites

gcc --version
make --version

Clone Repository

git clone https://github.com/YOUR_USERNAME/NovaShell.git
cd NovaShell

Build

make

Run

./novashell

💻 Example Usage

NovaShell> pwd
/home/user

NovaShell> ls
src include README.md

NovaShell> echo Hello World
Hello World

NovaShell> mkdir test

📈 Development Roadmap

Phase 1 — Basic Shell

  • REPL Loop
  • Command Parsing
  • Process Execution

Phase 2 — Shell Features

  • Pipes
  • Redirection
  • Environment Variables

Phase 3 — Advanced Features

  • Job Control
  • Signal Handling
  • Command History

Phase 4 — Power Features

  • Shell Scripting
  • Auto Completion
  • Plugin System

🎯 Learning Goals

This project was created to gain practical experience with:

  • Linux Internals
  • POSIX Programming
  • Process Scheduling
  • Shell Architecture
  • Systems-Level Software Development

📚 References

  • The Linux Programming Interface
  • Advanced Programming in the UNIX Environment
  • POSIX Documentation
  • Build Your Own Shell (CodeCrafters)
  • Linux Man Pages

🤝 Contributing

Contributions, suggestions, and discussions are welcome.

Feel free to open an issue or submit a pull request.


📄 License

Licensed under the MIT License.


⭐ If you find this project interesting, consider giving it a star.

About

A Unix-like shell written in C, implementing command parsing, built-in commands, process execution, redirections, and pipelines using POSIX system calls.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages