Go Linux/Debian users which is the apt command to install Go via terminal?

newbie

Thumbnail image: You only have time for real-time. Start fast and deliver production-ready app experiences at any scale—on Google Cloud, AWS, and Azure—with Redis-as-a-Service. Start for free today.

I’m not sure if there’s an official apt repo for Go. I don’t think there is but am happy to be corrected. There’s a bunch of unofficial PPAs but the official (and safe!) way is to get the binary from go.dev.

If you wish you can download the tar.gz and package it up into a deb and put it on a PPA you control. Then you’ll be able to deploy it across your computers.

Or simply write a script to download it once and distribute/upgrade it.

More replies

Use apt-file to find which package a file belongs to.

this one is brilliant, works like a charm!

More replies

There is a snap for go. I normally download the appropriate tar.gz and follow the Install instructions, but I've got a couple of machines (actually WSL on Windows) where I've used the snap.

apt install golang. But the version in the stable (bullseye) repo is 1.15 iirc so you’ll want to use backports which has 1.18