terminal.cab

All commands

lsblk

Topic: Disks and space

Program: lsblk

Shows disks and partitions as a tree.

Package: perm

Usage

lsblk [OPTION]...

Description

List the block devices as a tree: disks with their partitions, device numbers, removable (RM), size, read-only (RO), type and where they are mounted.

Options in the simulator

38 more options of the real program, not in the simulator yet
  • -A, --noempty not in the simulator yet

    On a real system it selects devices; the simulator always shows all of them.

  • -D, --discard not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -E, --dedup needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -I, --include needs a value not in the simulator yet

    On a real system it selects devices; the simulator always shows all of them.

  • -J, --json not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -M, --merge not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -O, --output-all not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -P, --pairs not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -Q, --filter needs a value not in the simulator yet

    On a real system it selects devices; the simulator always shows all of them.

  • --highlight needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • --ct-filter needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • --ct needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -S, --scsi not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -N, --nvme not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -v, --virtio not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -T, --tree value optional not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -a, --all not in the simulator yet

    On a real system it selects devices; the simulator always shows all of them.

  • -b, --bytes not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -d, --nodeps not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -e, --exclude needs a value not in the simulator yet

    On a real system it selects devices; the simulator always shows all of them.

  • -f, --fs not in the simulator yet

    Mounting file systems comes with LPIC-1.

  • -i, --ascii not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -l, --list not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -m, --perms not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -n, --noheadings not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -o, --output needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -p, --paths not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -r, --raw not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -s, --inverse not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -t, --topology not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -w, --width needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -x, --sort needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -y, --shell not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -z, --zoned not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • --sysroot needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • --properties-by needs a value not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -H, --list-columns not in the simulator yet

    On a real system lsblk shows other columns or another layout with it; the simulator only knows the basic view.

  • -V, --version not in the simulator yet

    On a real system it prints the util-linux version.

Examples

From the lesson Where has the space gone
lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda      8:0    0  40G  0 disk 
└─sda1   8:1    0  40G  0 part /

Try it in the terminal

Where you learn it

Lessons

All commands