What is JQ?
JQ is a lightweight and flexible command-line JSON processor akin to sed, awk, grep, and friends for JSON data. It’s written in portable C and has zero runtime dependencies, allowing you to easily slice, filter, map, and transform structured data.
Install JQ
This knowledge base article will guide you through the process of installing JQ, a lightweight and flexible command-line JSON processor. To ensure a straightforward and consistent installation, we recommend using a package manager that is compatible with your operating system—whether you are using Windows, Mac, or Linux. Once the installation is complete, please remember to check your JQ version to confirm that everything has gone smoothly. For detailed instructions, we highly recommend consulting the official JQ website.
Windows (Chocolatey)
You can use the following commands to install JQ in the Chocolatey-based Windows operating system.
# Install JQ.
$ choco install jq
# Check JQ version.
$ jq --version
Windows (Scoop)
You can use the following commands to install JQ in the Scoop-based Windows operating system.
# Install JQ.
$ scoop install jq
# Check JQ version.
$ jq --version
Windows (Winget)
You can use the following commands to install JQ in the Winget-based Windows operating system.
# Install JQ.
$ winget install jqlang.jq
# Check JQ version.
$ jq --version
Mac (MacPorts)
You can use the following commands to install JQ in the MacPorts-based Mac operating system.
# Install JQ.
$ sudo port install jq
# Check JQ version.
$ jq --version
Mac (Homebrew)
You can use the following commands to install JQ in the Homebrew-based Mac operating system.
# Install JQ.
$ brew install jq
# Check JQ version.
$ jq --version
Linux (RPM)
You can use the following commands to install JQ in RPM-based Linux operating systems such as CentOS Linux, Red Hat Linux, Fedora Linux, Amazon Linux, Alma Linux, Rocky Linux, etc., or any other similar equivalents.
# Install JQ.
$ sudo yum install jq
# Check JQ version.
$ jq --version
Linux (Debian)
You can use the following commands to install JQ in Debian-based Linux operating systems such as Ubuntu Linux, Mint Linux, Kali Linux, Kubuntu Linux, etc., or any other similar equivalents.
# Install JQ.
$ sudo apt install jq
# Check JQ version.
$ jq --version