LSMTD(8)
π LSMTD β the mtd-utils girlies' guide to listing memory technology devices π
okay so this is lsmtd(8) from the System Manager's Manual and bestie it's SO much simpler than it looks. it lives in section 8 of the manual (that's the sysadmin section, iykyk) and it's literally just "tell me about my MTD and UBI devices". we're gonna get through this together π«Ά
β¨ NAME β¨
lsmtd β list memory technology devices πΈ
π SYNOPSIS π
lsmtd [options] [device...]
π DESCRIPTION π
lsmtd lists info about all available MTD and UBI devices, or just the ones you name. the way it works is: lsmtd reads the sysfs filesystem to gather its info. and if sysfs isn't available? no worries bestie, it falls back to the procfs filesystem and ioctl interfaces instead. adaptable queen π
by default the command prints all MTD and UBI devices in a pretty-printed list format. very demure, very mindful.
ok but listen β the default output is subject to change. so whenever possible, avoid using default outputs in your scripts, fr fr. always explicitly define expected columns by using --output columns-list in environments where a stable output is required. protect your scripts, protect your peace π
use lsmtd --help to get a list of all available columns. that's your cheat sheet.
π OPTIONS π
-b,--bytesβ print columns with size quantities (like erase block size) in bytes instead of a human-readable format. numbers, numbers, numbers π’-h,--helpβ display a help text and exit. the classic escape hatch.-i,--asciiβ only use ascii characters for pretty printing. for when the fancy box-drawing characters aren't it π₯²-J,--jsonβ use JSON output format. all potentially unsafe characters in string values are escaped with JSON escape sequences or hex-escaped (\u<code>). machine-readable slay β¨-l,--listβ use a pretty-printed list output format. this is the default, so it's the main character π-m,--no-ubiβ do not display information about UBI devices or volumes. MTD only, no UBI energy.-n,--noheadingsβ do not print column headings when using raw or list output format. headers? never heard of her.-o,--outputlist β specify which output columns to print. use--helpto get a list of all supported columns.- the default list of columns may be extended if list is specified in the format
+list(e.g.lsmtd -o +EB-SIZE). the plus sign is doing the heavy lifting there π
- the default list of columns may be extended if list is specified in the format
-O,--output-allβ output all available columns. give me EVERYTHING π€-P,--pairsβ produce output in the form ofkey="value"pairs. all potentially unsafe characters are hex-escaped (\x<code>).-r,--rawβ produce output in raw format. all potentially unsafe characters are hex-escaped (\x<code>).-u,--si-unitsβ display human readable sizes as powers of ten rather than powers of two. metric units, metric mindset π-V,--versionβ print version information and exit.-x,--sortcolumn β sort output lines by column. organize, bestie π
π NOTES π
if the --bytes option is not specified, the JSON output format prints sizes as string values even if they do not have a suffix. yes, even then. that's just how it is π«
π«Ά AUTHORS π«Ά
David Oberhollenzer <david.oberhollenzer@sigma-star.at>
π REPORTING BUGS π
report mtd-utils bugs to the Linux mtd mailing list.
- Linux mtd mailing list:
<linux-mtd@lists.infradead.org> - Linux mtd home page:
<http://www.linux-mtd.infradead.org/>
π¦ AVAILABILITY π¦
the lsmtd command is part of the mtd-utils package and is available from ftp://ftp.infradead.org/pub/mtd-utils/.
βοΈ COPYRIGHT βοΈ
Copyright Β© 2017 David Oberhollenzer - sigma star gmbh
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl2.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. no cap, zero warranty, read it and weep π
π SEE ALSO π
and that's the whole page bestie!! π this was mtd-utils, dated April 2017, and the page is LSMTD(8). go forth and list your memory technology devices, you absolute icon π¦β¨
π¦ where this page comes from
- alpine 3.22: mtd-utils-doc 2.2.1-r0 Β· GPL-2.0-only
- alpine 3.23: mtd-utils-doc 2.2.1-r0 Β· GPL-2.0-only
- alpine 3.24: mtd-utils-doc 2.2.1-r0 Β· GPL-2.0-only
- arch rolling: mtd-utils 2.3.1-1 Β· GPL-2.0-only
- debian bookworm: mtd-utils 1:2.1.5-1 Β· GPL-2.0-or-later
- debian trixie: mtd-utils 1:2.3.0-1 Β· GPL-2.0-or-later
- fedora 43: mtd-utils 2.2.1-3.fc43 Β· GPL-2.0-or-later
- fedora 44: mtd-utils 2.2.1-4.fc44 Β· GPL-2.0-or-later
- nixos 26.05: mtd-utils 2.3.1
- nixpkgs unstable: mtd-utils 2.3.1
- opensuse-leap 16.0: mtd-utils 2.2.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mtd-utils 2.2.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mtd-utils 2.2.0-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: mtd-utils 2.2.0-bp160.1.12 Β· GPL-2.0-or-later
- ubuntu jammy: mtd-utils 1:2.1.4-1 Β· GPL-2.0-or-later
- ubuntu noble: mtd-utils 1:2.2.0-1ubuntu2 Β· GPL-2.0-or-later
- ubuntu questing: mtd-utils 1:2.3.0-1ubuntu1
- ubuntu resolute: mtd-utils 1:2.3.0-1ubuntu2 Β· GPL-2.0-or-later
- ubuntu stonking: mtd-utils 1:2.3.1-3ubuntu3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms