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
