Lua is an easy and simple programming language that is ideal for beginners. It is used in game development (for example, in Roblox), is embedded in applications and helps to quickly create scripts.
In this article, we will show you step by step how to set up the environment, write your first program and feel confident in your abilities 💪

📥 Step 1. Install Lua
🖥 For Windows:
Go to the official website: https://lua.org
Download the Windows build (for example, Lua for Windows)
Install following the instructions
🍏 For macOS:
brew install lua(pre-set Homebrew)
🐧 For Linux:
sudo apt install lua5.4
🛠 Step 2. Where to write the code?
You can use any text editor. Here are a few simple options:
Replit - online, no need to install anything
VS Code + Lua extension
Sublime Text
Create a new file with the extension .lua, for example: hello.lua
✍️ Step 3. Write the first script
Insert the following code into the file:
print("Hi Lua!")Save the file.
▶️ Step 4. Launch
If you are using a terminal:
lua hello.luaIf everything is configured correctly, you will see:
Привет, Lua!
Congratulations! 🎉 You have just written and launched your first Lua script!
🤔 What's next?
Now that everything is ready, you can start learning:
variables
terms (
if)cycles (
while,for)functions
tables (analogous to lists)
And to make it even more interesting, try the app Code . In it, you take a step-by-step course on Lua, solve problems, get achievements, and track your progress. Everything is simple and in Russian!
