ZFS Commands

Complete ZFS commands reference — 93 commands across 24 categories. Quick reference cheat sheet for Linux, FreeBSD & illumos.

OpenZFS is administered through two commands: zpool for the storage pool and its disks, and zfs for the datasets, snapshots and properties inside it. The table lists every subcommand from the manual pages; the notes below follow the order in which an administrator actually meets them.

General (6)

ShortcutAction
zfs -?Displays a help message
zfs -V, --versionDisplays the software version of the zfs userland utility
zfs version [-j]Displays the software version of the zfs userland utility
zpool -?Displays a help message
zpool -V, --versionDisplays the software version of the zpool userland
zpool version [-j]Displays the software version of the zpool userland

Dataset Management (5)

ShortcutAction
zfs listLists the property information for the given datasets
zfs createCreates a new ZFS file system or volume
zfs destroyDestroys the given dataset(s), snapshot(s), or bookmark
zfs renameRenames the given dataset (filesystem or snapshot)
zfs upgradeManage upgrading the on-disk version of filesystems

Snapshots (5)

ShortcutAction
zfs snapshotCreates snapshots with the given names
zfs rollbackRoll back the given dataset to a previous snapshot
zfs holdAdd or remove a hold reference to the specified snapshot
zfs releaseAdd or remove a hold reference to the specified snapshot
zfs diffDisplay the difference between a snapshot of a given

Clones (2)

ShortcutAction
zfs cloneCreates a clone of the given snapshot
zfs promotePromotes a clone file system to no longer be dependent

Send & Receive (4)

ShortcutAction
zfs sendGenerate a send stream, which may be of a filesystem
zfs receiveCreates a snapshot whose contents are as specified
zfs bookmarkCreates a new bookmark of the given snapshot or bookmark
zfs redactGenerate a new redaction bookmark

Properties (3)

ShortcutAction
zfs getDisplays properties for the given datasets
zfs setSets the property or list of properties to the given
zfs inheritClears the specified property

Quotas (4)

ShortcutAction
zfs userspaceDisplays space consumed by, and quotas on, each user
zfs groupspaceDisplays space consumed by, and quotas on, each user
zfs projectspaceDisplays space consumed by, and quotas on, each user
zfs projectList, set, or clear project ID and/or inherit flag

Mountpoints (2)

ShortcutAction
zfs mountDisplays all ZFS file systems currently mounted
zfs unmountUnmounts currently mounted ZFS file systems

Shares (2)

ShortcutAction
zfs shareShares available ZFS file systems
zfs unshareUnshares currently shared ZFS file systems

Delegated Administration (2)

ShortcutAction
zfs allowDelegate permissions on the specified filesystem or volume
zfs unallowRemove delegated permissions on the specified filesystem

Encryption (3)

ShortcutAction
zfs change-keyAdd or change an encryption key on the specified dataset
zfs load-keyLoad the key for the specified encrypted dataset
zfs unload-keyUnload a key for the specified dataset

Channel Programs (1)

ShortcutAction
zfs programExecute ZFS administrative operations programmatically via

Data rewrite (1)

ShortcutAction
zfs rewriteRewrite specified files without modification

Jails (2)

ShortcutAction
zfs jailAttaches a filesystem to a jail
zfs unjailDetaches a filesystem from a jail

Waiting (1)

ShortcutAction
zfs waitWait for background activity in a filesystem to complete

Pool Creation (2)

ShortcutAction
zpool createCreates a new storage pool containing the virtual devices
zpool initializeBegins initializing by writing to all unallocated regions

Pool Destruction (2)

ShortcutAction
zpool destroyDestroys the given pool
zpool labelclearRemoves ZFS label information from the specified device

Virtual Devices (6)

ShortcutAction
zpool attachConverts a non-redundant disk into a mirror
zpool detachConverts a non-redundant disk into a mirror
zpool addAdds the specified virtual devices to the given pool
zpool removeAdds the specified virtual devices to the given pool
zpool replaceReplaces an existing device
zpool splitCreates a new pool by splitting all mirrors in an existing

Pool Properties (3)

ShortcutAction
zpool listLists the given pools along with a health status and space
zpool getRetrieves the given list of properties
zpool setRetrieves the given list of properties

Monitoring (4)

ShortcutAction
zpool statusDisplays the detailed health status for the given pools
zpool iostatDisplays logical I/O statistics for the given pools/vdevs
zpool eventsLists all recent events generated by the ZFS kernel
zpool historyDisplays the command history of the specified pool(s)

Maintenance (8)

