sdm Image and Disk management commands
April 21, 2026 · View on GitHub
sdm has several simple convenience commands to assist with managing a RasPiOS IMG or burned disk. Every one of these commands complete tasks that can of course be done other ways, but are included for their ease of use.
The command format is:
sdm <command> /path/to/img [arg1] [arg2]
The commands and their arguments are described below. DEVIMG can be either a burned disk (/dev/sdX) or a path to an IMG (/path/to/IMG)
sdm cat DEVIMG /path/to/file— cat the file in the IMG/path/to/filesdm df DEVIMG— Rundfon the specified IMG or devicesdm journalctl DEVIMG— Runjournalctl --booton the system journal in the IMGsdm jc DEVIMG— A synonym for journalctlsdm jca DEVIMG— Runjournalctlon the system journal in the IMG to display journal entries from all bootssdm jcall DEVIMG— A synonym forjcasdm less DEVIMG /path/to/file— Runlesson the file/path/to/filein the IMGsdm list-boots DEVIMG— Runjournalctl --list-bootson the system journal in the IMG to list the system bootssdm ls DEVIMG /path/to/file— runls -alon/path/to/filein the IMGsdm rm DEVIMG /path/to/file— Runrm -fon/path/to/filein the IMGsdm rmdir DEVIMG /path/to/dir— Runrmdir -rfon the directory/path/to/dirin the IMGsdm get DEVIMG /path/to/srcfile /path/to/output-dir— Copy the file from/path/to/srcfilein the IMG to/path/to/output-diron the hostsdm put DEVIMG /path/to/srcfile /path/to/output-dir— Copy/path/to/srcfileon the host system to the directory/path/to/output-dirin the IMG. The directory must exist.