Installing OptiFine on Linux

26.1.2

OptiFine is a Minecraft Java Edition mod that boosts performance, adds shader support, and unlocks fine-grained video settings. It installs as a custom Minecraft profile: you download one .jar file, run it, click Install, then launch the OptiFine profile from the Minecraft Launcher. The whole process usually takes under two minutes.

Choose your OS

Pick your operating system if you'd like to switch guides:

Prerequisites

Before you start, make sure you have the following ready:

  • Minecraft Java Edition installed and launched at least once for the version you want to mod. The first launch downloads the game files OptiFine patches into.
  • Java — the Minecraft Launcher ships a compatible Java runtime, so launching Minecraft once is usually enough. See the Installing Java guide if the installer won't open.
  • The right OptiFine build for your Minecraft version. Grab the matching .jar from the Downloads page.

1. Install a Java runtime

Most distributions don't ship Java by default. Install the OpenJDK JRE for your distro:

# Debian / Ubuntu
sudo apt install default-jre

# Fedora
sudo dnf install java-latest-openjdk

# Arch
sudo pacman -S jre-openjdk

2. Download OptiFine

Grab the matching .jar from the Downloads page.

3. Run the installer

Open a terminal in the folder that holds the file and run:

java -jar OptiFine_1.XX.X_HD_U_XX.jar

Or right-click the file in your file manager and open it with the Java runtime. The installer auto-detects ~/.minecraft.

4. Click Install

Click Install in the installer window and wait for the confirmation dialog.

5. Launch the OptiFine profile

Open the Minecraft Launcher, go to Installations, pick the OptiFine profile, then click Play.

Match the Minecraft version
The OptiFine profile only works with the Minecraft version it was built for. Double-check the version on the Downloads page.

Verify the install

Launch the OptiFine profile from the Minecraft Launcher. On the main menu, open Options Video Settings. If you see extra tabs like Shaders, Details, and Performance, OptiFine is running.

Troubleshooting

The .jar file does not open

The system is trying to open the file with an archive tool instead of Java. Right-click the file, choose Open with, and pick the Java runtime. If Java isn't listed, install it first — see the Installing Java guide.

OptiFine profile does not appear

Open the Minecraft Launcher, go to Installations, and toggle the Modded filter on. If the profile is still missing, re-run the OptiFine installer.

Wrong Minecraft version

OptiFine builds are tied to a specific Minecraft version. Double-check the version on the Downloads page and use the matching .jar.