ShortcutAction
zpool prefetchPrefetches specific types of pool data
zpool scrubBegins a scrub or resumes a paused scrub
zpool condenseCondense, flush
zpool checkpointCheckpoints the current state of pool
zpool trimInitiates an immediate on-demand TRIM operation
zpool syncThis command forces all in-core dirty data to be written
zpool upgradeManage the on-disk format version of storage pools
zpool waitWaits until all background activity of the given types has

Fault Resolution (5)

ShortcutAction
zpool offlineTakes the specified physical device offline or brings
zpool onlineTakes the specified physical device offline or brings
zpool resilverStarts a resilver
zpool reopenReopen all the vdevs associated with the pool
zpool clearClears device errors in a pool

Import & Export (3)

ShortcutAction
zpool importMake disks containing ZFS storage pools available
zpool exportExports the given pools from the system
zpool reguidGenerates a new unique identifier for the pool

Environment Variables (17)

ShortcutAction
ZFS_COLORUse ANSI color in zfs diff and zfs list output
ZFS_MOUNT_HELPERCause zfs mount to use mount(8) to mount ZFS datasets
ZFS_SET_PIPE_MAXTells zfs to set the maximum pipe size for sends/receives
ZFS_MODULE_TIMEOUTTime, in seconds, to wait for /dev/zfs to appear
ZFS_ABORTCause zpool to dump core on exit for the purposes
ZPOOL_AUTO_POWER_ON_SLOTAutomatically attempt to turn on the drives enclosure slot
ZPOOL_POWER_ON_SLOT_TIMEOUT_MSThe maximum time in milliseconds to wait for a slot power
ZPOOL_IMPORT_PATHThe search path for devices or files to use with the pool
ZPOOL_IMPORT_UDEV_TIMEOUT_MSThe maximum time in milliseconds that zpool import will
ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNOREIf set, suppress warning about non-native vdev ashift
ZPOOL_VDEV_NAME_GUIDCause zpool subcommands to output vdev GUIDs by default
ZPOOL_VDEV_NAME_FOLLOW_LINKSCause zpool subcommands to follow links for vdev names
ZPOOL_VDEV_NAME_PATHCause zpool subcommands to output full vdev path names
ZFS_VDEV_DEVID_OPT_OUTOlder OpenZFS implementations had issues when attempting
ZPOOL_SCRIPTS_AS_ROOTAllow a privileged user to run zpool status/iostat -c
ZPOOL_SCRIPTS_PATHThe search path for scripts when running zpool
ZPOOL_SCRIPTS_ENABLEDAllow a user to run zpool status/iostat -c
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Related Shortcut Pages

LVM (Logical Volume) Proxmox VE VMware ESXi Linux Bash / Shell Docker

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts

Pool first, then datasets

zpool create builds a pool from disks and a topology (mirror, raidz), and zpool status is the command you will run most often afterwards — it shows health, errors and any resilver or scrub in progress. zpool list shows capacity, zpool iostat live I/O per device. Inside the pool, zfs create makes a dataset (a filesystem with its own properties), zfs list shows them with used and available space, and zfs set and zfs get change and read properties such as compression, recordsize and mountpoint; zfs inherit resets one to its parent's value.

Snapshots, clones and replication

zfs snapshot is instant and free until data changes, zfs rollback returns a dataset to one, and zfs diff lists what changed between a snapshot and now. zfs clone makes a writable copy of a snapshot, and zfs promote swaps a clone into being the parent so the original can be destroyed. Replication is zfs send piped to zfs receive, incrementally between snapshots; zfs hold prevents a snapshot being destroyed while a send depends on it. zfs destroy removes datasets or snapshots and is the command to type slowly.

Maintenance and recovery

zpool scrub reads every block and repairs from redundancy; schedule it monthly. When a disk fails, zpool replace swaps it and starts a resilver, zpool offline and zpool online take devices out and back, and zpool clear resets error counters once the cause is fixed. zpool export and zpool import move a pool between hosts cleanly. zpool history shows every administrative command ever run on the pool, which settles "who changed that property". zpool trim issues discards to SSDs, and zpool checkpoint lets a risky change be rewound at the pool level.

Frequently asked questions

What is the difference between zpool and zfs?

zpool manages the pool and its physical devices; zfs manages datasets, snapshots and properties inside the pool.

How do I check whether my pool is healthy?

zpool status. ONLINE with no errors is healthy; DEGRADED means a device is missing or failing.

How do I back up a dataset to another machine?

Take a snapshot, then zfs send it through ssh to zfs receive on the other host. Later sends can be incremental between snapshots.

How often should I scrub?

Monthly is a common default; zpool scrub reads all data and repairs silent corruption using redundancy.

🤖 Ask AI about ZFS shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok
📜 Every shortcut on this page is taken from the official ZFS documentation — openzfs.github.io
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.