Skip to content

Subham503/SubShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

SubShell 🐚

A custom Unix shell built from scratch in C, running on Linux/WSL.

Features

  • Interactive prompt (REPL loop)
  • Execute real Linux commands (ls, pwd, echo, mkdir etc.)
  • Built-in cd command
  • Argument parsing with strtok()
  • Process management with fork(), execvp(), wait()

How to Build & Run

gcc shell.c -o shell
./shell

Usage

myshell> ls
myshell> pwd
myshell> echo Hello World
myshell> cd /home
myshell> exit

What I Learned

  • How shells work under the hood
  • Linux system calls (fork, exec, wait, chdir)
  • Process creation and management
  • Input parsing in C

Roadmap

  • Pipes support (ls | grep txt)
  • I/O Redirection (echo hello > file.txt)
  • Command history (arrow keys)
  • Custom prompt with current directory
  • ~ expansion in paths

Tech Stack

  • Language: C
  • Environment: Ubuntu 22.04 (WSL2)
  • Compiler: GCC 11.4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages