Few games are as notorious as the block-breaking sandbox game, Minecraft. Listed as the second best-selling video game of all-time with over 107.8 million copies sold to date, Minecraft is as popular with children as it is adults. It supports many platforms, including Windows, macOS, Android, iOS, and of course, Linux. Playing Minecraft on Linux and Fedora requires a few extra steps to get working. It is possible to set it up as a desktop app to integrate with your desktop environment of choice. Whether you’re setting it up for a friend, a child, or yourself, it’s easy to get started playing Minecraft in Fedora.

Installing dependencies

Minecraft is not available as an RPM package, so you are not able to take advantage of the dependency resolution features of GNOME Software or dnf. Minecraft is a Java-based game, so the only dependency you need to install is a Java run-time environment. Fortunately, this is quick and easy to do in Fedora. If you do not have Java already installed, you can install the Java OpenJDK from the official Fedora repositories. You can run the following command in a terminal window to install it.

$ sudo dnf install java-1.8.0-openjdk

Note: Other online guides may give instructions for you to download and install the Oracle Java run-time environment. For playing Minecraft, it doesn’t matter which one you use, but it is simpler to use the OpenJDK already in Fedora.

Downloading Minecraft

The next step is downloading Minecraft and setting it up on your system. Minecraft for Linux is a Java archive file (JAR) from the official Minecraft website. While it is possible to play the game by directly executing the JAR from the command line, there are a few extra steps to take so that a terminal window is not required to run the game.

When setting up the game, you will need to decide on a common place on your computer to store the Minecraft JAR. If you are not sure about where to store the game, you can follow the steps below to save the file into the /opt/ directory.

$ sudo mkdir -p /opt/minecraft/bin
$ sudo wget -O /opt/minecraft/bin/Minecraft.jar http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar
$ sudo chown -R <your username>:<your username> /opt/minecraft/

After completing these steps, the Minecraft JAR will be ready for use in the /opt/minecraft/bin/ directory.

Creating a desktop app

A desktop application will make Minecraft more intuitive to start up and begin playing. To do this, you will need to create a .desktop file. This will integrate Minecraft into your desktop environment and make it so that it takes a single click to start up the game.

To create the desktop file, execute the following command to open up a text editor. You can replace gedit with a text editor of your choice.

$ sudo gedit /usr/share/applications/minecraft.desktop

Once open, you can insert the following contents into the file.

[Desktop Entry]
Exec=java -jar /opt/minecraft/bin/Minecraft.jar
Comment=The world's most exciting block simulator, now on Fedora!

You might have noticed the Icon= line and wondered where the app icon was coming from. The desktop application will look into the /usr/share/icons/ directory for an image named “minecraft.png” and use that as the icon that shows up in your desktop environment. You can use any image or your favorite block in Minecraft for the desktop icon if you’d like. If you’re not sure what to use or want the default image, you can use the Minecraft grass block for the icon. Just make sure you save the image as “minecraft.png” in the /usr/share/icons/ directory for it to appear.

Time to mine!

Congratulations! After completing these steps, you will now be able to open the Minecraft client from your desktop environment. If you do not see it immediately after creating the file, try logging out and back into your account. When opening the application, you will be greeted by the Minecraft launcher.

Opening the Minecraft launcher in Fedora Linux

If you’re ready to move on and try running your own Minecraft server, you can set one up with Spigot, an open source Minecraft server implementation. You can see our previous article on how to run a Minecraft server with Spigot.

Happy mining, and may your adventures be fruitful of diamonds and free of surprise creeper attacks!

Free alternatives to Minecraft

Unfortunately, Minecraft is neither free or open source. To gain an account to use the game, you have to pay for an account. The game source code is not available publicly. If you are looking for a free and open source version of the game and don’t mind using alternate software, Minetest is an excellent option. The Minetest client (and its official server software) are already packaged in Fedora. If you’d like to give Minetest a spin, run the following command from a terminal window.

$ sudo dnf install minetest

You can find other versions of Minetest for Windows, macOS, countless Linux distributions, Android, and FreeBSD on their website.