Linux config for Ubuntu14.04+

Linux config Documentation

1. git

git install

sudo apt-get install git

git config

git config --global user.email email
git config --global user.name nickname
git config -l

Generating public/private rsa key pair

ssh-keygen -t rsa -b 4096 -C "youremail@xx.xx"

2. terminal config

linux.config

cd linux.config
cp .inputrc ~/.inputrc

shouldn`t use the cp .inputrc /etc/inputrc

3. vim plugin & sources

vim plugin

sudo wget -qO- https://raw.github.com/ma6174/vim/master/setup.sh | sh -x

sources.list

cd linux.config
sudo cp sources.list /etc/apt/
sudo apt-get update

add pypi source for China

sudo mkdir ~/.pip 
sudo touch ~/.pip/pip.conf

and append the follow lines to pip.conf

[global]
index-url = http://pypi.douban.com/simple
index-url = http://mirrors.aliyun.com/pypi/simple

4. terminator(multiple windows)

sudo apt-get install terminator

5. go

go1.7 for linux

go doc

sudo tar -C /usr/local -xzf go1.7.1.linux-amd64.tar.gz 

add following lines to /etc/profile

export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export PATH=$GOROOT/bin:$PATH
export GOPATH=$HOME/dev/work

show go enviroment

go env

go1.7 for win x64

install location #  D:\Go

win10 win+x->path config:

config path:
GOROOT=D:\Go
GOPATH=E:\workspace\go
GOBIN=%GOROOT%\bin
PATH=%GOROOT%;%PATH%

hello.go

package main

import "fmt"

func main(){
        fmt.Printf("hello, world\n")

}

build and run

go build hello.go
#linux
./hello
#or windows
hello.exe
#
go run hello.go
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值