tricks for installing go a single time on Windows 10 with Bash for Windows

68 views
Skip to first unread message

Pat Farrell

unread,
Dec 5, 2019, 12:53:22 AM12/5/19
to golang-nuts
I've got a new machine. I run Windows 10, but use bash all the time for all my command line stuff, and running vim, etc.
When I did it on the prior machine, it was a fairly large pain to get go to work properly in all the environments, the special go shell, PowerShell, bash, etc.

I'd like to do it directly and cleanly this time.

Any tips and tricks I should know about?

Rodrick Brown

unread,
Dec 5, 2019, 12:27:20 PM12/5/19
to Pat Farrell, golang-nuts
The first thing you need to do is to enable Windows Subsystem for Linux feature from PowerShell.
Go to the Start menu and search for PowerShell. Run it as administrator:
Once you have the PowerShell running, use the command below to enable Bash in Windows 10.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
You’ll be asked to confirm your choice. Type Y or press enter:

Step 2: Download a Linux system from the Windows store
Once your system has rebooted, go to the Windows Store and search for “Linux.”
You’ll see the option to install Ubuntu or SUSE. 

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/9c41b516-60a1-44e8-9b90-9cb5f65c8278%40googlegroups.com.

Pat Farrell

unread,
Dec 5, 2019, 7:17:21 PM12/5/19
to golang-nuts

On Thursday, December 5, 2019 at 12:27:20 PM UTC-5, Rodrick Brown wrote:
The first thing

Thanks. But that was not what I was asking for.
I have the shells working. But go's installation has a lot of config stuff that needs to be setup.
I want to have go work the same no matter which shell I am using. Sadly, the shells are separate, so things like logical links, paths, etc have to be redone for each of them. This is clearly an obvious bugfarm as its easy to setup a config say in bash that is different from the cmd.exe or powershell config. 

Bruno Albuquerque

unread,
Dec 5, 2019, 7:22:08 PM12/5/19
to Pat Farrell, golang-nuts
Can you clarify what exactly your problem is? I am asking because the only configuration that should be needed for go is to make sure it is in your system path (which mishandled by the installer). There is nothing else that you *MUST* configure for it to work.

What is the actual problem you are having?


--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages