0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Golang Install on Linux

Last updated at Posted at 2019-02-17

Go 1.11.5

fish

Go Install Linux

mkdir $HOME/go
wget -qO- "https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz" | tar -zx --strip-components=1 -C $HOME/go
mkdir $HOME/go-third-party
set -x GOPATH $HOME/go-third-party
set PATH $HOME/go/bin $PATH
set PATH $GOPATH/bin $PATH

環境変数設定

string trim '
set -x GOPATH $HOME/go-third-party
set PATH $HOME/go/bin $PATH
set PATH $GOPATH/bin $PATH
' >> ~/.config/fish/config.fish

bash

mkdir $HOME/go
wget -qO- "https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz" | tar -zx --strip-components=1 -C $HOME/go
mkdir $HOME/go-third-party
export GOPATH=$HOME/go-third-party
export PATH=$PATH:$HOME/go/bin
export PATH=$PATH:$GOPATH/bin

環境変数設定

vim ~/.bashrc

末尾に記載

export GOPATH=$HOME/go-third-party
export PATH=$PATH:$HOME/go/bin
export PATH=$PATH:$GOPATH/bin

参考URL

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?