Back to Blog
How to install amazon Q
5 min read

How to Set Up and Install Amazon Q in your command line (WSL)

Samarth Mishra
Apr 25, 2025
How to Set Up and Install Amazon Q in your command line (WSL)

Hey there, I know you want to try out Amazon Q, a powerful tool for interacting with AWS services from your command line, but feel a bit lost about setting it up on Windows, you're in the right place. This beginner-friendly guide will walk you through setting up Amazon Q in the Windows Subsystem for Linux (WSL) step-by-step. No prior experience needed—just a willingness to learn! 😊

What You’ll Need

Before we start, make sure you have:

  • A Windows 10 or 11 PC (version 2004 or later).

  • An AWS account (you can sign up for a free tier at aws.amazon.com).

  • A text editor like VS Code or Notepad (optional, for viewing files).

  • About 20–30 minutes of your time.

Step 1: Set Up Windows Subsystem for Linux (WSL)

For setting up Windows Subsystem for Linux (WSL) check out my previous blog:

How to install WSL in Windows

💡
For a better experience, install a Linux distribution such as Ubuntu.

Or if you already have WSL (ubuntu) install in your system run the following commands:

  1. Open PowerShell/CLI:

    • Press Win + S, type PowerShell; for CLI, Press Win + R, type cmd.

      wsl

  2. Set Up Ubuntu:

    • After rebooting, open the Ubuntu app from the Start menu (it should appear after installation).

    • The first time you launch it, it’ll ask you to create a username and password. Choose something simple you’ll remember (e.g., username: student, password: mypassword123).

    • Once done, you’ll see a Linux terminal prompt like student@your-pc:~$

  3. Update Ubuntu:

    • To ensure your Linux system is up-to-date, run these commands in the Ubuntu terminal:

        sudo apt update
        sudo apt upgrade -y
      
    • sudo runs commands as an admin, apt update refreshes the package list, and apt upgrade -y installs updates without asking for confirmation.


Step 2: Install Amazon Q in WSL

  1. Download the Amazon Q CLI:

    • In your Ubuntu terminal, download the Amazon Q Linux installer using this command:

        curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.q.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip"
      
    • Amazon Q for command line requires glibc 2.34 or newer, which is included by default in most major Linux distributions released since 2021.

  1. To install Amazon Q CLI

    • Run this command to install the downloaded package:

        unzip q.zip
      
    • Run the install program:

        ./q/install.sh
      
    • Note: After running this command, you need to right-click on the link that appears in your CLI with the secret key, provide your login credentials, and allow Amazon Q.

Verify the Installation:

  • Check if Amazon Q is installed by running:

      q --version
    
  • You should see the version number (e.g., Amazon Q CLI version x.x.x). If you see this, congrats—you’ve installed Amazon Q!

Step 3: Starting a chat session

  1. To start a chat session with Amazon Q, use the chat subcommand:
$ q chat

This opens an interactive chat session where you can type questions or commands.

Sometime it might be possible your amazon Q is not open the chat session, so don’t worry about that just try exit the chat session, type /quit or press Ctrl +D or close the CLI.

Win + R
type = cmd

enter: wsl (Press enter)
type= q chat

Now Enjoy
Now it’s time to use your Amazon Q on your Windows laptop.


Why Use Amazon Q?

Amazon Q is awesome for students because it:

  • Helps you learn AWS commands interactively.

  • Provides code suggestions for projects.

  • Works in your command line, so you can stay focused.

  • Integrates with WSL, giving you a Linux-like experience on Windows.


What’s Next?

Now that you’ve set up Amazon Q, try these:

  • Explore AWS services like S3, EC2, or Lambda using Amazon Q’s suggestions.

  • Install VS Code and the Amazon Q Developer extension for IDE support.

  • Join AWS student communities or forums to learn more about cloud computing.

Happy coding, and have fun with Amazon Q! 🚀 If you have questions, drop them in the comments or check out the AWS Q Developer documentation.


Sources:

  • AWS Documentation: Installing Amazon Q for Command Line

  • Microsoft Learn: Set Up a WSL Development Environment

  • Medium: Installing AWS CLI on WSL

Next ArticleExplorer more from the community
View All Posts