2010-11-24 10:06:39 -06:00
|
|
|
.\" -*- nroff -*-
|
2011-08-18 15:18:34 -05:00
|
|
|
.TH LSBLK 8 "April 2010" "util-linux" "System Administration"
|
2010-11-24 10:06:39 -06:00
|
|
|
.SH NAME
|
|
|
|
lsblk \- list block devices
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B lsblk
|
|
|
|
.RB [ options ]
|
|
|
|
.sp
|
|
|
|
.B lsblk
|
|
|
|
.RB [ options ]
|
|
|
|
.IR device...
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.B lsblk
|
2011-02-27 09:28:14 -06:00
|
|
|
lists information about all or the specified block devices. The
|
2010-11-24 10:06:39 -06:00
|
|
|
.B lsblk
|
2011-02-01 14:55:54 -06:00
|
|
|
command reads the
|
2010-11-24 10:06:39 -06:00
|
|
|
.I sysfs
|
|
|
|
filesystem to gather information.
|
|
|
|
.PP
|
2011-02-01 14:55:54 -06:00
|
|
|
The command prints all block devices (except RAM disks) in a tree-like format
|
|
|
|
by default. Use
|
2010-11-24 10:06:39 -06:00
|
|
|
.B "lsblk --help"
|
2011-02-01 14:55:54 -06:00
|
|
|
to get a list of all available columns.
|
2010-11-24 10:06:39 -06:00
|
|
|
.SH OPTIONS
|
|
|
|
.IP "\fB\-a, \-\-all\fP"
|
|
|
|
List all block devices.
|
|
|
|
.IP "\fB\-b, \-\-bytes\fP"
|
2011-02-01 14:55:54 -06:00
|
|
|
Print the SIZE column in bytes rather than in human-readable format.
|
2010-12-16 05:47:30 -06:00
|
|
|
.IP "\fB\-d, \-\-nodeps\fP"
|
2011-02-01 14:55:54 -06:00
|
|
|
Don't print device holders or slaves. For example "lsblk --nodeps /dev/sda" prints
|
2010-12-16 05:47:30 -06:00
|
|
|
information about the sda device only.
|
2011-05-04 10:16:05 -05:00
|
|
|
.IP "\fB\-D, \-\-discard\fP"
|
|
|
|
Print information about the discard (TRIM, UNMAP) capabilities for each device.
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-e, \-\-exclude \fIlist\fP
|
2011-02-27 09:28:14 -06:00
|
|
|
Exclude the devices specified by a comma-separated \fIlist\fR of major device numbers.
|
2011-02-01 14:55:54 -06:00
|
|
|
Note that RAM disks (major=1) are excluded by default.
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-f, \-\-fs\fP
|
2011-02-01 14:55:54 -06:00
|
|
|
Output info about filesystems. This option is equivalent to "-o NAME,FSTYPE,LABEL,MOUNTPOINT".
|
|
|
|
The authoritative information about filesystems and raids is provided by the
|
2010-11-24 10:06:39 -06:00
|
|
|
.BR blkid (8)
|
|
|
|
command.
|
|
|
|
.IP "\fB\-h, \-\-help\fP"
|
2011-02-01 14:55:54 -06:00
|
|
|
Print a help text and exit.
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-i, \-\-ascii\fP"
|
2011-05-10 03:38:29 -05:00
|
|
|
Use ASCII characters for tree formatting.
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-m, \-\-perms\fP
|
2011-02-01 14:55:54 -06:00
|
|
|
Output info about device owner, group and mode. This option is equivalent to "-o NAME,SIZE,OWNER,GROUP,MODE".
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-l, \-\-list\fP"
|
|
|
|
Use the list output format.
|
|
|
|
.IP "\fB\-n, \-\-noheadings\fP"
|
|
|
|
Do not print a header line.
|
|
|
|
.IP "\fB\-o, \-\-output \fIlist\fP"
|
2011-02-01 14:55:54 -06:00
|
|
|
Specify which output columns to print. Use
|
2010-11-24 10:06:39 -06:00
|
|
|
.B "--help"
|
2011-02-01 14:55:54 -06:00
|
|
|
to get a list of all supported columns.
|
2011-05-10 03:38:29 -05:00
|
|
|
.IP "\fB\-P, \-\-pairs\fP"
|
2012-03-08 09:04:45 -06:00
|
|
|
Use key="value" output format. All potentially unsafe characters are hex-escaped (\\x<code>).
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-r, \-\-raw\fP"
|
2012-03-08 09:04:45 -06:00
|
|
|
Use the raw output format. All potentially unsafe characters are hex-escaped (\\x<code>).
|
2010-11-24 10:06:39 -06:00
|
|
|
.IP "\fB\-t, \-\-topology\fP"
|
2011-02-01 14:55:54 -06:00
|
|
|
Output info about block device topology.
|
2012-03-09 12:32:43 -06:00
|
|
|
This option is equivalent to "-o NAME,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE".
|
2012-03-05 15:07:10 -06:00
|
|
|
.IP "\fB\-V, \-\-version\fP"
|
|
|
|
Output version information and exit.
|
2011-08-29 04:33:27 -05:00
|
|
|
.SH NOTES
|
|
|
|
For the partitions are some information (e.g. queue attributes) inherited from
|
|
|
|
parental device.
|
2012-03-08 09:04:45 -06:00
|
|
|
|
|
|
|
The
|
|
|
|
.B lsblk
|
|
|
|
reads filesystem information (FSTYPE, LABEL and UUID) from udev database if
|
|
|
|
not executed by root.
|
2011-10-05 08:37:48 -05:00
|
|
|
.PP
|
|
|
|
The
|
|
|
|
.B lsblk
|
|
|
|
needs to be able to lookup sysfs path by major:minor, which is done
|
|
|
|
done by using
|
|
|
|
.BR /sys/dev/block .
|
|
|
|
The block sysfs appeared in kernel 2.6.27 (October 2008). In case of
|
|
|
|
problem with new enough kernel check that CONFIG_SYSFS was enabled at
|
|
|
|
the time of kernel build.
|
2010-11-24 10:06:39 -06:00
|
|
|
.SH AUTHORS
|
|
|
|
.nf
|
|
|
|
Milan Broz <mbroz@redhat.com>
|
|
|
|
Karel Zak <kzak@redhat.com>
|
|
|
|
.fi
|
|
|
|
.SH SEE ALSO
|
|
|
|
.BR findmnt (8),
|
|
|
|
.BR blkid (8),
|
|
|
|
.BR ls (1)
|
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The lsblk command is part of the util-linux package and is available from
|
|
|
|
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
|