How to Install Lua on Ubuntu 12.04 LTS

Lua is a lightweight, cross-platform scripting language with an easy to use C API. It is often used for providing end users an easy way to program the behavior of a software product, and embedded into other applications for this reason.

Installing Lua on Ubuntu is easy with apt-get. First, ssh to your Pod, and then run this command:

root@mypod:~# sudo apt-get install lua5.2

Now that it’s installed, let’s test out a simple Hello World application. Using your favorite text editor, create a file named “hello.lua” containing this:

print("Hello World")

You can run this using the “lua” binary, specifying the filename that you just saved:

root@mypod:~# lua hello.lua

To learn more about Lua, visit lua.org.

Matthew McCaffrey

Leave a Reply