Why is lsblk not included in base install?

But that's the thing. There's no native FreeBSD way to display what lsblk compiles into one output. There's a reason Linux sees heavy use of lsblk. I use lsblk a lot on FreeBSD. It's the first thing I wanted to use when I started using FreeBSD. 🥺
I use geom commands for disk management stuff on FreeBSD, but like the layout lsblk provides to show how partitions are laid out:
Code:
DEVICE         MAJ:MIN SIZE TYPE                                    LABEL MOUNT
nda0             0:81  954G GPT                                         - -
  nda0p1         0:83  260M efi                                   gpt/efi /boot/efi
  nda0p2         0:85  950G freebsd-ufs                   gpt/freebsd-ufs /
  nda0p3         0:87    4G freebsd-swap                 gpt/freebsd-swap SWAP

I install it real quick for the output like fastfetch and hw-probe, then remove it (likely don't need it anymore that install); iirc I heard it was a port of the Linux tool only for showing layouts and it didn't seem a good idea to use its output for actual disk management vs native geom.
 
Seems its not that simple :)
Oh it is, but who/what's in the middle of our information exchange? I'm not going to post a screen grab of a manage (waste of resources) but we're good (interesting that you choose to copy paste the mdoc code, though).

I'm fairly okay at some technical manuals but this one is about something I don't know anything about so it will be very difficult without some one providing better/more information and proofreading (unless you really do not want a manpage).
 
I use geom commands for disk management stuff on FreeBSD, but like the layout lsblk provides to show how partitions are laid out:
Code:
DEVICE         MAJ:MIN SIZE TYPE                                    LABEL MOUNT
nda0             0:81  954G GPT                                         - -
  nda0p1         0:83  260M efi                                   gpt/efi /boot/efi
  nda0p2         0:85  950G freebsd-ufs                   gpt/freebsd-ufs /
  nda0p3         0:87    4G freebsd-swap                 gpt/freebsd-swap SWAP

