1. Home
  2. Linux
  3. Play minecraft on linux

How To Play Minecraft On Linux

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!

Note: This method no longer works. Minecraft has updated the launcher for Linux. For instructions on how to get the new Minecraft launcher for Linux to work, follow our guide here.

 

Download Minecraft

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).

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.

Ubuntu

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

Debian

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:

#Webupd8

deb https://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src https://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:

cd ~/Downloads

Fedora

sudo dnf install jre-8u171-linux-x64.rpm

or

sudo dnf install jre-8u171-linux-i586.rpm

OpenSUSE

sudo zypper install jre-8u171-linux-x64.rpm

or

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.

[Desktop Entry]
Name=Minecraft
Exec=sh ~/Minecraft/mc-launch.sh
Icon=~/Minecraft/mc-icon.png
Terminal=false
Type=Application

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.