@bergus
2016-05-16T00:14:42.000000Z
字数 3322
阅读 1422
ubuntu
最佳操作
用linux随时可能会有宕机的危险,谁知道我哪会神经病犯了呢。用deepin宕机的可能性会更高的,所以我才不得不安装一个windows做备份,然后把数据备份到windows上面
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bk
deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
sudo cat ./tools/ali.list >> /etc/apt/source.list
sudo apt-get install aptitude
sudo aptitude update && sudo aptitude upgrade
sudo aptitude install aptitude
sudo aptitude install git openssh openssh-server
sudo aptitude install openjdk-8-jdk
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
exec $SHELL -l
pyenv install anaconda2-2.4.1
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper
pyenv virtualenvwrapper
export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true"
sudo aptitude install golang
#配置环境
export GOROOT=/usr/lib/go
export GOARCH=amd64
export GOOS=linux
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
mkdir -p ~/go/{bin,pkg,src}
sudo aptitude install apt-transport-https
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo aptitude update
sudo aptitude install lxc-docker
sudo usermod -aG docker ubuntu
sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart
#需要注销或者重启一下电脑
#然后查看一下服务是否开启
ps -ef | grep docker
curl -L https://github.com/docker/machine/releases/download/v0.5.3/docker-machine_linux-amd64 >/usr/local/bin/docker-machine && \
chmod +x /usr/local/bin/docker-machine
curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
pip install docker-compose
curl -L https://github.com/docker/compose/releases/download/1.5.2/run.sh > /usr/local/bin/docker-compose
docker login index.tenxcloud.com
docker pull
#安装
sudo aptitude install xclip
alias tclip='xclip -selection clipboard'
alias fclip='xclip -selection c -o'
#复制到剪贴板
ctrl+c
or
ls | tclip
or
tclip < file.txt
#复制到其他地方
ctrl+v
or
tclip
or
tclip | wc
or
tclip > file.txt
#然后保存到.bashrc
#deepin安装sublime
sudo apt-get install sublime-text
sudo cp /usr/bin/sublime-text /usr/bin/subl
import urllib2,os;pf='Package Control.sublime-package';ipp=sublime.installed_packages_path();os.makedirs(ipp) if not os.path.exists(ipp) else None;open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read())