🐧
Linux
  • Introduction
  • 🖇️general
    • essentials
    • other commands
    • Superuser-do (sudo)
    • SUID, SGID, sticky bit
    • /dev/null
    • environment variables
    • special variables
    • shebang
  • spool
  • 🔧bash
    • overview
    • redirection
    • loop
    • .bashrc
  • text processing
    • grep
    • sed
    • awk
  • xxd/hexdump
  • text editors
    • nano
    • vi/vim
  • 📂filesystem & directories
    • Filesystem Hierachy Standard (FHS)
      • /etc
        • hosts, hosts.allow, hosts.deny
        • /cron.d
        • /httpd
        • /samba.d
        • hostname
        • crontab
        • shadow
        • passwd
        • profile
        • services
      • /dev
      • /proc
        • version
      • /mnt
      • /opt
      • /sbin
      • /lib
      • /usr
      • /tmp
      • /var
      • /bin
      • /run
    • chroot
  • find
  • locate
  • ⌚processes & jobs
    • cronjob
    • daemon
  • ⛓️system
    • systemctl
    • hostname
    • systemd
  • 🗃️media
    • ffmpeg
    • pdftk
  • 🔒Security
    • ufw
  • firejail
  • apparmor
  • 📦Package management
    • dpkg
    • apt/apt-get
  • Storage
    • lsblk
    • mount/umount
  • df/du
  • user management
    • chsh
  • Networking
    • Introduction
    • routing table/interface management
    • /etc/hosts, /etc/hosts.allow, /etc/hosts.deny
Powered by GitBook
On this page
  1. Storage

lsblk

The lsblk (list block devices) command in Linux is used to list information about all available or specified block devices.

Block devices are storage devices that can be used to store data in blocks (e.g., hard drives, solid-state drives, USB drives, and partitions). This command provides detailed information about these devices, such as their names, sizes, types, and mount points.

The simple lsblk command can be used:

$ lsblk 

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda     ...    1    400G 0  disk
├─sda1  ...    1    300G 0  part /mnt/test-mount                         
└─sda2  ...    1    100G 0  part 

This simply displays the all the block devices, along with their partitions and mount points. The output displays the following:

  1. sda is a disk with 400 GB of storage

  2. sda has partitions of sda1 and sda2

  3. sda1 is mounted at /mnt/test-mount refer to the mount/unmount sub-section in this section for more information about mounting filesystems: https://jarrettgxz-sec.gitbook.io/linux/storage/mount-umount)

Previousapt/apt-getNextmount/umount

Last updated 6 months ago