It's in the following package. You can use this command to install it on CentOS 6+:
$ sudo yum install util-linux-ng
Example
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 252:0 0 10G 0 disk
├─vda1 252:1 0 500M 0 part /boot
└─vda2 252:2 0 9.5G 0 part
├─vg_mungr-lv_root (dm-0) 253:0 0 8.6G 0 lvm /
└─vg_mungr-lv_swap (dm-1) 253:1 0 992M 0 lvm [SWAP]
You can see what package a program is in with this command:
$ which lsblk
/bin/lsblk
$ rpm -qf /bin/lsblk
util-linux-ng-2.17.2-12.9.el6_4.3.x86_64
Other ways to find its package
$ yum whatprovides */lsblk
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: centos.mirrors.tds.net
* epel: fedora-epel.mirror.lstn.net
* extras: centos.someimage.com
* updates: mirror.beyondhosting.net
76 packages excluded due to repository priority protections
util-linux-ng-2.17.2-12.9.el6.i686 : A collection of basic system utilities
Repo : base
Matched from:
Filename : /bin/lsblk
...
You can also use repoquery
to look for packages that provide a particular executable, search by filename
aka. -f
:
$ repoquery -f */lsblk
util-linux-ng-0:2.17.2-12.9.el6_4.2.i686
util-linux-ng-0:2.17.2-12.9.el6_4.3.x86_64
util-linux-ng-0:2.17.2-12.9.el6_4.2.x86_64
util-linux-ng-0:2.17.2-12.9.el6_4.3.i686
util-linux-ng-0:2.17.2-12.9.el6.i686
util-linux-ng-0:2.17.2-12.9.el6.x86_64
Or you can do it using this:
$ repoquery --whatprovides */lsblk
util-linux-ng-0:2.17.2-12.9.el6_4.2.i686
util-linux-ng-0:2.17.2-12.9.el6_4.3.x86_64
util-linux-ng-0:2.17.2-12.9.el6_4.2.x86_64
util-linux-ng-0:2.17.2-12.9.el6.x86_64
util-linux-ng-0:2.17.2-12.9.el6.i686
util-linux-ng-0:2.17.2-12.9.el6_4.3.i686
Notice that the argument in most of the above examples is */lsblk
. This allows repoquery
to search for any matches whose path can vary, i.e. the */
.
whatprovides
subcommand toyum
. In this case you would do ayum whatprovides */lsblk