# sudo vim /etc/profile.d/go export GOROOT=/home/evescn/go export PATH=$PATH:$GOROOT/bin export GOPATH=/home/evescn/Applications/Go # source /etc/profile.d/go
# sudo apt-get install bison ed gawk gcc libc6-dev make
# tar -zxvf go1.4.linux-amd64.tar.gz # mv go /home/evescn/go1.4
# cd go1.4/src/ # sudo CGO_ENABLED=0 # ./make.bash
# tar -zxvf go1.10.linux-amd64.tar.gz # mv go /home/evescn # cd /home/evescn/go/src # ./all.bash
# vim hello.go package main func main() { println("Hello", "world") } # go run hello.go
go編譯go代碼:linux
# go build test.go # 輸入可執行文件test # ./test 運行go代碼
# go build -o evescn test.go
# chmod 777 程序名稱
# nohup ./程序名 &
# nohup ./程序名 >/dev/null 2>&1 &
# ps aux | grep '程序名' # kill '進程ID'