Published November 2022
Here we provide three simple ways to check which version of Elasticsearch is installed and running on your machine. The first uses the Kibana dev console, and the second two approaches use the command line. Let’s dive in.
Check Elasticsearch Version Running Using Kibana Dev Console
Perhaps the most convenient way to check which version of Elasticsearch is running is by using the Kibana dev console.
Simple input:
GET /
This will output the version along with other information such as the name, build_date, and other details.
{
"name" : "pn0zUv9",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "GmzCPer3SP-AZ_Nd_zGQ4g",
"version" : {
"number" : "6.6.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "1fd8f69",
"build_date" : "2019-02-13T17:10:04.160291Z",
"build_snapshot" : false,
"lucene_version" : "7.6.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
In this example, v6.6.1 is running.
If the version number provided in the output is different than the one you installed, then that means you are running more than one version of Elasticsearch on your server.
Check Elasticsearch Version Running Using Command Line
There are also two ways to check which version of Elasticsearch is installed using the command line. Let’s show the simplest way first.
Check Elasticsearch version using bin/
In your command line simply input:
bin/elasticsearch --version
This command will output the version.
...
Version: 7.14, Build: default/tar/1fd8f69/2019-02-13T17:10:04.160291Z, JVM: 11.0.2
Here, the version of Elasticsearch that is installed is v7.14.
Check Elasticsearch version using curl command
You can use the curl command to get additional details about the version of Elasticsearch that is installed and running on your machine. This will output similar information to the Kibana dev console approach discussed above.
curl -XGET 'http://localhost:9200'
This will output:
{
"name" : "pn0zUv9",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "GmzCPer3SP-AZ_Nd_zGQ4g",
"version" : {
"number" : "6.6.1",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "1fd8f69",
"build_date" : "2019-02-13T17:10:04.160291Z",
"build_snapshot" : false,
"lucene_version" : "7.6.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
In this example, v6.6.1 of Elasticsearch is installed.
A note on the curl command. Above in the input we used localhost:9200. This input assumes you are using the default port.
If Elasticsearch is installed on a different server, then you will need to update this command to:
curl -XGET 'http://yourdomain.com:9200'
Elastic Stack Consulting Services
If you are interested in 24/7 support, consulting, and/or fully managed Elasticsearch services on your environment, you can find more information on our Elasticsearch consulting page.
Schedule a call with an Elastic Stack engineer.