Linux

Listing Linux Commands and Versions Quickly with 'has'

This is about how 'has', which easily lists Linux commands and versions, seems pretty good. Normally when checking versions of commands that are in the PATH on bash, you need to use different command options for each. For example, some commands use --v for version checking, or --version, or the common -v...

Shou Arisaka
1 min read
Sep 29, 2025

This is about how ‘has’, which easily lists Linux commands and versions, seems pretty good.

Normally when checking versions of commands that are in the PATH on bash, you need to use different command options for each.

For example, some commands use —v for version checking, or —version, or the common -v.

It’s difficult to keep track of all these differences. Well, there are ways to do it like creating aliases, but that’s tedious in itself.

So here comes has.

kdabir/has: checks presence of various command line tools and their versions on the path

yuis@yuis:/home/data/_tmp/20190524015511$ node -v ; npm -v ; python --version ; python3 --version
v8.10.0
3.5.2
Python 2.7.15rc1
Python 3.6.7
yuis@yuis:/home/data/_tmp/20190524015511$ curl -sL https://git.io/_has | bash -s node npm python python3
 node 8.10.0
 npm 3.5.2
 python 2.7.15
 python3 3.6.7
yuis@yuis:/home/data/_tmp/20190524015511$

Image

How to Use

Either install it,

git clone https://github.com/kdabir/has.git && cd has && sudo make install

or execute the source code directly

curl -sL https://git.io/_has | bash -s node npm python python3

It’s nice that it can be used even in environments like rental servers where you can’t easily install new software.

Share this article

Shou Arisaka Sep 29, 2025

🔗 Copy Links