Minecraft is one of the biggest games in the world right now, and it’s incredibly popular with kids and adults. The reason for this isn’t too hard to understand; the game is open-ended, and lets the player do whatever they want. Unlike a lot of other popular video games out right now, Minecraft has excellent support for Linux.Â If you’re a fan of this game and have recently switched away from Windows or Mac, you’re probably trying to figure out how to play Minecraft on Linux.
Luckily, getting Minecraft working on the Linux platform is very easy. Follow along with this tutorial, and soon you’ll be building and adventuring to your heart’s content!
Before being able to play Minecraft on Linux, you’ll need to create a new account. You’ll also need to buy the game, as it’s not free. Purchase your copy of Minecraft from the Mojang store, here. Once you’ve paid for your copy of Minecraft, follow this download link here to download the Java edition of the game.
It is crucial that you do not download any other version of Minecraft. Just stick with the Java edition, as this is the only release of the game that we can confirm works on Linux. Additionally, Mojang does say that the Java edition is maintained explicitly so that Linux users can play the game!
With the Java version of Minecraft downloaded, open up your file manager and create a “Minecraft” folder insideÂ /home/username/. Inside that folder, drag the Minecraft Jar file inside. We’ll come back to the Jar file later, after installing Java.
Install Java on Linux
Linux doesn’t come ready to use Java, as the Java runtime environment is not open source software. To remedy this, many Linux distribution maintainers choose to distribute an open source alternative to the official Java Runtime, known as “Open JRE.” For the most part, having the open source version of Java runs things very well. However, Mojang outline on their website that they would prefer players to stick with the official closed source version of Java (aka Oracle’s version of the Java runtime).
‘); if (navigator.appVersion.indexOf(“Mac”)!=-1) document.write(”);
The reason for this is most likely that Minecraft doesn’t run as good in the open source Java runtime. To get the latest version of the Oracle Java runtime working, you’ll first need to open up a terminal window.
Users can easily install Oracle’s version of Java, thanks to a PPA. To add this PPA, enter this command into the terminal.
Note: this PPA will also work with Linux Mint as well as other Linux distributions that use Ubuntu as a base.
sudo add-apt-repository ppa:webupd8team/java
Next, update Ubuntu’s software sources so that the new PPA can be put to use.
sudo apt update
After running theÂ updateÂ command, install any available upgrades that are ready.
sudo apt upgrade -y
Finally, install and enable the Java Runtime.
sudo apt install oracle-java9-installerÂ sudo apt installÂ oracle-java9-set-default
Thanks to the Ubuntu PPA, Debian users can easily install the Oracle Java Runtime. To start off, open up a terminal and use theÂ NanoÂ text editor to add a new software source inÂ /etc/apt/sources.list.
sudo nano /etc/apt/sources.list
Move all the way to the bottom of the sources list and paste the following:
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
SaveÂ the edits to theÂ sources.list file inÂ NanoÂ withÂ Ctrl + O. Exit the editor withÂ Ctrl + X.
After adding the new software source to Debian, install the software repos GPG key and update your software sources.
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 sudo apt-get update
Lastly, install Oracle Java to Debian with:
sudo apt-get install oracle-java9-installer sudo apt-get install oracle-java9-set-default echo oracle-java9-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
Fedora and OpenSUSE
Need to get Oracle Java for OpenSUSE or Fedora? Good news! It just so happens that Oracle distributes an RPM that can be used to easily install Java 8. To install, first download the RPM file. From there, follow the commands below:
sudo dnf installÂ jre-8u171-linux-x64.rpm
sudo dnf installÂ jre-8u171-linux-i586.rpm
sudo zypper installÂ jre-8u171-linux-x64.rpm
sudo zypper installÂ jre-8u171-linux-i586.rpm
Install Minecraft On Linux
Now that Java is up and running, it’s time to install Minecraft on Linux. To install it, you’ll need to create a custom desktop icon. In the terminal, run the following command to create a launch script:
echo '#!/bin/bash/' > ~/Minecraft/mc-launch.sh echo 'java -jar ~/Minecraft/Minecraft.jar' >> ~/Minecraft/mc-launch.sh chmod +x ~/Minecraft/mc-launch.sh
Next, use theÂ wgetÂ tool to download a Minecraft icon to use for the shortcut.
cd ~/Minecraft/ wget https://i.imgur.com/6KbjiP3.png mvÂ 6KbjiP3.png mc-icon.png
Use touch to create a new file, then open Nano.
touch ~/Desktop/minecraft.desktop sudo nano ~/Desktop/minecraft.desktop
Paste the following code inÂ NanoÂ to create the game shortcut.
Update the permissions withÂ chmod.
chmod +x ~/Desktop/minecraft.desktop
Once permissions are correct, Minecraft is ready to play! Go to the desktop, double-click on the icon and start up the game!
If you’re interested in hosting a Minecraft server on Linux, check out our detailed post on how to do just that.