disktui

Crates.iodisktui
lib.rsdisktui
version1.3.0
created_at2025-10-25 20:52:03.185574+00
updated_at2026-01-12 20:09:46.38884+00
descriptionA terminal-based disk management utility built with Rust and Ratatui
homepage
repositoryhttps://github.com/Maciejonos/disktui
max_upload_size
id1900614
size239,108
Maciej (Maciejonos)

documentation

README

TUI for disk management and partitioning

Demo

https://github.com/user-attachments/assets/841aec6a-0d4b-4738-a637-a3a27469348e

💡 Prerequisites

A Linux based system.

Required packages

  • parted - partition management
  • sfdisk - partition resizing (usually included with util-linux)
  • e2fsprogs - ext4 filesystem support
  • cryptsetup - LUKS encryption support

Optional packages

  • dosfstools - FAT32 filesystem support
  • ntfs-3g - NTFS filesystem support
  • exfatprogs - exFAT filesystem support
  • btrfs-progs - Btrfs filesystem support
  • xfsprogs - XFS filesystem support
  • smartmontools - SMART disk health monitoring

[!WARNING] This tool can perform destructive disk operations.

🚀 Installation

📥 Binary release

You can download the pre-built binaries from the release page

📦 crates.io

You can install disktui from crates.io

cargo install disktui

🐧 Arch Linux

You can install disktui from the AUR using an AUR helper like paru.

paru -S disktui

⚒️ Build from source

Run the following command:

git clone https://github.com/Maciejonos/disktui
cd disktui
cargo build --release

run with

sudo ./target/release/disktui

🪄 Usage

[!IMPORTANT] disktui requires root privileges to perform disk operations.

sudo disktui

⌨️ Keybindings

Global

Tab or Shift + Tab: Switch between disks and partitions sections.

j or Down: Scroll down.

k or Up: Scroll up.

?: Show help.

q or Esc: Quit the app.

Ctrl + c: Force quit.

Disks

i: Show detailed disk information and SMART data.

f: Format entire disk with a filesystem.

p: Create a new partition table (GPT/MBR).

n: Create a new partition.

Partitions

f: Format selected partition.

m: Mount/unmount selected partition.

r: Resize selected partition (must be unmounted, encrypted partitions cannot be resized).

d: Delete selected partition.

e: Encrypt partition with LUKS2 (destroys all data).

l: Lock/unlock encrypted partition (requires passphrase).

Theming

disktui follows terminal ANSI colors

🔐 LUKS Encryption

Press e to encrypt a partition with LUKS2, then l to lock/unlock it (requires passphrase). Encrypted partitions show 🔒 (locked) or 🔓 (unlocked) and must be unlocked before mounting or formatting.

⚖️ License

MIT

Commit count: 18

cargo fmt