This page is for the AutoHotkey v2 Linux port (branch
linux-port of
MonoEven/Autohotkey_Linux).
It provides an X11 backend (also used on XWayland) and a native Wayland
backend. On Windows, install the official AutoHotkey from
autohotkey.com instead.
Every GitHub release publishes two packages for 64-bit Linux:
autohotkey-linux-<version>-amd64.deb
— Debian/Ubuntu package.autohotkey-linux-<version>-amd64.tar.gz
— generic tarball with the ahk launcher, the
interpreter and the CLI/GUI installers inside.sudo apt install ./autohotkey-linux-<version>-amd64.deb ahk your-script.ahk
Extract the archive, then run the CLI or GUI installer from the unpacked tree:
tar xzf autohotkey-linux-<version>-amd64.tar.gz cd autohotkey-linux ./tools/linux/install-gui.sh # graphical wizard (zenity/yad) ./tools/linux/install.sh --prefix ~/.local ./tools/linux/install.sh # system-wide (requires root)
The installer places the ahk launcher, the interpreter
(ahk_core) and the bundled manual; ahk is also
symlinked into ~/.local/bin (or /usr/local/bin).
Once installed, the ahk launcher also provides:
ahk uninstall (clean removal) and
ahk update [VER] (download + reinstall the latest, or a
specific release for upgrading/downgrading, e.g.
ahk update 2.0.26-linux.8).
git clone --branch linux-port https://github.com/MonoEven/Autohotkey_Linux.git cd Autohotkey_Linux cmake -S . -B build-core cmake --build build-core -j$(nproc) build-core/source/linux/core/ahk_core your-script.ahk
Requirements: a C++17 compiler, CMake ≥ 3.16, X11/XTest development
headers and GTK3 for the GUI; on Debian/Ubuntu:
ninja-build libx11-dev libxtst-dev libxrandr-dev libxinerama-dev
libxext-dev libxi-dev libwayland-dev wayland-protocols libxkbcommon-dev
libffi-dev libdbus-1-dev libgtk-3-dev zlib1g-dev libjpeg-dev.
The Wayland backend is optional (used when no X display is available).
See Linux port overview for what works and the differences from Windows AutoHotkey, then Using the Program and the Beginner Tutorial (all documentation applies to the port; platform-specific notes are marked).
These tutorials focus on specific common tasks:
If you have problems installing AutoHotkey on Linux, search the
issue
tracker or open a new issue with the version, your distribution and the
output of ahk --version.