A lightweight, minimalist shell built in C++ that mimics basic Unix shell behavior. This shell supports built-in commands, path resolution, and external command execution.
βοΈ Basic shell prompt with user info
βοΈ Built-in commands: echo, exit, type
βοΈ Execute system commands like ls, pwd, cat
βοΈ Custom path resolution using $PATH
βοΈ Handles single (' ') and double (" ") quotes correctly
βοΈ Supports whitespace-separated arguments and paths as well
ubuntu % echo "Hello, World!"
Hello, World!
ubuntu % ls
devsh.cpp mysh
ubuntu % type echo
echo is a shell builtin
ubuntu % exit| Command | Description |
|---|---|
echo "Hello" |
Prints Hello to the console |
exit && exit0 |
Exits the shell |
type command |
Checks if a command is built-in or present in binary path |
You can execute any system command available in $PATH:
ls -l
pwd
cat file.txtEnsure you have:
- g++ (GCC Compiler)
- Linux/macOS terminal (Windows users can use WSL)
1οΈβ£ Clone the repository
git clone https://github.com/sd191100/devsh-shell.git2οΈβ£ Compile the shell
g++ devsh.cpp -o devsh -std=c++17 -lstdc++fs-std=c++17 and -lstdc++fs are optional parameters
3οΈβ£ Run the shell
./devshNow, you're inside your custom shell! π
ubuntu % echo "Hello, World!"
Hello, World!