Skull Shell is a feature-rich custom shell written in C, designed for developers and power users who want more control over their command-line experience. Built with modularity and extensibility in mind, Skull Shell provides essential shell functionality with room for advanced features.
- π§ Built-in Commands:
cd,exit,echo,clear,pwd,help, and more - π₯οΈ Full External Command Support: Execute ANY system command -
ls,cat,grep,ps,git,vim,gcc,make,curl,ssh, and thousands more! - π Seamless Command Integration: Automatically falls back to system commands when built-ins aren't found
- πΎ Dynamic Memory Management: Efficient memory allocation and cleanup
- π¨ Colored Output: Visual feedback with color-coded messages
- π€ User Context: Displays username and current directory in prompt
cd- Change directorypwd- Print working directoryecho- Display textclear- Clear terminal screenexit- Exit the shell-h- Show help information
File Operations: ls, cat, touch, cp, mv, rm, mkdir, rmdir, head, tail, chmod, chown, find, locate
Text Processing: grep, sed, awk, sort, uniq, less, more, man
System Monitoring: ps, top, htop, free, df, du, uptime, whoami, uname, id
Network Tools: ping, curl, wget, ssh, scp, ftp, netstat, hostname
Development Tools: gcc, make, git, vim, nano, python, node, npm
Process Management: kill, killall, jobs, bg, fg, nohup, nice
...and literally ANY other command available on your system!
- π€ Command Suggestions - Autocomplete and suggest alternatives for mistyped commands
- π§ Music Playback - Play local audio files (
.mp3,.wav, etc.) - π€ AI Integration - AI-assisted commands using the
-aiflag - π Script Debugging - Shell script debugging with trace outputs
- π Enhanced File Handling - Simplified file management operations
shell/
βββ images/ # images and ascii art
β βββ skull.png # demo image of skull
βββ include/ # Header files
β βββ commands.h # Command declarations
β βββ executer.h # Command execution
β βββ main.h # Main includes and definitions
| βββ memory.h # commands history
β βββ parser.h # Input parsing
β βββ utils.h # Utility functions
βββ src/ # Source files
β βββ commands.c # Built-in command implementations
β βββ executer.c # Command execution logic
β βββ main.c # Main shell loop
| βββ memory.h # store and show history
β βββ parser.c # Input parsing and tokenization
β βββ utils.c # Utility functions
βββ makefile # Build configuration
βββ readme.md # This file
- GCC compiler
- Make utility
- Linux/Unix environment
-
Clone or download the project
-
Navigate to the shell directory
cd SKULL-SHELL -
Compile the project
make
-
Run Skull Shell
./skull
Once started, Skull Shell provides an interactive prompt showing your username and current directory:
> username /current/directory# Built-in commands
> pwd # Show current directory
> cd /home/user # Change directory
> echo Hello World # Print text
> clear # Clear screen
# External commands (just like any other shell!)
> ls -la # List files with details
> cat myfile.txt # Display file contents
> grep "pattern" *.txt # Search in files
> ps aux # Show running processes
> git status # Git commands work too
> python script.py # Run Python scripts
> gcc -o program main.c # Compile C programs
> make # Build projects
> curl api.example.com # Make HTTP requests
> ssh user@server # Connect to remote servers
> exit # Exit shell- Modular Design: Separated into distinct modules for parsing, execution, and utilities
- Memory Safe: Dynamic memory allocation with proper cleanup
- Process Management: Fork-exec model for external command execution
- Error Handling: Comprehensive error checking and user feedback
- Parser: Tokenizes user input and handles command-line arguments
- Executor: Manages built-in vs external command execution
- Command Handler: Implements core shell commands
- Utils: Provides common utility functions
- Dynamic buffer allocation for input handling
- Automatic memory cleanup after each command
- Reallocation for growing input buffers
make # Standard build
make clean # Clean object files- Clean, readable C code
- Modular architecture with clear separation of concerns
- Comprehensive error handling
- Memory-safe programming practices
Contributions are welcome! Areas for improvement:
- Additional built-in commands
- Command history and navigation
- Tab completion
- Configuration file support
- Advanced scripting features
This project is licensed under the GNU General Public License v3.0.
You are free to use, modify, and distribute this software under the terms of the GPLv3.
See the LICENSE file for full details.
Built with β€οΈ in C
Skull Shell - Where power meets simplicity
