Easy Tutorial
❮ Lua Data Types Lua Variables ❯

Lua Environment Setup

Installation on Linux Systems

Installing Lua on Linux & Mac is quite straightforward. You simply need to download the source package and unzip it in the terminal for compilation. This guide uses version 5.3.0 for installation:

curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz
tar zxf lua-5.3.0.tar.gz
cd lua-5.3.0
make linux test
make install

Installation on Mac OS X Systems

curl -R -O http://www.lua.org/ftp/lua-5.3.0.tar.gz
tar zxf lua-5.3.0.tar.gz
cd lua-5.3.0
make macosx test
make install
print("Hello World!")

Execute the following command:

$ lua HelloWorld.lua

The output will be:

Hello World!

Installation on Windows Systems

On Windows, you can use an IDE environment called "SciTE" to execute Lua programs. The download links are:

After double-clicking to install, you can write and run Lua programs in this environment.

Alternatively, you can use the method recommended by Lua, LuaDist: http://luadist.org/

❮ Lua Data Types Lua Variables ❯