香橙派zero折腾记录

查看版本

sudo lsb_release -a

输出

打开清华大学的ubuntu源站

https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/

源地址如下

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

从xshell中输入

sudo vim /etc/apt/sources.list

将源换成上面的

设置静态IP地址

先更新一下软件源

分别输入

sudo apt-get update

sudo apt-get upgrade

下载netplan

sudo apt install netplan.io

运行

netplan generate

转到这个目录下

cd /etc/netplan

创建并编辑文件

vim 50-init.yaml

输入以下内容

network:
     version: 2
     ethernets:
         eth0:
             dhcp4: no
             dhcp6: no
             addresses: [192.168.1.254/24]
             gateway4: 192.168.1.1
             nameservers:
                     addresses: [114.114.114.114, 8.8.8.8]

应用配置

netplan apply

注意,应用成功之后xshell会失去连接

安装docker

安装命令如下:

curl -sSL https://get.daocloud.io/docker | sh

常见命令

查看镜像:docker images

 

 

THE END
分享
二维码
海报
香橙派zero折腾记录
查看版本 sudo lsb_release -a 输出 打开清华大学的ubuntu源站 https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/ 源地址如下 # 默认注释了源码镜像以提高 a……