# 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'