GoLand is a feature-rich integrated development environment (IDE) specifically designed for Go (Golang) programming by JetBrains. It offers a robust set of tools aimed at enhancing developer productivity, including smart code completion, advanced refactoring capabilities, and an integrated debugger. These features make it an ideal choice for both seasoned developers and those new to the Go programming language. GoLand also integrates seamlessly with version control systems and various testing tools, making it a comprehensive solution for developing, testing, and maintaining Go projects.
On Ubuntu 24.04, 22.04, or 20.04, you have several methods available to install GoLand, each offering distinct benefits. Installing via a third-party APT PPA ensures that GoLand is managed through Ubuntu’s package management system, allowing for easy updates alongside other system packages. Alternatively, GoLand can be installed using Snapd via Snapcraft, which provides a straightforward installation process with automatic updates and confinement features for added security. For those who prefer a more isolated environment, installing GoLand via Flatpak with Flathub allows the IDE to run independently from the rest of the system, offering additional protection and stability. This guide will take you through each of these installation methods, helping you set up GoLand on your Ubuntu system according to your preferences.
Method 1: Install GoLand via PPA
Preparation of the Ubuntu System for GoLand
Before initiating the installation process of any new software, updating our system’s local package database is essential. This step ensures that our Ubuntu system remains current with the newest versions of all available software, thereby providing a seamless platform for future installations.
To achieve this, execute the command:
sudo apt update
To upgrade the system, run the following command:
sudo apt upgrade
Installing Necessary Packages for GoLand Installation
We need to install a few essential packages on our system for the installation process to proceed smoothly. These packages, which include dirmngr, ca-certificates, software-properties-common, apt-transport-https, curl, and lsb-release, enable secure file transfers, manage repositories, and perform other critical package-related functions.
To install these packages, execute the following command:
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl lsb-release -y
Import JetBrains PPA by Jonas Groeger
At this point, we need to add the JetBrains Personal Package Archive (PPA) to our system’s list of repositories. This repository enables APT to fetch JetBrains GoLand directly from JetBrains’ PPA.
To ensure package authenticity, importing the GPG key for the JetBrains repository is important. The GNU Privacy Guard (GPG), which adheres to the OpenPGP standard, verifies the genuineness of the packages in the repository, thus ensuring that they are genuinely from JetBrains.
To import the GPG key, execute the following command:
curl -s https://s3.eu-central-1.amazonaws.com/jetbrains-ppa/0xA6E8698A.pub.asc | gpg --dearmor | sudo tee /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg > /dev/null
Next, import the repository with the following command:
echo "deb [signed-by=/usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg] http://jetbrains-ppa.s3-website.eu-central-1.amazonaws.com any main" | sudo tee /etc/apt/sources.list.d/jetbrains-ppa.list > /dev/null
Refresh APT Package Index after GoLand PPA Import
Once we have added a new repository to our system, updating the APT package database is crucial. This action ensures our system has the latest package information from the newly added JetBrains PPA.
To update the APT package database, execute the following command:
sudo apt update
Finalize GoLand Installation via APT Command
We are now ready to install JetBrains GoLand. Our system is prepared with the GoLand package details from the JetBrains PPA and is set to download and install it. To begin the installation process, use the following APT install command:
sudo apt install goland
Once this command is executed, APT will download JetBrains GoLand, resolve any required dependencies, and install them on your system. The following two sections offer snap or flatpak methods for users who prefer using these package managers instead of this PPA.
Method 2: Install GoLand via Snapcraft
Snap, a package management and software deployment system, was conceived by Canonical, the creator of Ubuntu. This tool was designed to simplify software installation and ongoing maintenance across various Linux distributions.
Verification of Snap Presence
Canonical, the creators of Ubuntu, have included Snap as a default feature in most Ubuntu distributions. However, in certain scenarios, Snap might not be pre-installed or could have been manually removed.
In such situations, Snap can be reinstalled on your system using the following command:
sudo apt install snapd -y
The execution of this command results in the installation of the Snap Daemon (snapd), a background service that manages and maintains Snap packages on your system.
Enable Classic Snap Support for GoLand
Specific Snap packages necessitate ‘classic’ confinement, a feature that allows the Snap package to access your system’s resources, similar to conventional software. To ensure broad compatibility and smooth operation of these packages, we create a symbolic link (symlink) using the following command:
sudo ln -s /var/lib/snapd/snap /snap
The execution of the above command forms a symlink between /var/lib/snapd/snap and /snap, effectively enabling classic Snap support on your system.
Installing the Core Snap
Before commencing JetBrains GoLand, installing the ‘core’ Snap is essential. This core Snap is a base for other Snaps, providing the necessary libraries and services they depend upon. This proactive step helps avoid potential conflicts or problems that may arise in the future.
To install the core Snap, execute the following command:
sudo snap install core
Install GoLand via Snap Command
Now that we have set up the prerequisites, we are ready to install JetBrains GoLand. The installation can be accomplished by executing the following command:
sudo snap install goland --classic
In the above command, sudo is used to grant elevated privileges, snap invokes the Snap package manager, install indicates the action to install a package, goland is the package we’re targeting for installation, and the –classic option allows GoLand to access your system’s resources, similar to a conventionally packaged application.
Method 3: Install GoLand via Flatpak and Flathub
Flatpak is a universal package management system built with the Linux ecosystem in mind. Although it resembles Snap, Flatpak has a unique sandboxing feature. This function creates a safe, contained environment for applications, effectively isolating them from the rest of the system. This isolation boosts system security and reduces the potential for software conflicts.
Note: If your system does not currently support Flatpak, it must be installed in advance. For a comprehensive guide on installing the most recent supported version of Flatpak on Ubuntu, we recommend visiting our detailed guide on installing Flatpak.
Enable Flathub Repository for GoLand
Before we install JetBrains GoLand using Flatpak, our initial step involves enabling the Flathub repository. Flathub functions as a trusted platform for distributing Flatpak applications. It operates similarly to an online app store, providing access to many applications ready for installation.
To integrate the Flathub repository into your system’s configuration, execute the following command in your terminal:
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Executing the command above integrates the Flathub repository into your Flatpak configuration. This integration allows for a wide range of applications, including JetBrains GoLand.
Install GoLand on Ubuntu via Flatpak Command
After successfully integrating the Flathub repository into your system, you should install JetBrains GoLand. This process employs the flatpak install command.
The specific command for installing JetBrains GoLand is as follows:
flatpak install flathub com.jetbrains.GoLand -y
This command triggers the download and installation of JetBrains GoLand from the Flathub repository, ensuring the latest stable version of the application is secured for use.
Launching GoLand on Ubuntu via GUI or CLI
You must start the application after successfully installing JetBrains GoLand on your Ubuntu system. Two main ways to initiate GoLand are the command-line interface (CLI) and the graphical user interface (GUI).
Starting GoLand through the Command-Line Interface (CLI)
The command-line interface is an essential tool within the Linux environment, and the launch of applications such as JetBrains GoLand is no exception. The following subsections will outline how to start GoLand using different command sets, depending on your chosen installation method—APT, Snap, and Flatpak.
Launching GoLand using the APT Command
To start GoLand using the APT command, open your terminal and input the following command:
goland
Executing this command starts the Integrated Development Environment (IDE), preparing it for your coding projects.
Launching GoLand using the Snap Command
If you have installed JetBrains GoLand using Snap, the command to initiate it is:
snap run goland
On execution, this command starts GoLand, provided the installation process is completed successfully.
Launching GoLand using the Flatpak Command
If you have opted for Flatpak as your installation method, you can initiate GoLand using the following command in your terminal:
flatpak run com.jetbrains.GoLand
This command will kick-start GoLand, provided the installation is completed successfully.
Starting GoLand through the Graphical User Interface (GUI)
Ubuntu’s graphical user interface (GUI) offers an alternate way to start GoLand for those who favor a more visual approach. Here is the step-by-step process:
- Access the Activities menu: This can be found at the top-left corner of your desktop screen.
- Select the ‘Show Applications’ icon: This is situated at the bottom of the Activities overlay.
- Search for GoLand: You can manually scroll through your applications or use the search bar to find GoLand quickly.
- Start GoLand: Finally, click the GoLand icon to start the IDE, preparing it for your coding tasks.
GoLand Management Tips
Update GoLand
Keeping software applications up-to-date is an indispensable practice in the digital realm. Regular updates usher in new features and bring about important security patches and performance enhancements. Therefore, acquiring the various package manager commands to update GoLand is a critical skill.
APT Update Commands for GoLand
The Advanced Package Tool, often abbreviated as APT, is a prominent package management utility in Ubuntu. Updating GoLand using APT is comprised of two essential steps. First, the package list is refreshed to mirror the most recent versions of all packages. Subsequently, an upgrade command is invoked to apply the updates. The commands that accomplish these operations are as follows:
sudo apt update
sudo apt upgrade goland
Snap Update Command for GoLand
Snap, a software packaging and deployment system designed by Canonical, provides a simple method to update GoLand. The following command triggers this action:
sudo snap refresh goland
If you installed GoLand as a snap package, updates are performed automatically. Snaps are refreshed in the background every day.
Flatpak Update Command for GoLand
Flatpak is a versatile tool for software deployment, package management, and application virtualization in Linux environments. To carry out a GoLand update via Flatpak, execute the command given below:
sudo flatpak update com.jetbrains.GoLand
Remove GoLand
In certain situations, you might need to remove GoLand from your Ubuntu Linux system. The forthcoming subsections elucidate the steps required to carry out this procedure.
APT Remove Commands for GoLand
To uninstall GoLand employing APT, the command below should be executed:
sudo apt remove goland
If you do not intend to reinstall GoLand or use the JetBrains third-party APT PPA in the future, the repository and GPG key can also be purged with these commands:
sudo rm /etc/apt/sources.list.d/jetbrains-ppa.list
sudo rm /usr/share/keyrings/jetbrains-ppa-archive-keyring.gpg
Snap Remove Command for GoLand
Uninstalling GoLand using Snap is as simple as issuing the following command:
sudo snap remove goland
Flatpak Remove Command for GoLand
Finally, to uninstall GoLand employing Flatpak, the command below should be executed:
sudo flatpak uninstall com.jetbrains.GoLand
Conclusion
By installing GoLand on your Ubuntu system through the APT PPA, Snapd, or Flatpak, you gain access to a powerful IDE that is tailored to meet the needs of Go developers. Each installation method offers its own set of advantages—whether it’s the ease of updates through the system package manager, the security of Snap packages, or the sandboxed environment provided by Flatpak. Regardless of the method you choose, GoLand will enhance your development workflow, providing the tools and features necessary to efficiently write, debug, and maintain your Go projects on Ubuntu.