LinuxCommandLibrary

minecraft

Launch Minecraft game

TLDR

Start a Minecraft server and generate a world if it doesn't exist

$ java -jar [path/to/server.jar] --nogui
copy

Set the minimum and maximum amount of memory a server is allowed to have (Note: Setting them the same prevents lag caused by heap scaling)
$ java -Xms[1024M] -Xmx[2048M] -jar [path/to/server.jar] --nogui
copy

Start a server with a GUI
$ java -jar [path/to/server.jar]
copy

Shut the server down
$ stop
copy

SYNOPSIS

There is no standard `minecraft` Linux command with a defined synopsis. The Minecraft game or server is typically launched via a graphical launcher or by invoking the Java Virtual Machine directly on a Minecraft JAR file.

DESCRIPTION

The term "minecraft" refers to the popular sandbox video game created by Mojang Studios. It is not a native or pre-installed Linux command-line utility. While the Minecraft game client and server software can be run on Linux operating systems, there isn't a universally recognized or pre-packaged `minecraft` command with a standard set of options or a man page like typical Linux commands such as `ls` or `grep`.

Users typically interact with Minecraft on Linux by running a dedicated launcher (either the official one or a community-developed alternative like MultiMC) or by directly executing the game's or server's Java Archive (JAR) files using the `java` command. The game's cross-platform nature, built on Java, allows it to run on various operating systems, including Linux, provided a compatible Java Runtime Environment (JRE) is installed.

CAVEATS

The 'minecraft' command does not exist natively on Linux distributions. Users must install the game's official launcher, a third-party launcher, or the server software separately. Running Minecraft (client or server) generally requires a compatible Java Runtime Environment (JRE) to be installed on the system.

RUNNING MINECRAFT ON LINUX

The Minecraft client is commonly run via the official Minecraft Launcher, which is available for Linux. Alternatively, third-party launchers (e.g., MultiMC, ATLauncher) offer more features and customization. Direct execution of the client JAR file with `java -jar Minecraft.jar` is also possible but less common for end-users.

Minecraft servers are frequently run directly using the Java command, for example:
`java -Xmx4G -Xms4G -jar server.jar nogui`
where `-Xmx` and `-Xms` define memory limits.

INSTALLATION METHODS

The official Minecraft Launcher can be downloaded from Mojang's website, often provided as a `.deb` (for Debian/Ubuntu-based systems), `.rpm` (for Fedora/Red Hat-based systems), or a generic `.jar` or executable file. Community-driven packaging methods like Snap or Flatpak also provide convenient and sandboxed ways to install Minecraft launchers on various Linux distributions.

HISTORY

Minecraft was created by Markus 'Notch' Persson and first released to the public in 2009, with its full release in 2011. While primarily known for its graphical user interface and cross-platform availability, server versions have always been capable of running headless on Linux servers, making it a popular choice for hosting multiplayer worlds. The game has consistently supported Linux users, primarily through its Java-based architecture, which allows its client and server JAR files to be executed directly, or via dedicated launchers provided by Mojang or the community.

SEE ALSO

java(1), bash(1), apt(8), dnf(8), snap(1), flatpak(1)

Copied to clipboard