Getting Started with Aleo on Ubuntu: A Step-by-Step Guide
If you’re interested in diving into the world of Aleo on Ubuntu, we’ve got you covered with a comprehensive step-by-step guide. By the end of this tutorial, you’ll be all set up to create and run Aleo applications on your Ubuntu machine.
Step 1: Prepare Your Ubuntu Environment
First things first, make sure you’re using Ubuntu as Aleo works best in a Linux environment. If you’re new to Linux, you can easily rent a Virtual Private Server (VPS) for this purpose. We recommend staying away from Windows for this adventure.
Step 2: Create a New Sudo User (Optional)
While optional, it’s a good idea to create a new sudo user for added security. You can do this by running the following commands:
sudo useradd leo -m -s /bin/bash
sudo usermod -aG sudo leo
sudo passwd leo
sudo su — leo
Step 3: Install Required Packages
Update your package list and install the necessary packages by running:
sudo apt-get update
sudo apt-get install unzip wget git -y
Step 4: Create a Personal Access Token
Visit this link to create a personal access token on GitHub: [GitHub Personal Access Token](https://github.com/settings/tokens/new). Make sure to keep this token secure and do not share it.
Step 5: Set Variables
Set up variables for your GitHub nickname, email, and the personal access token:
NICKNAME=”Your_github_nickname”
EMAIL=”Your_github_email”
TOKEN=”Your_personal_access_token”
Step 6: Configure Git
Configure Git with the provided credentials:
git config — global credential.helper store
git config — global user.name $NICKNAME
git config — global user.email $EMAIL
git credential approve < <(echo “protocol=https
host=github.com
username=$NICKNAME
password=$TOKEN”)
Step 7: Download the Aleo Binary
Create a directory and download the Aleo binary:
mkdir $HOME/aleo
wget https://github.com/AleoHQ/leo/releases/download/v1.9.5/leo-v1.9.5-x86_64-unknown-linux-musl.zip
unzip leo-v1.9.5-x86_64-unknown-linux-musl.zip -d $HOME/aleo
Step 8: Add Aleo to $PATH
Add Aleo to your system’s path and verify the installation:
echo ‘export PATH=”$HOME/aleo:$PATH”’ >> ~/.bashrc
source ~/.bashrc
leo — help
Step 9: Create a New Game
Get started by creating a new Aleo game, such as “tictactoe”:
leo example tictactoe
cd $HOME/tictactoe
leo run new
chmod +x run.sh
./run.sh
Step 10: Prepare a Git Repository
Initialize a Git repository for your Aleo project, commit your changes, and create a new branch:
git init
git checkout -b main
git add .
git commit -m “My first commit”
Step 11: Create a New Empty GitHub Repository
Visit https://github.com/new to create a new empty repository without a readme, license, or gitignore files. Make sure it’s set to “PUBLIC.”
Step 12: Set GitHub Repository Link
Set the link to your new GitHub repository as a variable:
Step 13: Push Changes to Your Repository
Connect your local Git repository to the remote GitHub repository and push your code:
git remote add origin $LINK
git push -u origin main
Step 14: Check Your Repository
Check your GitHub repository; it should now contain your Aleo project.
Step 15: Create an Issue
Finally, follow the instructions in the [Aleo Developer Toolkit](https://developer.aleo.org/testnet/getting_started/developer_toolkit/#claim-your-badge) to create an issue and get started with your Aleo journey!
Social media
- Original guide: https://developer.aleo.org/testnet/getting_started/developer_toolkit/
- Website: https://www.aleo.org/
- Twitter: https://twitter.com/AleoHQ
- GitHub: https://github.com/AleoHQ
- Discord: https://discord.gg/aleohq