Mac 制作 树莓派4B+系统 安装ubuntu系统

2020-09-25  本文已影响0人  Morgan7

安装版本

安装ubuntu系统

*官方烧录教程 https://ubuntu.com/tutorials/create-an-ubuntu-image-for-a-raspberry-pi-on-macos#2-on-your-macos-machine

查看地址

diskutil list

格式化u盘

diskutil partitionDisk <地址> MBR FAT32 UNTITLED 0b

卸载

diskutil unmountDisk <地址>

烧录

sudo dd bs=4m if=<镜像地址> of=<地址>

# 等待几分钟

启动ssh

连接ssh

ssh ubuntu@ip

设置root密码

sudo passwd root

切换root

su root

修改源

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

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

更新

sudo apt-get update
sudo apt-get upgraded

Java环境

root@ubuntu:/# java

Command 'java' not found, but can be installed with:

apt install openjdk-11-jre-headless  # version 11.0.8+10-0ubuntu1~20.04, or
apt install default-jre              # version 2:1.11-72
apt install openjdk-8-jre-headless   # version 8u265-b01-0ubuntu2~20.04
apt install openjdk-13-jre-headless  # version 13.0.3+3-1ubuntu2
apt install openjdk-14-jre-headless  # version 14.0.1+7-1ubuntu1


Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libfreetype6 : Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

安装防火墙

sudo apt-get install ufw
上一篇下一篇

猜你喜欢

热点阅读