What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The most reliable way to install Go on a Linux VPS is to choose between the distribution package and the official Go archive, then make both the system toolchain and your user-installed binaries available in every shell. Use Ubuntu’s Debian package or Snap when its update cadence is acceptable. Use the official archive when you need a particular Go release, the same layout across different distributions, or a tightly controlled deployment. Whichever route you choose, verify the binary after reloading your profile and keep service-account environments separate from your interactive SSH shell.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
This guide covers Ubuntu package and Snap installs, a distribution-independent archive install, persistent PATH configuration, architecture checks, side-by-side versions, source builds, and the failures that most often leave a VPS with the wrong Go binary.
As an Amazon Associate I earn from qualifying purchases.
Recommended Free Tools
Choose an installation method first
There is no single best installer for every VPS. The right choice depends on whether you value distribution integration, release pinning, portability, or multiple toolchains.
| Method | Best fit | Version control | Update and layout characteristics |
|---|---|---|---|
| Ubuntu APT package | Servers where tested distribution integration and the normal Ubuntu update process matter most | Uses the versions packaged by the Ubuntu release; a versioned package can be requested when available | Managed by APT and installed in Ubuntu’s package layout |
| Snap | Administrators who prefer Snap channels for selecting a Go release line | Channel selection can target a specific release line | Managed by Snap; requires Snap support on the VPS |
| Official Go archive | A specific upstream release, a reproducible layout across distributions, or a minimal dependency on distribution packaging | You select the exact archive and can record it in deployment configuration | Installed under /usr/local/go; upgrades are explicit |
| Build from source | Toolchain contributors, unusual targets, or controlled build pipelines | Source revision and build process are controlled by you | Requires a bootstrap Go toolchain; a C compiler is optional unless cgo support is required |
For most application VPSs, start with APT if the Ubuntu-provided version is suitable. Choose the archive when your application requires a particular release or when several servers must share the same upstream toolchain independent of their distribution versions.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Check the VPS before installing
Run these commands over SSH before choosing an archive or package:
uname -s
uname -m
cat /etc/os-release
id -un
command -v go || true
go version 2>/dev/null || true
uname -s should identify Linux. uname -m supplies the architecture suffix needed by an archive; common supported instruction sets include amd64, 386, and arm64, with additional ARM targets available. The distribution release file tells you which Ubuntu or other Linux package instructions apply. The last two commands reveal whether an older Go installation is already winning the PATH.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →- Have an account with
sudoaccess for installation under/usr/localor system package management. - Record the release you intend to deploy. A written version value prevents an unnoticed toolchain change during a later rebuild.
- Decide whether Go is needed only by one login user or by a system service. An interactive user’s profile is not automatically loaded by a service manager.
Install Go with Ubuntu’s APT package
Ubuntu documents Go as a Debian package. This is the shortest supported path when the distribution’s packaged version and update process meet your requirements.
- Refresh package metadata:
sudo apt update - Install the Go package:
sudo apt install golang-go - Verify the result in the same shell:
go version
The output should include a Go release and the Linux platform. If Ubuntu publishes versioned packages for the releases you need, its guide documents names such as golang-1.21 and golang-1.23. Package availability and the exact versions depend on the Ubuntu release and enabled repositories, so check the package manager’s candidate version rather than assuming that an example package name exists on every VPS.
Install Go with Snap
Snap is Ubuntu’s other documented route. It is useful when you want Snap’s channel model to select a release line instead of relying on the Ubuntu package stream.
- Install Go from the classic Snap track:
sudo snap install go --classic - Confirm the executable and release:
go version
A specific Snap channel can be selected when the release line you require is published there. Snap must be available and operational on the VPS; a minimal image without Snap support may make the archive or APT route simpler.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Install a selected release from the official Go archive
The archive method gives you a distribution-independent installation under /usr/local/go. Select the current Linux archive from the official Go downloads page at installation time instead of copying an old filename from a tutorial. Match its architecture suffix to the value reported by uname -m.
1. Set the release and architecture variables
Use the exact numeric release and archive architecture shown on the downloads page. The following shell variables are intentionally values you set for the release you have approved:
GO_VERSION=X.Y.Z
GO_ARCH=amd64
ARCHIVE="go${GO_VERSION}.linux-${GO_ARCH}.tar.gz"
For an ARM VPS, set GO_ARCH to the suffix used by the matching archive, such as arm64. Do not assume that a package architecture and an archive suffix are interchangeable without checking the published filename.
2. Download the archive over HTTPS
Use a downloader already present on the VPS:
wget "https://go.dev/dl/${ARCHIVE}"
# or
curl -fLO "https://go.dev/dl/${ARCHIVE}"
Keep the selected release in your change record or deployment configuration. That record is what makes a later rebuild reproducible; the word “current” is not a version-pinning strategy.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors3. Remove an old Go tree before extracting
If /usr/local/go already exists, remove it before unpacking the new archive:
sudo rm -rf /usr/local/go
The Go project explicitly warns: “Do not untar the archive into an existing /usr/local/go tree. This is known to produce broken Go installations.” Untarring over an old tree can leave files from two releases mixed together, even when the extraction command reports success.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
4. Extract into /usr/local
sudo tar -C /usr/local -xzf "$ARCHIVE"
The archive contains a top-level directory named go, so this command creates /usr/local/go. If you downloaded the archive as another user, the file can remain in that user’s home directory; only the destination requires administrative privileges.
5. Expose the Go distribution in system profiles
The compiler and standard Go tools live in /usr/local/go/bin. Add that directory to a profile that applies to the intended users. For a system-wide login configuration:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/go.sh
For one administrator account, put the same export in that account’s profile instead. A profile change affects future shells only, so continue with the reload step before testing.
6. Add binaries installed by go install
Executables installed with go install are separate from the Go distribution. Add the user’s Go binary directory to that user’s profile:
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> ~/.profile
Because the profile now adds /usr/local/go/bin first, go env GOPATH can resolve when the profile is read. The default result is normally a go/bin directory beneath the user’s home directory, but using go env GOPATH follows any configured GOPATH instead of assuming a location.
7. Reload and verify
source ~/.profile
go version
command -v go
Opening a new SSH session is an equivalent reload. The version output must name the release you selected and a Linux architecture; command -v go should point to the intended installation. The Go project’s verification instruction is simple: confirm that the command prints the installed version of Go.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Understand the two PATH entries
Go installations commonly fail because two different directories are treated as one.
| Directory | What it contains | When it is needed |
|---|---|---|
/usr/local/go/bin |
The compiler, linker, formatter, and other tools shipped in the Go distribution | Whenever the archive installation is used |
$(go env GOPATH)/bin |
Executables added by commands such as go install |
When user-installed Go tools must run by name |
Keep the entries conceptually separate. The first selects the toolchain; the second exposes applications built with that toolchain. A user can have the second entry even when Go itself came from APT or Snap. Put the user-specific entry in that user’s profile rather than inserting one administrator’s home directory into a system-wide file.
Make PATH work for shells and services
Interactive SSH sessions usually read a login profile, but noninteractive commands and service managers may not. A deployment that works manually as your account can still fail when launched by a system service.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match- For an interactive account, source the changed profile or start a new SSH session before testing.
- For a deployment script, export the required
PATHexplicitly near the start of the script. - For a service unit or other init configuration, define the environment in that manager’s configuration and test it in the actual deployment environment.
- When operational predictability is more important than convenience, call the intended binary by its absolute path rather than relying on whichever
goappears first inPATH.
Do not assume that ~/.profile for an administrator is loaded for a separate service account. Give the service account its own environment or use an explicit toolchain path in the build and launch configuration.
Verify more than the version string
After reloading the environment, run a small inspection set:
command -v go
go version
go env GOROOT GOPATH GOOS GOARCH
command -v goreveals which installation wins when APT, Snap, and an archive have all been tried.go versionconfirms the release and platform printed by the executable.GOROOTidentifies the selected Go distribution, whileGOPATHidentifies the workspace used for user-installed tools.GOOSandGOARCHconfirm the target platform seen by the toolchain, which is useful when a VPS is ARM-based or when cross-compilation settings have been configured.
For a service account, run the same checks as that account or inside the service’s deployment environment. A successful check in your SSH shell does not prove that the daemon sees the same variables.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Troubleshoot the common failures
| Symptom | Likely cause | Fix |
|---|---|---|
go: command not found after an archive install |
The profile was changed but not reloaded, or /usr/local/go/bin is absent from PATH |
Run source ~/.profile or open a new SSH session, then inspect echo "$PATH" and command -v go. |
| The wrong Go release appears | Another package or archive directory precedes the intended one in PATH |
Use command -v go, inspect the path order, and make the selected binary explicit in build or deployment scripts. |
| The archive installation behaves inconsistently | The new archive was untarred over an existing /usr/local/go tree |
Remove /usr/local/go completely and extract a fresh archive, following the Go project’s warning. |
A tool installed with go install cannot be run |
The user’s Go binary directory is not in PATH |
Add $(go env GOPATH)/bin to that user’s profile, reload it, and verify the directory with go env GOPATH. |
| The downloaded archive will not run | The archive architecture does not match the VPS | Compare uname -m with the archive suffix and download the matching Linux build. |
| An interactive check succeeds but a daemon fails | The service manager did not load the interactive profile | Set PATH or an absolute Go binary path in the service or deployment environment and test under the service account. |
Install and select multiple Go versions
Side-by-side versions are useful when separate applications have different toolchain requirements. Ubuntu documents versioned packages such as golang-1.21 and golang-1.23, then testing them through full paths under directories such as /usr/lib/go-1.21/bin/ and /usr/lib/go-1.23/bin/.
Do not rely on an accidental PATH order when two applications need different releases. Keep the selected binary explicit in build scripts, deployment units, and CI commands. For archive installations, use separate approved directories or hosts and record the exact archive release; for Ubuntu’s versioned packages, use the documented full path for the application that requires a particular version.
When a source build is justified
The Go project says most users should install precompiled binary packages because that is substantially simpler. Building from source is primarily appropriate for Go toolchain contributors, unusual targets, or a controlled build pipeline that deliberately owns the bootstrap process.
A source build requires a bootstrap Go toolchain. A C compiler is optional unless the build or resulting programs require cgo support. This route adds source revision, bootstrap version, compiler, and target decisions to your maintenance burden, so it is rarely the sensible first installation on an ordinary application VPS.
Operational checklist for a production VPS
- Identify the distribution, kernel architecture, and existing
gobinary. - Choose APT, Snap, or the official archive based on release control and update requirements.
- If using an archive, select the exact current filename for the VPS architecture and record the release.
- Remove any previous
/usr/local/gotree before extraction. - Add
/usr/local/go/binfor the toolchain and the user’s GOPATH binary directory for installed tools. - Reload the profile or open a new SSH session.
- Run
command -v go,go version, andgo env GOROOT GOPATH GOOS GOARCH. - Repeat verification as the service account or inside the deployment environment.
- For multiple releases, use explicit full paths rather than allowing a global
PATHchange to silently switch applications.
For a typical Ubuntu VPS, APT is the practical default when its packaged release is acceptable. The official archive is the better fit when a specific upstream version, a consistent cross-distribution layout, or tightly controlled upgrades matters. In both cases, a persistent and deliberately tested environment is as important as the installation command itself.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




