
Essential guide to installing Amazon Q Developer CLI on Linux
However you like to run Linux, Amazon Q Developer at your finger tips is only a few steps away
- GUI Linux systems - my daily Ubuntu machine, running desktop
- Headless Linux systems - typical Linux distributions you might use on AWS (for example, Amazon Linux 2023)
- Compiling from source - for those scenarios where you want to compile the Amazon Q Developer CLI binaries for use on other Linux systems (perfect for those package managers out there who might want to include Amazon Q Developer CLI packages in their distributions)
- Platform requirements: Amazon Q for command line for Linux supports Ubuntu 22 and 24. It may otherwise work with GNOME v42+ or environments where the display server is Xorg and the input method framework is IBus.
- Terminal emulators: GnomeConsole, GnomeTerminal, Kitty, Hyper, WezTerm, Alacritty, Tilix, Terminator
- Processor Architecture: amd64
If you are running a Linux distribution locally, and have access to a GUI, then you use the existing packages that have been created for you which are documented here. If you are looking for a way to run an Ubuntu Desktop on EC2 instances, I recently showed you how you can set this up quickly with DCV in my post Configuring DCV to access Ubuntu Desktop on EC2 with a browser.
Note! There is another installation method, where Amazon Q Developer CLI is distributed via a zip package. This is intended for headless installations, and whilst it will run on a GUI installation, logging in will hang.
sudo apt install libfuse2
curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.appimage -o amazon-q.appimage
chmod +x amazon-q.appimage
sudo apt install libfuse2
curl --proto '=https' --tlsv1.2 -sSf https://desktop-release.q.us-east-1.amazonaws.com/latest/amazon-q.deb -o amazon-q.deb
sudo apt install -y ./amazon-q.deb
q
q uninstall
sudo apt purge amazon-q
[ec2-user@ip-172-31-29-188 ~]$ ``ldd --version
ldd (GNU libc) 2.34
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
q integrations install ssh
# Amazon Q SSH Integration. Keep at the bottom of this file.
Match all
Include "~/Library/Application Support/amazon-q/ssh"
AcceptEnv Q_SET_PARENT
AllowStreamLocalForwarding yes
sudo systemctl restart sshd
sudo apt-get install gnupg
sudo apt install libfuse2
curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip" -o "q.zip"
wget https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-x86_64-linux-musl.zip
Note! When I tried this on my Ubuntu 18.04 machine, the installation worked but I could only use q chat/q translate, with command completion not working. I am still trying to figure out how to get that going.
gpg --import q-pub-key.pem
curl --proto '=https' --tlsv1.2 -sSf "https://desktop-release.codewhisperer.us-east-1.amazonaws.com/latest/q-x86_64-linux.zip.sig" -o "q.zip.sig"
gpg --verify q.zip.sig q.zip
Note The warning in the output is expected and doesn't indicate a problem. It occurs because there isn't a chain of trust between your personal PGP key (if you have one) and the Amazon Q for command line PGP key. For more information, see Web of trust.
unzip q.zip
chmod +x q/install.sh
./q/install.sh
? Select login method ›
❯ Use for Free with Builder ID
Use with Pro license
Confirm the following code in the browser
Code: PNDN-QVKB
Open this URL: https://view.awsapps.com/start/#/device?user_code=PNDN-QVKB
▰▰▱▱▱▱▱ Logging in...
Logged in successfully
q doctor
Note! If you did not do the local stuff, you will get some errors when running q doctor - in my experience these have not stopped q chat or q translate working
- Delete the binaries that you copied
- (optional) Update the bash/zsh scripts to remove the .local/bin directory if you are not using it for anything else
- Remove the entries you added from the sshd configuration file (/etc/ssh/sshd_config) and restart
A note to Linux package managersIf you are currently involved in managing packages for a Linux distribution, then you might want to use the instructions outlined in the GitHub repo to help you build packages for your distributions. My colleague James Ward has recently done this for NixOS (you can see his PR here)
this was a great way to use q in the console. I asked it to walk me through the process of increasing storage of an instance, and it did a brilliant job
git clone https://github.com/aws/amazon-q-developer-cli.git
cd amazon-q-developer-cli
sudo apt-get update
sudo apt-get install -y -qq build-essential pkg-config jq dpkg curl wget zsh zstd cmake clang libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev libdbus-1-dev libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev valac libibus-1.0-dev libglib2.0-dev sqlite3 protobuf-compiler libfuse2 zip
I was able to do the same thing on Amazon Linux 2023, all I had to do was switch the packages that were needed to the following:sudo dnf check-update
sudo dnf install git openssl-devel curl wget librsvg2-devel jq --allowerasing
sudo dnf make bash zsh unzip zstd xz git jq protobuf
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
rustup default stable
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.85.1 (4eb161250 2025-03-15)
cargo install --version 1.6.2 tauri-cli
curl --retry 5 --proto '=https' --tlsv1.2 -sSf https://mise.run | sh
echo "eval \"\$(/home/ubuntu/.local/bin/mise activate bash)\"" >> ~/.bashrc
echo 'eval "$(mise activate bash)"' >> ~/.bashrc
bash
mise trust
mise trusted /home/ubuntu/amazon-q-developer-cli
mise install
mise hint use multiple versions simultaneously with mise use python@3.12 python@3.11
mise hint installing precompiled python from astral-sh/python-build-standalone
if you experience issues with this python (e.g.: running poetry), switch to python-build by running mise settings python.compile=1
gpg: Signature made Tue Feb 11 10:44:53 2025 UTC
gpg: using RSA key C0D6248439F1D5604AAFFB4021D900FFDB233756
gpg: Good signature from "Antoine du Hamel <duhamelantoine1995@gmail.com>" [unknown]
mise node@22.14.0 ✓ installed
mise python@3.11.11 ✓ installed
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=$(jq -r '.packageManager' package.json | cut -d@ -f2 | cut -d+ -f1) SHELL=$(which bash) sh -
==> Downloading pnpm binaries 10.0.0
WARN using --force I sure hope you know what you are doing
Copying pnpm CLI from /tmp/tmp.hq956QfOS9/pnpm to /home/ubuntu/.local/share/pnpm/pnpm
Appended new lines to /home/ubuntu/.bashrc
Next configuration changes were made:
export PNPM_HOME="/home/ubuntu/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
To start using pnpm, run:
source /home/ubuntu/.bashrc
source /home/ubuntu/.bashrc
corepack enable
pip install --upgrade pip
pip3 install -r build-scripts/requirements.txt
export AMAZON_Q_BUILD_SKIP_FISH_TESTS=1
export AMAZON_Q_BUILD_SKIP_SHELLCHECK_TESTS=1
export GNOME_SHELL_BUILD_RELEASE=1
python3.11 build-scripts/main.py build --variant=full
INFO: Building for prod
INFO: Release: True
INFO: Cargo features: {'q_cli': ['wayland']}
INFO: Signing app: False
INFO: Variants: ['FULL']
INFO: Building npm packages
+ pnpm install --frozen-lockfile
Scope: all 18 workspace projects
..
..
..
-rw-rw-r-- 1 ubuntu ubuntu 43297 Mar 23 13:32 vscode-plugin.vsix
drwxr-xr-x 3 ubuntu ubuntu 4096 Mar 23 13:32 autocomplete
drwxr-xr-x 5 ubuntu ubuntu 4096 Mar 23 13:32 dashboard
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 23 13:56 bin
-rw-rw-r-- 1 ubuntu ubuntu 124037071 Mar 23 13:56 q.tar.gz
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 13:56 q.tar.gz.sha256
-rw-rw-r-- 1 ubuntu ubuntu 108726532 Mar 23 13:58 q.tar.xz
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 13:58 q.tar.xz.sha256
-rw-rw-r-- 1 ubuntu ubuntu 110606256 Mar 23 13:59 q.tar.zst
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 13:59 q.tar.zst.sha256
-rw-rw-r-- 1 ubuntu ubuntu 124031917 Mar 23 13:59 q.zip
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 13:59 q.zip.sha256
drwxrwxr-x 20 ubuntu ubuntu 4096 Mar 23 13:59 ..
drwxrwxr-x 4 ubuntu ubuntu 4096 Mar 23 14:13 themes
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 23 14:13 amazon-q-for-cli-legacy-gnome-integration@aws.amazon.com
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 23 14:13 amazon-q-for-cli-gnome-integration@aws.amazon.com
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 23 14:13 appImage-metadata
drwxrwxr-x 2 ubuntu ubuntu 4096 Mar 23 14:19 deb-metadata
drwxrwxr-x 4 ubuntu ubuntu 4096 Mar 23 14:19 linux-bundles
-rw-r--r-- 1 ubuntu ubuntu 179909694 Mar 23 14:19 amazon-q.deb
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 14:19 amazon-q.deb.sha256
-rwxr-xr-x 1 ubuntu ubuntu 335942848 Mar 23 14:19 amazon-q.appimage
-rw-rw-r-- 1 ubuntu ubuntu 64 Mar 23 14:19 amazon-q.appimage.sha256
python3.11 build-scripts/main.py build --variant=minimal
---- directories::linux_tests::all_paths stdout ----
thread 'directories::linux_tests::all_paths' panicked at crates/fig_util/src/directories.rs:546:9:
assertion failed: remote_socket_path().is_ok()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
directories::linux_tests::all_paths
test result: FAILED. 21 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.09s
error: test failed, to rerun pass `-p fig_util --lib`
- 546 : assert!(remote_socket_path().is_ok());
+ 546:
+ 547: // Skip remote_socket_path check if we're in a test environment without Q_PARENT set
+ 548: // This allows tests to pass in CI environments
+ 549: if std::env::var_os(Q_PARENT).is_some() || !is_remote() || in_cloudshell() {
+ 550: assert!(remote_socket_path().is_ok());
+ 551: }
+ 552:
547, 553: assert!(local_remote_socket_path().is_ok());
+ cargo clippy --locked --workspace --exclude zbus --exclude zbus_names --target x86_64-unknown-linux-gnu --exclude fig_desktop --exclude fig_desktop-fuzz --features wayland
error: the lock file /home/ubuntu/amazon-q-developer-cli/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.
Traceback (most recent call last):
File "/home/ubuntu/amazon-q-developer-cli/build-scripts/main.py", line 113, in <module>
build(
File "/home/ubuntu/amazon-q-developer-cli/build-scripts/build.py", line 829, in build
run_clippy(variants=variants, features=cargo_features, target=cargo_test_target)
File "/home/ubuntu/amazon-q-developer-cli/build-scripts/test.py", line 34, in run_clippy
run_cmd(
File "/home/ubuntu/amazon-q-developer-cli/build-scripts/util.py", line 95, in run_cmd
subprocess.run(args, env=env, cwd=cwd, check=check)
File "/home/ubuntu/.local/share/mise/installs/python/3.11.11/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cargo', 'clippy', '--locked', '--workspace', '--exclude', 'zbus', '--exclude', 'zbus_names', '--target', 'x86_64-unknown-linux-gnu', '--exclude', 'fig_desktop', '--exclude', 'fig_desktop-fuzz', '--features', 'wayland']' returned non-zero exit status 101.
A new version of q is available: 1.7.2
Run q update to update to the new version
q update
[ec2-user@ip-172-31-29-188 ~]$ q update
███████████████████████████████████████ 100/100
[ec2-user@ip-172-31-29-188 ~]$ q doctor
✘ Qterm Socket Check: Qterm is not running, please restart your terminal. QTERM_SESSION_ID is unset.
✘ Doctor found errors. Please fix them and try again.
q integrations install ssh
[ec2-user@ip-172-31-29-188 ~]$ q doctor -v
● Could not read sshd_config, check https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-autocomplete-ssh.html for more info
✔ Everything looks good!
[ec2-user@ip-172-31-29-188 ~]$ q doctor --all
Let's check if you're logged in...
✔ Auth
Let's check your dotfiles...
✔ bash ~/.bashrc integration check
✔ bash ~/.bash_profile integration check
Let's make sure Amazon Q is set up correctly...
✔ Amazon Q data dir exists
✔ PATH contains ~/.local/bin
✔ Amazon Q settings corruption
● Could not read sshd_config, check https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-autocomplete-ssh.html for more info
✔ Amazon Q terminal integrations
Let's see if the app is in a working state...
✔ Qterm Socket Check
✔ Autocomplete dev mode
✔ Plugin dev mode
✔ Dashboard is loading from the correct URL
✔ Autocomplete is loading from the correct URL
Let's check if your system is compatible...
✔ OS is supported
✔ Bash is up to date
✔ Fish is up to date
ubuntu@ip-172-31-29-8:~$ q doctor
● GTK_IM_MODULE is not set to `ibus`. This may cause autocomplete to break in some terminals.
✔ Everything looks good!
Amazon Q still not working? Run q issue to let us know!
In Ubuntu, GTK_IM_MODULE is an environment variable that tells GTK applications which input method module to use for handling text input. There are different options, which also change depending on which versions of Ubuntu you are using and which graphics manager (X or Wayland).
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.