How Do You Install ZFS on Debian Linux?

Problem scenario
You want to use ZFS (e.g., and run zpool commands or use ZFS to modify volumes) on a Debian/Ubuntu Linux system. What should you do?

Solution
Run these commands:

sudo apt-get install zlib1g-dev uuid-dev libblkid-dev pkg-config libssl-dev
sudo apt-get -y update && sudo apt-get -y install build-essential

codename=$(lsb_release -cs);echo "deb http://deb.debian.org/debian $codename-backports main contrib non-free"|sudo tee -a /etc/apt/sources.list && sudo apt update

sudo apt -y install zfs-dkms zfsutils-linux # if you get a prompt, read the message and do what you think is best

wget https://github.com/openzfs/zfs/releases/download/zfs-2.3.3/zfs-2.3.3.tar.gz
sudo mv zfs-2.3.3.tar.gz /opt
cd /opt

sudo tar -xvzf zfs-2.3.3.tar.gz
cd zfs-2.3.3
./configure
make # this can take more than 30 minutes
sudo make install

sudo apt install linux-headers-$(uname -r)

Test it out with this command:

sudo zpool list

If you want to see what version of ZFS you have installed, run either of these commands:

dpkg -s zfsutils-linux | grep Version
dpkg -s zfs-dkms | grep Version

Leave a comment

Your email address will not be published. Required fields are marked *