Using curl is one way:<p><pre><code>  % curl -v https:&#x2F;&#x2F;google.com&#x2F; --http2
  *   Trying 2607:f8b0:4007:802::1008...
  * Connected to google.com (2607:f8b0:4007:802::1008) port 443 (#0)
  * found 180 certificates in &#x2F;etc&#x2F;ssl&#x2F;certs&#x2F;ca-certificates.crt
  * found 722 certificates in &#x2F;etc&#x2F;ssl&#x2F;certs
  * ALPN, offering h2
  * ALPN, offering http&#x2F;1.1
  * SSL connection using TLS1.2 &#x2F; ECDHE_ECDSA_AES_128_GCM_SHA256
  ...
  * ALPN, server accepted to use h2
</code></pre>
The above is with the GnuTLS build on Debian, recent enough OpenSSL versions support both NPN and ALPN.