Installing Lua
Windows
Download the prebuilt binaries (lua-5.4.x_Win64_bin.zip) from the
LuaBinaries project, unzip them to a folder such as C:\lua, and add
it to your PATH. Or use a package manager:
winget install DEVCOM.Lua
scoop install lua
macOS
brew install lua
Linux
sudo apt install lua5.4 # Debian/Ubuntu
sudo dnf install lua # Fedora
Check it works
$ lua -v
Lua 5.4.8 Copyright (C) 1994-2025 Lua.org, PUC-Rio
On some systems the command is lua5.4 or lua54.
LuaRocks
LuaRocks is Lua's package manager — install it too if you plan to use third-party libraries (Level 3 covers it).
Try it without installing
The official site has a live demo at lua.org/demo.html, handy for trying the examples in this course.