1. 程式人生 > >linux bash配置

linux bash配置

linux bash配置

go

export GOPATH=/opt/gopath
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOROOT/bin:$GOBIN

時鐘

export IP=`/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6 | awk '{print $2}' | tr -d "addr:"|tail -1`
export PS1="\[\e[36;1m\][\[email protected]$IP \W \t]\\$ \e[0m"
export TZ='Asia/Shanghai'

x圖形視窗

export REMOTE_IP=`who am i | awk '{print $5}' | sed 's/(//g' | sed 's/)//g'
export DISPLAY=$REMOTE_IP:0.0

github

export github=$GOPATH/src/github.com
export zht=$GOPATH/src/github.com/ZoneTong

docker

alias dk='docker'
alias dc='docker-compose'
alias docl='docker logs -f --tail=100'
alias doce='docker exec -it'
alias docbin='_a(){ docker exec -it $1 /bin/bash; };_a'
alias docps='docker ps'