"Installing" Godot on Ubuntu

NOTE: done with version 22.04 Jammy-Jellyfish, and could generalize to other Debian based distros.

I wanted to write-up a short walk through to setting up the Godot Engine on Ubuntu.

Generally when we download the Godot Engine we get it as a raw binary and not in a deb package that will take care of the installation for us. So most people who are not accustomed to the quirks of a Linux OS will be navigating the file system to just open the Godot Editor. One of the main drawbacks is the path hurdle just to use Godot’s useful CLI.

We can make Godot a real application, and a readily accessible command line tool.

Command line Tool setup

First we need to manage where the Godot binary should reside. We can copy a version into the /usr/bin path as godot. This will place it under a default search path for any terminal to find.

~$ cp Godot_v4.2.1-stable_linux.x86_64 /usr/bin/godot
~$ godot --version
WARNING: This could potentially be dangerous if you accidentally name it to a file that already exists overwriting it in the process.

The safer alternative is an alias.

~$ alias godot=Godot_v4.2.1-stable_linux.x86_64
~$ godot --version

But this change is temporary, and when you open a new terminal the alias will not exist. So we can setup our bash profile to automatically perform the alias command any time we open a new terminal.

open the bash profile inside the users home directory.

~$ nano ~/.bashrc
# add the line, ctrl+x to exit, will be prompted to save


# reload the profile and test
~$ source ~/.bashrc
~$ godot --version

Now that we have a location to utilize Godot now lets setup application profile

Application Desktop Profile:

In order to do this we need to add a <app>.desktop file to our ~/.local/share/applications directory.

This file should generally look like this, and can use nano to create it:
file: nano ~/.local/share/applications/godot.desktop

[Desktop Entry]
Name=Godot 4.x Engine
Comment=An open source game engine. Need i say more?

you will notice I have an icon Icon=/home/pennyloafers/Godot4/Godot4_icon.png this is important for what you will see when searching and running the application. I modified this one myself by using the default icon found in a newly created project. otherwise you can make it any icon you want!!!

There you have it. If you intend to update Godot on the next release you will have to go and modify the alias and the desktop file each time to point at the newest version. To make this process a little easier you can designate a special path that the alias and .desktop file will target. Then with either over-writing the binary with a new version of the same name (using cp command) or using a symbolic link pointing to the real version you want to run.

Let me know what you think and please share improvements, if you want a Windows version let me know, I tend to work on all major operating systems.

Thanks for looking!

1 Like

I like this, very nice write-up! :+1:

I actually use a slightly different setup, probably a bit less new-Linux-user-friendly but I’ll quickly summarize it. First, I have a directory, ~/.local/bin which is first in my $PATH (so anything looking will look there first), then I copy the Godot executable, with version number etc, in to that directory. (Doesn’t actually need to be there, ~/.local/share/godot would probably be better. I should change this come to thing about it…) Lastly I create a symlink at ~/.local/bin/godot that points to the “numbered executable”.

Same setup with the .desktop-file, with different paths of course.


I like this suggestion, and I should probably look into understanding this .local folder more.

Thank you!

I hope in the future Godot produces an installation package.

1 Like

Hmm… I doubt they will provide an installation package, considering how many different ways you need to do that for Linux alone.

But I suspect this is an excellent first package to set up in your favourite package system, if you are willing to maintain it, of course! :wink: (I know Debian has a few Godot 3-packages, but not sure how well-maintained they are. Might be a starting point since Ubuntu uses Debian’s package system?)

1 Like

Someone has made an unofficial flatpak Install Godot on Linux | Flathub

Sure, although I would rather have it come from a trusted source, and, since Ubuntu has chosen Snap as their alternative package manager, I also don’t want to make this an other app installation guide.

I’m a believer in use what you got until it doesn’t work for you. And I cringe every time a need to add a new package repository to apt. But I will do it if I need the app.

I had an office mate that would seeth through his teeth every time he heard about Snap problems, saying some strong words before talking about Flatpack as the answer.

I haven’t personally used flatpack, but doing a quick search it seemed like it is XDG compliant at least. Which @bexasaurus made me realize about what the .local folder is used for in a users home directory, and I plan to update the guide to go the manual XDG route.

Although going down this path may alienate some non-XDG desktops, and distros that use said desktops, I want to constrain the scope of this guide.

@bexasaurus, the prospect of maintaining a package seems interesting, but I don’t want the commitment :smile:

If you use discord, every time it needs an update the app will download a deb for you and a quick dpkg command later it’s installed, that is what I would prefer at the least. And I think the Godot build system could be updated to create the major distro package archives for Debian and what ever the red hat one is, for cheap? … That is something I would be more interested in working towards personally.

Thanks for pointing that out regardless!

I’m with your colleague; down with snaps, all hail flatpak and appimage!

If I were the godot devs I’d stay well away from providing distro packages. Too much fragmentation and maintenance burden, let them focus on making a great game engine and let the community package it. Arch for example has a godot package in the main repo.

The other option is installing godot via steam.