Skip to content

Instantly share code, notes, and snippets.

@stakemepro
Last active September 17, 2023 22:11
Show Gist options
  • Save stakemepro/de050a1108dc2c1b86a0f6fd8c0a7442 to your computer and use it in GitHub Desktop.
Save stakemepro/de050a1108dc2c1b86a0f6fd8c0a7442 to your computer and use it in GitHub Desktop.
Script installed go
#!/bin/bash
if [ ! -f "/usr/local/go/bin/go" ]; then
version="1.19.1"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version > /dev/null
fi
source $HOME/.bash_profile
@Julybui199x
Copy link

Login

@Julybui199x
Copy link

#login

@Julybui199x
Copy link

bash_profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment