LinuxCommandLibrary

btrfs-version

Show btrfs filesystem version information

TLDR

Display help

$ btrfs [[v|version]] --help
copy

Display version
$ btrfs [[v|version]]
copy

SYNOPSIS

btrfs version

DESCRIPTION

The btrfs version command (often referenced as part of the btrfs-progs suite) outputs the version details of the BTRFS userspace utilities. BTRFS is a advanced Linux filesystem with copy-on-write semantics, supporting snapshots, subvolumes, compression, quotas, RAID levels, and checksumming for data integrity.

This utility is crucial for administrators managing BTRFS filesystems. It reports the exact btrfs-progs release, compatible kernel versions, build date, and compiler flags. This information aids in diagnosing issues, confirming tool-kernel compatibility, and verifying updates from repositories like those maintained by the BTRFS project.

Typically invoked standalone, it provides concise output for scripting or quick checks. For example, it helps ensure tools match kernel modules before operations like mkfs.btrfs or filesystem repairs. Regular use is recommended during upgrades to avoid version mismatches that could lead to errors.

TYPICAL OUTPUT

$ btrfs version
Btrfs v6.7
See https://btrfs.readthedocs.io for release information.
libbtrfsutil v6.7
compiled with libzstd 1.5.4, libuuid none, libmdraid none
See the btrfs wiki for details.
Node size: 4096
Leaf size: 4096
Metadata: UUID tree
Global: UUID tree

USAGE NOTE

Also accessible via btrfs --version for global option compatibility. Always run before major filesystem operations.

HISTORY

Developed alongside BTRFS kernel code initiated in 2007 by Chris Mason at Oracle, btrfs-progs (including the version subcommand) first appeared in 2009. It evolved with kernel integration, reaching stable status in Linux 2.6.37 (2011). Modern versions (e.g., v6.x) support ongoing features like zoned storage and enhanced send/receive.

SEE ALSO

btrfs(8), mkfs.btrfs(8), btrfstune(8), btrfs-check(8)

Copied to clipboard