Install Lua
Official Installation
Section titled “Official Installation”The official Lua installation instructions are maintained at the Lua 5.5 readme.
Lua Releases and 5.5
Section titled “Lua Releases and 5.5”Lua releases infrequently by design — stability is a core value of the project. The 5.5 release introduced a number of breaking changes, so this guide targets Lua 5.5 specifically.
Platform Instructions
Section titled “Platform Instructions”The easiest path on macOS is Homebrew:
brew install luaVerify the install:
lua -v# Lua 5.5.x Copyright (C) 1994-2025 Lua.org, PUC-RioLinux (Debian/Ubuntu)
Section titled “Linux (Debian/Ubuntu)”sudo apt updatesudo apt install lua5.5 liblua5.5-devIf your distro’s package manager doesn’t carry 5.5 yet, build from source:
curl -R -O https://www.lua.org/ftp/lua-5.5.0.tar.gztar -xzf lua-5.5.0.tar.gzcd lua-5.5.0make all testsudo make installWindows
Section titled “Windows”Download the prebuilt binaries from LuaBinaries and add the directory to your PATH.
Alternatively, use Scoop:
scoop install luaVerify Your Installation
Section titled “Verify Your Installation”Open a terminal and run the Lua REPL:
luaYou should see a prompt like:
Lua 5.5.0 Copyright (C) 1994-2025 Lua.org, PUC-Rio>Type print("hello") and press Enter. If you see hello printed back, you’re set. Press Ctrl+C or Ctrl+D to exit.
A Note on LuaJIT
Section titled “A Note on LuaJIT”LuaJIT is a popular just-in-time compiler for Lua that offers significant performance gains. It targets Lua 5.1 compatibility, so it won’t run this guide’s 5.5-specific examples. Stick with standard Lua 5.5 for now.
We don’t need its features for this guide.
Next Steps
Section titled “Next Steps”With Lua installed, head to Hello, World to write your first test.