Learn

LUKS: full-disk encryption on Linux

LUKS (Linux Unified Key Setup) is the standard format for full-disk encryption on Linux. It encrypts a whole disk or partition so that without the passphrase the contents are unreadable, which protects data at rest if the machine is lost, stolen, or its drive is pulled.

At a glance

What it is
The standard full-disk encryption format on Linux
What it protects
Data at rest: a powered-off or pulled drive is unreadable
What it does not protect
A running, unlocked machine; once booted the disk is open
Unlock cost
One passphrase at boot, then no runtime penalty worth noticing
Comparison

What LUKS changes about a lost drive

No disk encryption
LUKS at rest
Drive pulled and read elsewhere
Files readable directly
Ciphertext, useless without the passphrase
Machine stolen powered off
Boot from a stick, read everything
Stops at the unlock prompt
Machine running and unlocked
Exposed
Exposed; LUKS only guards data at rest

What does LUKS actually protect?

LUKS (Linux Unified Key Setup) encrypts a disk so that the bytes on it mean nothing without the passphrase. The protection is for data at rest: the moments when the machine is off or the drive is somewhere it should not be. Pull the drive and plug it into another computer, steal the box while it is powered down, or send a dead disk back under warranty, and what would otherwise be a plain copy of your files is just ciphertext.

The threat it answers is physical, not network. For a self-hosted AI box that holds models, keys, and the odd secret, that covers a real and boring risk: hardware leaves the building more often than people expect. Turn it on once, at install time, and forget it is there.

What does LUKS not protect?

A running, unlocked machine. Once you have typed the passphrase at boot, the disk is open for as long as the system is up. LUKS does nothing about an attacker who is already on the live machine, a remote compromise, or malware. Those are jobs for a firewall, access control, and not exposing services you did not mean to.

It also does nothing about a weak passphrase. The encryption is only as strong as the secret in front of it, so a guessable phrase undoes the whole point. And it does not reach your backups: a copy written out somewhere else is only encrypted if you encrypted it there too, which is a separate decision from LUKS on the primary disk.

LUKS guards against

  • A drive pulled from the machine and read on another computer
  • A laptop or box stolen while powered off
  • A failed disk sent back under warranty with data still on it
  • A casual finder booting from a USB stick to browse your files

LUKS does not guard against

  • An attacker on the running, already-unlocked machine
  • A weak passphrase that is guessed or brute-forced
  • Malware or a remote compromise of the live system
  • Backups you wrote out somewhere else without encrypting them

Related terms

← All terms Reviewed: June 2026