$linuxjunkies
>

mokutil(1)

Manage UEFI Secure Boot keys and Machine Owner Key (MOK) settings.

UbuntuDebianFedoraArch

Synopsis

mokutil [OPTION]...

Description

mokutil is a utility for managing the Machine Owner Key (MOK) in UEFI firmware, which extends Secure Boot trust beyond manufacturer keys. It allows users to enroll, revoke, and list keys that control which kernels and modules can boot on their system.

Changes made with mokutil typically require reboot and confirmation via the MOK management screen (blue screen during boot). This tool is essential for systems running Secure Boot where you need to boot unsigned kernels or modules, such as custom kernels or out-of-tree drivers.

Common options

FlagWhat it does
--list-enrolledDisplay all currently enrolled MOK certificates
--list-newShow MOK certificates pending enrollment (awaiting reboot confirmation)
--list-deleteList MOK certificates pending deletion
--import <DER_FILE>Enroll a new certificate from a DER file; requires password confirmation at next boot
--delete <DER_FILE>Remove a certificate from MOK list; requires reboot confirmation
--revokeRevoke the current MOK list and start fresh (interactive)
--enable-validationEnable UEFI Secure Boot validation
--disable-validationDisable UEFI Secure Boot validation without removing keys
--sb-stateDisplay current Secure Boot state (enabled/disabled)
--test-keyCheck if a key is already enrolled in MOK
--hashDisplay SHA256 hash of a certificate file

Examples

Check if Secure Boot is currently enabled or disabled on the system

mokutil --sb-state

Show all MOK certificates currently enrolled and trusted by the firmware

mokutil --list-enrolled

Queue a new certificate for enrollment; you'll set a password and confirm at next boot

mokutil --import my-key.der

Check if a specific certificate is already enrolled in MOK without listing all keys

mokutil --test-key my-key.der

Remove a certificate from MOK after confirming with a password at reboot

mokutil --delete old-key.der

Disable Secure Boot validation while keeping MOK keys enrolled (requires reboot)

mokutil --disable-validation

Display the SHA256 hash of a certificate to verify its identity

mokutil --hash my-cert.der

Related commands