← 返回命令列表

Linux command

rpi-imager 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Launch the GUI

rpi-imager

Write an image in headless CLI mode

rpi-imager --cli [image.img] [/dev/sdX]

Write and verify against a known SHA-256

rpi-imager --cli --sha256 [hash] [image.img] [/dev/sdX]

Write without verification (faster, no integrity check)

rpi-imager --cli --disable-verify [image.img] [/dev/sdX]

Quiet CLI mode

rpi-imager --cli --quiet [image.img] [/dev/sdX]

Use a custom OS list repository

rpi-imager --repo [https://your-host/os-list.json]

Disable telemetry

rpi-imager --disable-telemetry

说明

rpi-imager is the official Raspberry Pi imaging tool for writing operating-system images onto SD cards and USB drives. The GUI handles image discovery, download, and first-boot customization (hostname, SSH, Wi-Fi, locale, timezone, user account). The --cli mode is a scripting interface: it writes a single image to a single device and verifies the result. Customization options such as hostname and Wi-Fi are only exposed in the GUI — they are not CLI flags. The tool downloads and caches official and third-party images from a JSON list, verifies the download by checksum, and re-reads the device after writing to detect silently failing SD cards.

参数

--cli
Command-line mode — no GUI is shown.
--debug
Verbose debug output; on Windows a console window is attached.
--version
Print the application version and exit.
--repo _URL_
Load the OS list from a custom URL or local file path.
--qm _FILE_
Load a custom Qt `.qm` translation file.
--refresh-interval _MIN_
Seconds between OS-list refreshes (minimum 1440 minutes when non-zero).
--refresh-jitter _MIN_
Jitter added to the refresh interval (minimum 180 minutes when non-zero).
--disable-telemetry, --enable-telemetry
Turn off or restore telemetry. The setting is persisted.
--disable-verify
CLI only. Skip the post-write re-read verification pass.
--sha256 _HASH_
CLI only. Verify the written data matches the given SHA-256.
--quiet
CLI only. Suppress progress output.
--help
Display usage information.

FAQ

What is the rpi-imager command used for?

rpi-imager is the official Raspberry Pi imaging tool for writing operating-system images onto SD cards and USB drives. The GUI handles image discovery, download, and first-boot customization (hostname, SSH, Wi-Fi, locale, timezone, user account). The --cli mode is a scripting interface: it writes a single image to a single device and verifies the result. Customization options such as hostname and Wi-Fi are only exposed in the GUI — they are not CLI flags. The tool downloads and caches official and third-party images from a JSON list, verifies the download by checksum, and re-reads the device after writing to detect silently failing SD cards.

How do I run a basic rpi-imager example?

Run `rpi-imager` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --cli do in rpi-imager?

Command-line mode — no GUI is shown.