Skip to content

Instantly share code, notes, and snippets.

@aamaanaa
Last active March 5, 2026 22:36
Show Gist options
  • Select an option

  • Save aamaanaa/7396a81be39d4549567e1484b82faef3 to your computer and use it in GitHub Desktop.

Select an option

Save aamaanaa/7396a81be39d4549567e1484b82faef3 to your computer and use it in GitHub Desktop.
How to Install Goland on Linux

Taken from: https://aamaanaa.com/


Goland, the Go IDE by JetBrains, can be installed manually on any Linux distribution using the official tarball. This approach ensures you always get the untampered, official binary without relying on Flatpak or third-party repositories.

This guide provides a ready-to-use bash script for automatic installation and also shows how to run the installation manually. This should work on any Linux distro.

If there is enough interest, future guides may cover multiple JetBrains products.


NOTE: sudo is needed to install Goland in the /opt folder.

Option 1: install using the one-liner script

The easiest way to install Goland is by running the following command in your terminal:

curl -sSfL https://aamaanaa.com/v1/downloads/install-goland.sh | sudo bash

This script will:

  • Download the official Goland tarball from JetBrains.
  • Verify the shasum using the provided one by jetbrains
  • Extract it to your system.
  • Set up necessary environment variables.
  • Make Goland ready to launch immediately.

Option 2: manual install using install-goland.sh

Take the source code from the bottom and save it as install-goland.sh, and run it with sudo.


Why this way of installing is recommended

  • Official binaries: Avoid unverified third-party repositories.
  • Latest version: Always get the newest release directly from JetBrains.
  • Security: Reduce the risk of tampered packages.
  • Customizable: Manual setup allows you to choose installation paths and environment settings.

Next Steps

  • Launch Goland from your applications menu or by running goland binary from the installation directory.

Script source code

#!/usr/bin/env bash
set -euo pipefail

INSTALL_DIR="/opt/goland"
BIN_LINK="/usr/local/bin/goland"
DESKTOP_FILE="/usr/share/applications/goland.desktop"
TMP_DIR="$(mktemp -d)"

cleanup() {
    rm -rf "$TMP_DIR"
}
trap cleanup EXIT

echo ">>> Installing latest stable GoLand (linux x86_64)..."

# Ensure required deps exist
for cmd in curl jq tar sha256sum basename find; do
    command -v "$cmd" >/dev/null 2>&1 || {
        echo "Required command missing: $cmd"
        exit 1
    }
done

JSON_URL="https://data.services.jetbrains.com/products/releases?code=GO&latest=true&type=release"

echo ">>> Fetching release metadata..."
JSON="$(curl -fsSL "$JSON_URL")"

DOWNLOAD_URL="$(echo "$JSON" | jq -r '.GO[0].downloads.linux.link')"
CHECKSUM_URL="$(echo "$JSON" | jq -r '.GO[0].downloads.linux.checksumLink')"

if [[ -z "$DOWNLOAD_URL" || "$DOWNLOAD_URL" == "null" ]]; then
    echo "Failed to extract linux download URL."
    exit 1
fi

FILENAME="$(basename "$DOWNLOAD_URL")"

echo ">>> Downloading tarball..."
curl -fL -o "$TMP_DIR/$FILENAME" "$DOWNLOAD_URL"

echo ">>> Downloading checksum..."
curl -fL -o "$TMP_DIR/$FILENAME.sha256" "$CHECKSUM_URL"

echo ">>> Verifying checksum..."
(
    cd "$TMP_DIR"
    sha256sum -c "$FILENAME.sha256"
)

echo ">>> Extracting..."
tar -xzf "$TMP_DIR/$FILENAME" -C "$TMP_DIR"

EXTRACTED_DIR="$(find "$TMP_DIR" -maxdepth 1 -type d -name 'GoLand-*' | head -n 1)"

if [[ -z "$EXTRACTED_DIR" ]]; then
    echo "Extraction failed."
    exit 1
fi

echo ">>> Installing to $INSTALL_DIR"
sudo rm -rf "$INSTALL_DIR"
sudo mv "$EXTRACTED_DIR" "$INSTALL_DIR"

# Use the **native launcher** now
NATIVE_LAUNCHER="$INSTALL_DIR/bin/goland"

echo ">>> Creating CLI symlink to native launcher..."
sudo ln -sf "$NATIVE_LAUNCHER" "$BIN_LINK"

echo ">>> Creating desktop entry..."
sudo tee "$DESKTOP_FILE" > /dev/null <<EOF
[Desktop Entry]
Version=1.0
Type=Application
Name=GoLand
Comment=JetBrains GoLand IDE
Exec=$NATIVE_LAUNCHER
Icon=$INSTALL_DIR/bin/goland.svg
Terminal=false
Categories=Development;IDE;
StartupWMClass=jetbrains-goland
EOF

sudo chmod 644 "$DESKTOP_FILE"

echo ">>> Installation complete!"
echo "Launch from app menu or run: goland"
@aamaanaa
Copy link
Author

aamaanaa commented Mar 5, 2026

If enough interest i will improve it and also add support for other editors from jetbrains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment