╔══════════════════════════════════════╗
║ FILAMENT — USB Tool for Linux ║
╚══════════════════════════════════════╝
A single-file, TUI/CLI USB image writer, formatter, and wiper
Filament is a single C file, TUI/CLI USB tool for Linux.
It writes ISO images to USB drives, formats drives as FAT32/exFAT, wipes drives securely, and does it all with clear safety checks and progress indicators.
No dependencies beyond libc and ncurses. No build system. No hidden magic.
gcc -std=c99 -Wall -Wextra -pedantic -O2 -o filament filament.c -lncurses
sudo ./filament| Key | Action |
|---|---|
1 |
Write ISO to USB |
2 |
Format USB |
3 |
Wipe/Zero USB |
4 / Q |
Quit |
| Key | Action |
|---|---|
↑ / ↓ |
Navigate devices |
Enter |
Select device |
Q |
Back to menu |
| Key | Action |
|---|---|
↑ / ↓ |
Navigate files |
Enter |
Open directory / select file |
Backspace |
Parent directory |
H |
Toggle hidden files |
Q |
Cancel |
| Key | Action |
|---|---|
F |
Cycle filesystem (FAT32 / VFAT / exFAT) |
T |
Toggle partition table (MBR / GPT) |
L |
Set volume label |
Enter |
Start format |
Backspace |
Back |
| Key | Action |
|---|---|
Q |
Quick wipe (first 1 MB) |
F |
Full zero (entire device) |
| Other | Cancel |
All destructive operations require typing the device name (e.g., sdb) to confirm.
# Show version
filament --version
# Show help
filament --help
# List USB devices
sudo filament --list
# Write ISO to USB (with verification)
sudo filament --write /dev/sdb image.iso
# Dry run (shows what would happen)
sudo filament --write /dev/sdb image.iso --dry-run
# Quick wipe (first 1 MB)
sudo filament --wipe /dev/sdb
# Full zero
sudo filament --zero /dev/sdb
# Format as FAT32 (MBR)
sudo filament --format /dev/sdb --fat32
# Format as exFAT (GPT) with label
sudo filament --format /dev/sdb --exfat --gpt --label=MYUSB- Write ISO images — raw write with 4 MB block size, progress bar, speed, ETA
- Verify after write — byte-for-byte comparison of written data
- Format USB drives — FAT32 (with VFAT alias), exFAT
- Partition tables — MBR or GPT (with CRC32 checksums)
- Quick wipe — zeros first 1 MB (kills partition tables and filesystem signatures)
- Full zero — zeros entire device (secure erase)
- Safety checks — refuses to write to mounted devices or system disks
- Device name confirmation — requires typing device name before destructive operations
- Filesystem detection — shows current filesystem and partition table type
- Multi-device support — lists all removable USB devices
- File browser — navigate directories to select ISO, with hidden file toggle
- CLI mode — full functionality without the TUI
- Single file — no headers, no build system, minimal dependencies
- SIGINT handling — Ctrl+C safely interrupts operations
- Filesystem detection — shows current filesystem (FAT32, exFAT, NTFS) and partition table type
Filament is designed to prevent the most common USB tool disasters:
- Mounted device check — refuses to write to any mounted device
- System disk check — refuses to write to devices containing
/or/boot - Device name confirmation — requires typing the device name (e.g.,
sdb) before any destructive operation - Dry run mode — CLI
--dry-runshows what would happen without doing it - Clear device identification — shows model, serial, size, filesystem, and partition table
| Filesystem | Write ISO | Format | Notes |
|---|---|---|---|
| FAT32 | ✓ | ✓ | Universal compatibility, 4 GB file limit |
| VFAT | — | ✓ | Alias for FAT32 with long filename support |
| exFAT | — | ✓ | Large file support, modern systems only |
| NTFS | — | — | Detected, not formattable |
Filament requires only ncurses for its TUI.
# Artix / Arch
sudo pacman -S ncurses
# Debian / Ubuntu
sudo apt install libncurses-dev
# Fedora
sudo dnf install ncurses-devel
# Void
sudo xbps-install ncurses-develFILAMENT/
├── filament.c # the entire program
├── LICENSE # IRX License 1.0
└── README.md # this file
I'll be dead honest here. I fucking hate balenaEtcher, Rufus isn't portable to Linux, and dd reminds me of drinking 2 liters of red wine with not so great outcomes.
Filament is simple, safe, fast, and works. It does one thing well, among a few other things.
Contributions welcome. Keep it simple — Filament is intentionally a single file with minimal dependencies.
Licensed under the IRX License 1.0 © realvolk 2026.