Lua Getting started


Lua is a powerful and fast programming language that is easy to learn and use and to embed into your application.

Lua is designed to be a lightweight embeddable scripting language and is used for all sorts of applications from games to web applications and image processing.

See the about page for details and some reasons why you should choose Lua.

See what Lua programs look and feel like in the live demo.


A good place to start learning Lua is the book Programming in Lua, available in paperback and as an e-book. The first edition is freely available online. See also course notes based on this book.

The official definition of the Lua language is given in the reference manual.

See the documentation page and the wiki for more.

Getting help

Our community is friendly and will most probably help you if you need. Just visit the mailing list, the chat room, and stackoverflow.

If you need help in Portuguese, join the Lua BR mailing list and visit pt.stackoverflow.

See also the FAQ, the community-maintained wiki and LuaFaq, and the much longer uFAQ.


If you need to complement the standard Lua libraries to handle more complex tasks, the lua-users wiki lists many user-contributed addons for Lua, including tools, libraries, full distributions, and binaries for several platforms.

You can find many user-contributed modules for Lua in LuaRocks. See also Awesome Lua, a curated list of quality Lua packages and resources.

Try also LuaDist, a multi-platform distribution of Lua that includes batteries.


You can help to support the Lua project by buying a book published by and by making a donation.

You can also help to spread the word about Lua by buying Lua products at Zazzle and CafePress.

[buy at the Lua Bookstore at Amazon]


Use the live demo to play with Lua if you don't want to install anything on your computer.

To run Lua programs on your computer, you'll need a standalone Lua interpreter and perhaps some additional Lua libraries. Use your favorite text editor to write your Lua programs. Make sure to save your programs as plain text.

If you use Windows, try LuaDist, a multi-platform distribution of the Lua that includes batteries.

If you use Linux or Mac OS X, Lua is either already installed on your system or there is a Lua package for it. Make sure you get the latest release of Lua (currently 5.3.4).

Lua is also quite easy to build from source, as explained below.

Building from source

Lua is very easy to build and install. Just download it and follow the instructions in the package.

Here is a simple terminal session that downloads the current release of Lua and builds it in a Linux system:

curl -R -O
tar zxf lua-5.3.4.tar.gz
cd lua-5.3.4
make linux test
For Mac OS X, use make macosx test.

If you use Windows and want to build Lua from source, there are detailed instructions in the wiki.


To embed Lua into your program, you'll need Lua headers to compile your program and a Lua library to link with it. You'll also need a C or C++ compiler for your program, because the Lua headers and library are written in C. If you're getting a ready-made Lua package for your platform, you'll probably need the development package as well. Otherwise, just download Lua and add its source directory to your project.