Skip to content
/ K2SH Public

K2SH is a lightweight, custom-built shell implemented in C.

Notifications You must be signed in to change notification settings

kpp16/K2SH

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

K2SH - A Simple Unix Shell

K2SH is a lightweight, custom-built shell implemented in C. It supports basic command execution, built-in functions, and pipelines using |. I built this to learn how Unix-like shells work under the hood.


Features

  • Run external commands (e.g., ls, grep, cat)
  • Execute pipelines like ls | grep txt
  • Built-in commands:
    • cd – Change directory
    • pwd – Print working directory
    • echo – Print text
    • history – Show command history
    • help – List built-in commands
    • exit – Exit the shell
  • Tracks command history (up to 1000 entries)
  • Modular design with a clean Makefile for building and running

Building K2SH

The project includes a flexible Makefile with debug and release modes.

Build (Debug mode, default)

make

Build (Release mode)

make release

Running K2SH

./k2sh

Or with Makefile

make run # Runs the debug version
make run-release # Runs the optimized version

About

K2SH is a lightweight, custom-built shell implemented in C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published