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. 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.
  • A working Java runtime — the launcher ships one, so launching Minecraft once is usually enough. See Installing Java if the installer won't open.
  • The OptiFine build that matches your Minecraft version, from the Downloads page.

1. Download OptiFine

Open the Downloads page and grab the .jar that matches your Minecraft version. Save it somewhere easy to find, such as your Downloads folder.

2. Run the installer

Double-click the .jar file. The OptiFine installer window opens and automatically detects your Minecraft folder.

3. Click Install

Press Install and wait for the confirmation dialog. Nothing in your vanilla installation is overwritten.

4. Launch the OptiFine profile

Open the Minecraft Launcher, go to Installations, select the new OptiFine profile, and click Play.

Notes for your system

Most distributions don't ship Java. Install an OpenJDK runtime first, then run the installer from a terminal:

java -jar OptiFine_1.21_HD_U_J1.jar

The default Minecraft folder on Linux is ~/.minecraft.

Match the Minecraft version

An OptiFine profile only works with the Minecraft version it was built for. If Minecraft launches without OptiFine features, you probably selected the wrong profile.

Verify the install

Launch the OptiFine profile and open Options → Video Settings. If you see extra tabs such as Shaders, Details, and Performance, OptiFine is running.

Troubleshooting

The .jar file does not open

Your system is opening the file with an archive tool instead of Java. Associate it with the Java runtime, or install Java following the Installing Java guide.

The OptiFine profile does not appear

In the Minecraft Launcher open Installations and enable the Modded filter. If it is still missing, run the installer again.

Wrong Minecraft version

OptiFine builds are tied to one Minecraft version. Check the version on the Downloads page and use the matching .jar.