Ubuntu 20.04 LTS
配置IP地址
位置 /etc/netplan/*.yaml
1 | network: |
配置生效
1 | netplan apply |
查看DNS
1 | systemd-resolve --status|grep 'DNS Servers' |
安装
修改 清华 apt 源
SSH
1 | apt install -y openssh-server |
常用工具
1 | apt install -y vim lrzsz git |
Android Studio
1 | snap install android-studio --classic |
安装 Docker
如果你过去安装过 docker,先删掉
1 | apt remove docker docker-engine docker.io |
安装依赖
1 | apt install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common |
信任 Docker 的 GPG 公钥
1 | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
添加软件仓库
1 | add-apt-repository "deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu $(lsb_release -cs) stable" |
安装
1 | apt update |
开机自启动
1 | systemctl enable docker.service |
安装 docker-compose
VNC Server
1 | apt install tigervnc-standalone-server |
1 | vncserver -localhost no |
安装 Vagrant
https://www.myfreax.com/how-to-install-vagrant-on-ubuntu-18-04/
1 | apt install -y virtualbox vagrant |
使用 libvirt 可以把 virtualbox 替换为:
apt install -y qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virt-manager
https://bugs.launchpad.net/ubuntu/+source/vagrant-libvirt/+bug/1771430
Virtualbox 扩展:https://download.virtualbox.org/virtualbox/6.1.10/Oracle_VM_VirtualBox_Extension_Pack-6.1.10.vbox-extpack
VBoxManage extpack install ./Oracle_VM_VirtualBox_Extension_Pack-6.1.10.vbox-extpack
1 | apt -y install virtualbox virtualbox-ext-pack vagrant |