Visual studio code ubuntu 1812/6/2023 ![]() Next up, we’ll set up your development environment using Visual Studio Code. # Verify that the installation was successful go versionĬongratulations! You now have Go installed on your machine. echo 'export PATH=$PATH:/usr/local/go/bin' > ~/.bashrc # If you don't use this, you'll need to run 'export PATH=$PATH:/usr/local/go/bin' # every time you start a new shell. ![]() Note the last part about > ~/.bashrc # This is important to make sure that the filepath is loaded when you start a new shell. ![]() # If you are replacing an existing version of Go, you'll need to remove the existing version first # Note that your location may be elsewhere, depending on any instructions you followed previously # or previous decisions # Also note that install multiple versions of Go by using the go install command, as documented # in the Go documentation at # sudo rm -rf /usr/local/go # Now you can move the files to the correct location sudo mv go /usr/local # Extract the files to your local directory tar -xzvf go1.18.1. # Download the latest version of go wget I’ll focus on Ubuntu 20.04 in my Windows Subsystem for Linux (WSL) setup. The installation process is fairly straightforward, and will of course be different for each operating system. ![]() For example, I had a version of Go installed on my machine from the time that I used when running some customisations setting up the powerline-go configuration for my ohmyposh setup. It may be preinstalled by your operating system, or you may have installed it manually. You can find the full list of available versions of Go for download here.Įven if you haven’t used the go command before, it’s possible that you have a version of Go installed on your machine. if there are specific language version dependencies). This is useful if you want to use different versions of Go to build different projects (e.g. Note: It is possible to install multiple versions of Go on your machine. If we’ve never used the go command before, it’s possible that you don’t have Go installed on our machine yet.įortunately, the Go developer documentation has a great installation guide. This means that you need to compile your code before you can run it. Like many other languages, Go is a compiled language. Got that configured? Great! Let’s get started! Setting up Go on your machine I personally use Ubuntu 20.04, but you can use any of the distributions that are available.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |