Skip to main content
lsdisk — Linux Storage Explorer

Cross-distro Linux Storage Explorer

Understand your disks, partitions, and filesystems — clearly, safely, and from the terminal.

Latest Release License Python Platform GitHub Stars


About lsdisk

lsdisk is a Linux storage inspection tool designed to make information about HDDs, SSDs, partitions, and filesystems easier to understand.

It brings storage topology and filesystem capacity information together in a structured terminal interface. lsdisk is read-only: it inspects storage and does not format, partition, mount, or modify filesystems.


lsdisk Demo

Live demonstration of lsdisk v0.1.1 inspecting Linux storage devices in the terminal.

Features

  • Physical storage inventory — show detected disks and their child partitions in a hierarchical view.
  • Device details — display device names, capacity, model, physical/virtual classification, and HDD or SSD/Flash indicators when the system provides enough information.
  • Filesystem capacity — report total, used, free, and user-available capacity for accessible mounted filesystems.
  • Mountpoint visibility — associate filesystem information with mountpoints where the relationship can be established.
  • Filesystem grouping — group related filesystem records to avoid repeating capacity for multiple mountpoints, including supported Btrfs subvolume cases.
  • Utilization bars — display a compact visual usage bar and percentage in the terminal. The filled bar and percentage use utilization colors: green below 70%, yellow from 70% to below 90%, and red at 90% or above.
  • Multiple output modes — provide a compact default view, expanded output, table output, and JSON output.
  • Graceful handling of missing data — distinguish unavailable information from a confirmed zero value.

Capacity values depend on the information available from the running Linux system. Physical disk capacity and mounted filesystem capacity describe different layers and should not be treated as interchangeable.

Design principles

Principle What it means
Read-only inspection Do not modify disks, partitions, or filesystems.
Modular architecture Keep data collection, analysis, serialization, and presentation separated.
Portability Avoid unnecessary dependencies on a specific Linux distribution.
Transparency Distinguish confirmed values from estimates or unavailable data.
Testability Validate calculations and behavior with automated tests.

Technology

  • Python — application logic.
  • Rich — terminal presentation and colored utilization bars.
  • Python standard library — core APIs and supporting functionality.
  • Linux interfaces, including /sys and /proc, where appropriate.
  • os.statvfs() — mounted filesystem capacity statistics.
  • unittest — automated testing.

Requirements

  • Linux
  • Python 3.11 or newer
  • curl and tar for the shell installer

The installer creates an isolated Python virtual environment and installs the Python dependencies. Some storage information may depend on available system interfaces, permissions, and the storage configuration.

Installation

The installation script downloads lsdisk, creates an isolated Python virtual environment, and installs the lsdisk command for the current user:

curl -sSL https://raw.githubusercontent.com/SammMartins/lsdisk/main/install.sh | bash

The installer does not require sudo and refuses to run as root. By default, it stores application data in ~/.local/share/lsdisk and the executable in ~/.local/bin. If ~/.local/bin is not in your PATH, follow the instruction printed by the installer.

Run lsdisk:

lsdisk

Show available options:

lsdisk --help

To install from a different branch, set LSDISK_BRANCH before running the installer:

curl -sSL https://raw.githubusercontent.com/SammMartins/lsdisk/main/install.sh | LSDISK_BRANCH=main bash

Uninstallation

If uninstall.sh is available locally, run it as your regular user, without sudo:

bash uninstall.sh

The uninstaller removes the per-user launcher and application data directory. It does not delete the local Git repository or project source files.

Usage

lsdisk
lsdisk --all
lsdisk --table-mode
lsdisk --json
lsdisk --help
  • lsdisk displays the default compact storage view.
  • lsdisk --all displays expanded inventory details, including additional devices and mount information.
  • lsdisk --table-mode selects table output.
  • lsdisk --json emits machine-readable JSON without terminal UI formatting.
  • lsdisk --help lists the options supported by the installed version.

Use the output of lsdisk --help as the source of truth for the options available in a specific release.

Development status

lsdisk is in early development. Features and interfaces may change as the project evolves. The current implementation focuses on block-device topology and capacity information for mounted filesystems.

Roadmap

  • Identify filesystem types on unmounted partitions without mounting them.
  • Collect filesystem labels and UUIDs more completely.
  • Improve identification of partitions whose filesystem information is unavailable.
  • Expand validated handling of Btrfs, LVM, RAID, LUKS, and other storage layers.

These items are planned improvements, not guarantees of the current implementation.

Project documentation

Safety scope

lsdisk is intended for storage inspection only. Formatting, partitioning, filesystem modification, and automatic mounting are outside the project's scope.

License

lsdisk is distributed under the MIT License.


lsdisk — making Linux storage easier to explore.

Metadata

Release files for lsdisk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lsdisk 0.1.1
File Size Uploaded
lsdisk-0.1.1.tar.gz 22.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lsdisk 0.1.1
File Interpreter ABI Platform
lsdisk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.6 kB

Release files / lsdisk-0.1.1.tar.gz

Download URL lsdisk-0.1.1.tar.gz
Size 22.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8b2e043e0e0b895179792d5c588a094ec0a48d02f254eba195a742199be42769
BLAKE2b-256 checksum
How to use checksums
e55f0e90c3b32f79d18af6e77e68fd81c9b455d1517b210b30caf81baf8718e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / lsdisk-0.1.1-py3-none-any.whl

Download URL lsdisk-0.1.1-py3-none-any.whl
Size 18.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6f5e8a6b53e05d279c5af4407c160be7e41e2e9fbcdab7bcb86fe223336bcdb
BLAKE2b-256 checksum
How to use checksums
045db1392460c27d535c7b289c79a08493a32346b07b9e906cbd90936f85bbbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page