I install it real quick for the output like fastfetch and hw-probe, then remove it (likely don't need it anymore that install); iirc I heard it was a port of the Linux tool only for showing layouts and it didn't seem a good idea to use its output for actual disk management vs native geom.

From the FreeBSD Base System this is similar ...

Code:
% geom -t | grep -v DEV
Geom               Class      Provider
nda0               DISK       nda0
  nda0             PART       nda0p1
    nda0p1         LABEL      gpt/efiboot0
  nda0             PART       nda0p2
    nda0p2         LABEL      gpt/gptboot0
  nda0             PART       nda0p3
    nda0p3         LABEL      gpt/swap0
      swap         SWAP     
  nda0             PART       nda0p4
    nda0p4.eli     ELI        nda0p4.eli
nda1               DISK       nda1
  nda1             PART       nda1p1
    nda1p1.eli     ELI        nda1p1.eli
da0                DISK       da0
 
I will try to add at least some basic man page in the next release then ... seems to be very wanted.
There you go. Feel free to use it.

Screenshot_20260117_174242-1.png


Code:
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Proposed manual page source for FreeBSD lsblk(8).
.\"
.Dd January 17, 2026
.Dt LSBLK 8
.Os
.Sh NAME
.Nm lsblk
.Nd list block devices and their device trees
.Sh SYNOPSIS
.Nm
.Op Ar disk
.Nm
.Fl d
.Nm
.Fl -disks
.Nm
.Fl -version
.Nm
.Fl -help
.Sh DESCRIPTION
The
.Nm
utility prints a tree-oriented view of block devices present in the system.
The output is intended to provide a compact summary of whole disks, partition
schemes, partitions, and related providers (for example, encryption layers),
including size and basic identification.
.Pp
If the optional
.Ar disk
operand is specified, only the device tree rooted at that disk-like device is
displayed (for example,
.Cm ada0
or
.Cm da1 ) .
.Pp
The default output format is columnar.
Typical columns include:
.Bl -tag -width "MAJ:MIN" -compact
.It Cm DEVICE
Device or provider name.
.It Cm MAJ:MIN
Device numbers, formatted as major:minor when available.
.It Cm SIZE
Size of the device or provider.
.It Cm TYPE
Provider type or partition type (for example,
.Cm GPT ,
.Cm MBR ,
.Cm freebsd-ufs ,
.Cm freebsd-zfs ) .
.It Cm LABEL
Label associated with the provider when available.
.It Cm MOUNT
Mount point when available; certain types may display a sentinel such as
.Ql <ZFS>
to indicate managed mounts.
.El
.Sh OPTIONS
.Bl -tag -width "--version" -offset indent
.It Fl d , Fl -disks
Display only whole disks (no partition/provider tree expansion).
This mode is commonly used to summarize inventory and model information.
.It Fl -help
Display a brief usage message and exit.
.It Fl -version
Display version information and exit.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
List all block devices in the system:
.Bd -literal -offset indent
# lsblk
DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
ada0             0:92  932G GPT                           - -
  ada0p1         0:100 200M efi                    efiboot0 -
  ada0p2         0:101 512K freebsd-boot           gptboot0 -
  <FREE>         -:-   492K -                             - -
  ada0p3         0:102 931G freebsd-zfs                zfs0 <ZFS>
  ada0p3.eli     0:106 931G freebsd-zfs                   - <ZFS>
.Ed
.Pp
List only the
.Cm da1
device tree:
.Bd -literal -offset indent
# lsblk da1
DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
da1              0:80  2.0G MBR                           - -
  da1s1          0:80  2.0G freebsd                       - -
    da1s1a       0:81  1.0G freebsd-ufs                root /
    da1s1b       0:82  1.0G freebsd-swap               swap SWAP
.Ed
.Pp
List whole disks only:
.Bd -literal -offset indent
# lsblk -d
DEVICE SIZE MODEL
ada0   1.8T Samsung SSD 860 QVO 2TB
ada1   119G SAMSUNG SSD PM830 mSATA 128GB
-        2T TOTAL SYSTEM STORAGE
.Ed
.Pp
Display version information:
.Bd -literal -offset indent
# lsblk --version
.Ed
.Pp
Restrict output to a disk, while still using disk-only mode (useful on systems
with many devices):
.Bd -literal -offset indent
# lsblk -d ada0
.Ed
.Pp
Enumerate physical disks as seen by the kernel (useful for establishing the set
of disk roots prior to invoking
.Nm ) :
.Bd -literal -offset indent
# sysctl kern.disks
kern.disks: ada0 da0 da1
.Ed
.Pp
List memory-backed disks (for example,
.Xr md 4
devices) and then display each device tree:
.Bd -literal -offset indent
# mdconfig -l
md0
# lsblk md0
.Ed
.Pp
Produce a compact report by combining whole-disk output with standard text tools:
.Bd -literal -offset indent
# lsblk -d | awk 'NR==1 || $1 ~ /^ada/ { print }'
.Ed
.Sh SEE ALSO
.Xr sysctl 8 ,
.Xr mdconfig 8 ,
.Xr gpart 8 ,
.Xr geom 8 ,
.Xr geli 8 ,
.Xr zfs 8 ,
.Xr zpool 8
.Sh STANDARDS
The
.Nm
utility is not specified by any standard.
.Sh AUTHORS
This manual page is a proposed reference for a FreeBSD
.Nm
implementation.
.Sh BUGS
Column availability and the meaning of certain sentinel values depend on the
underlying device types and system configuration.
 
There you go. Feel free to use it.

View attachment 24966

Code:
.\" SPDX-License-Identifier: BSD-2-Clause
.\"
.\" Proposed manual page source for FreeBSD lsblk(8).
.\"
.Dd January 17, 2026
.Dt LSBLK 8
.Os
.Sh NAME
.Nm lsblk
.Nd list block devices and their device trees
.Sh SYNOPSIS
.Nm
.Op Ar disk
.Nm
.Fl d
.Nm
.Fl -disks
.Nm
.Fl -version
.Nm
.Fl -help
.Sh DESCRIPTION
The
.Nm
utility prints a tree-oriented view of block devices present in the system.
The output is intended to provide a compact summary of whole disks, partition
schemes, partitions, and related providers (for example, encryption layers),
including size and basic identification.
.Pp
If the optional
.Ar disk
operand is specified, only the device tree rooted at that disk-like device is
displayed (for example,
.Cm ada0
or
.Cm da1 ) .
.Pp
The default output format is columnar.
Typical columns include:
.Bl -tag -width "MAJ:MIN" -compact
.It Cm DEVICE
Device or provider name.
.It Cm MAJ:MIN
Device numbers, formatted as major:minor when available.
.It Cm SIZE
Size of the device or provider.
.It Cm TYPE
Provider type or partition type (for example,
.Cm GPT ,
.Cm MBR ,
.Cm freebsd-ufs ,
.Cm freebsd-zfs ) .
.It Cm LABEL
Label associated with the provider when available.
.It Cm MOUNT
Mount point when available; certain types may display a sentinel such as
.Ql <ZFS>
to indicate managed mounts.
.El
.Sh OPTIONS
.Bl -tag -width "--version" -offset indent
.It Fl d , Fl -disks
Display only whole disks (no partition/provider tree expansion).
This mode is commonly used to summarize inventory and model information.
.It Fl -help
Display a brief usage message and exit.
.It Fl -version
Display version information and exit.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
List all block devices in the system:
.Bd -literal -offset indent
# lsblk
DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
ada0             0:92  932G GPT                           - -
  ada0p1         0:100 200M efi                    efiboot0 -
  ada0p2         0:101 512K freebsd-boot           gptboot0 -
  <FREE>         -:-   492K -                             - -
  ada0p3         0:102 931G freebsd-zfs                zfs0 <ZFS>
  ada0p3.eli     0:106 931G freebsd-zfs                   - <ZFS>
.Ed
.Pp
List only the
.Cm da1
device tree:
.Bd -literal -offset indent
# lsblk da1
DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
da1              0:80  2.0G MBR                           - -
  da1s1          0:80  2.0G freebsd                       - -
    da1s1a       0:81  1.0G freebsd-ufs                root /
    da1s1b       0:82  1.0G freebsd-swap               swap SWAP
.Ed
.Pp
List whole disks only:
.Bd -literal -offset indent
# lsblk -d
DEVICE SIZE MODEL
ada0   1.8T Samsung SSD 860 QVO 2TB
ada1   119G SAMSUNG SSD PM830 mSATA 128GB
-        2T TOTAL SYSTEM STORAGE
.Ed
.Pp
Display version information:
.Bd -literal -offset indent
# lsblk --version
.Ed
.Pp
Restrict output to a disk, while still using disk-only mode (useful on systems
with many devices):
.Bd -literal -offset indent
# lsblk -d ada0
.Ed
.Pp
Enumerate physical disks as seen by the kernel (useful for establishing the set
of disk roots prior to invoking
.Nm ) :
.Bd -literal -offset indent
# sysctl kern.disks
kern.disks: ada0 da0 da1
.Ed
.Pp
List memory-backed disks (for example,
.Xr md 4
devices) and then display each device tree:
.Bd -literal -offset indent
# mdconfig -l
md0
# lsblk md0
.Ed
.Pp
Produce a compact report by combining whole-disk output with standard text tools:
.Bd -literal -offset indent
# lsblk -d | awk 'NR==1 || $1 ~ /^ada/ { print }'
.Ed
.Sh SEE ALSO
.Xr sysctl 8 ,
.Xr mdconfig 8 ,
.Xr gpart 8 ,
.Xr geom 8 ,
.Xr geli 8 ,
.Xr zfs 8 ,
.Xr zpool 8
.Sh STANDARDS
The
.Nm
utility is not specified by any standard.
.Sh AUTHORS
This manual page is a proposed reference for a FreeBSD
.Nm
implementation.
.Sh BUGS
Column availability and the meaning of certain sentinel values depend on the
underlying device types and system configuration.


Thank you - that would be a really great starting point.

I will add you - Alfredo Llaquet as man page author - which email of yours should I add there?
 
No, I'm creating a tool to create mdoc macros from markdown syntax elements (to make things easier for other developers, and to get better documentation, and "automation", and actual "technical writing", and ...) and you're making the argument about using AI to generate. ...but at least I don't feel like all of those hours spent and my hard work is wasted.
 
No, I'm creating a tool to create mdoc macros from markdown syntax elements (to make things easier for other developers, and to get better documentation, and "automation", and actual "technical writing", and ...) and you're making the argument about using AI to generate. ...but at least I don't feel like all of those hours spent and my hard work is wasted.
Of course your time wasn't wasted. Didn't you have fun doing it? That's what counts first and foremost.
Complete your work. There are still many AI'sts that will use it.
Or don't complete it and do another thing.
 
you should probably credit chatgpt instead, i don't think this guy writes anything himself
That's a personal offense. It makes me very sad that you say that and that you call me "this guy."

I write all my crumbs and my novels. I have a great imagination. I love writing. I only use ChatGPT to detect and point out grammar mistakes, never to rewrite.
 
All the ideas in the crumbs are mine. I never ask ChatGPT for ideas. I don't need it and its ideas would be very bad because it lacks creativity.
 
you just did. while making it a point to disregard all my hard work at creating a tool--I feel like--every skill level could use.
 
Back
Top