Steps to Install jq
Step 1: Download jq
First, you need to download the jq executable for Windows. Follow these steps:
- Go to the jq download page.
- Scroll down to the Windows section.
- Click on the 64-bit or 32-bit link under the “Windows” heading, depending on your system architecture.
- This will download the
jq.exe
file.
Step 2: Move jq.exe to a Directory in Your PATH
To use jq from Git Bash, you need to place it in a directory that’s included in your system’s PATH. Follow these steps:
- Open your file explorer and navigate to the directory where you downloaded
jq.exe
. - If the downloaded file name is not jq.exe, rename the file to jq.exe.
- Copy the
jq.exe
file. - Paste
jq.exe
into a directory that’s in your system’s PATH. A common directory for this isC:\Program Files\Git\usr\bin
. To do this:- Navigate to
C:\Program Files\Git\usr\bin
. - Paste
jq.exe
into this directory.
- Navigate to
Step 3: Verify the Installation
To verify that jq has been installed correctly, open Git Bash and run the following command:
jq --version
If jq is installed correctly, this command will output the version of jq installed, for example:
How to Install jq in Git Bash?
jq is a lightweight and flexible command-line JSON processor. It allows you to slice, filter, map, and easily transform structured data. This guide will walk you through installing jq in Git Bash on Windows.