Prerequisites
Minecraft requires a Java Runtime Environment (JRE) or Java Development Kit (JDK). While the official launcher may include a bundled Java version, ensuring a compatible version is installed on your Ubuntu system is recommended for stability and broader compatibility.
- Java Installation: OpenJDK is a widely used and recommended option. Use the
apt
package manager to install a suitable version. Current versions of Minecraft typically require Java 17 or newer. For example:sudo apt update
sudo apt install openjdk-17-jdk
You can verify your Java installation by opening a terminal and typing: java -version
.
Installation Methods
The primary and recommended way to install Minecraft: Java Edition on Ubuntu is through the official launcher.
- Official Launcher (DEB Package): Mojang Studios provides a
.deb
package for Debian-based distributions like Ubuntu. This package simplifies the installation process. -
Download and Install: Obtain the
.deb
file from the official Minecraft website. Once downloaded, you can install it graphically using the "Software Install" application by double-clicking the file, or via the terminal using a command such as:sudo dpkg -i *
(Replace with the actual downloaded filename).If you encounter dependency issues, run:
sudo apt-get install -f
Running Minecraft
Once the Minecraft Launcher is installed, you can find it in your Ubuntu applications menu.
- Launching the Game: Open the launcher. You will need to log in with your Microsoft account (formerly Mojang account). After logging in, the launcher will allow you to install the latest version of Minecraft or choose a specific version.
- Graphics Drivers: For optimal performance, ensure your graphics drivers are up to date. Ubuntu's "Software & Updates" utility (under the "Additional Drivers" tab) can help you install proprietary drivers for NVIDIA or AMD graphics cards if available and necessary. Using open-source drivers (like Mesa for AMD/Intel) is also common, but proprietary drivers may offer better performance for some hardware.
- Performance: Minecraft's performance on Linux is generally good. If you experience issues, ensure sufficient RAM is allocated to the game via the launcher's settings (Installations -> Edit profile -> More Options -> JVM Arguments, e.g.,
-Xmx4G
for 4GB RAM).
Minecraft Server on Ubuntu
Ubuntu is a robust platform for hosting your own Minecraft server.
- Server Software: The official Minecraft server software is distributed as a
.jar
file. This file can be obtained from the Minecraft website. - Running the Server:
To run the server, navigate to the directory containing the server
.jar
file in a terminal and execute it with Java. A typical command looks like:java -Xmx1024M -Xms1024M -jar * nogui
(Replace
1024M
with desired RAM allocation, e.g.,4G
for 4GB, and with your server file's name. Thenogui
option runs it without a graphical interface, which is standard for servers.) - Configuration: The first time you run the server, it will generate files including (which you must edit to set
eula=true
) and (for server configuration like game mode, difficulty, port, etc.). - Network: Ensure your firewall (e.g., UFW on Ubuntu) allows connections on the Minecraft server port (default is 25565). If behind a router, port forwarding will be necessary for external players to connect.