关于ubuntu:ubuntu-2204配置

41次阅读

共计 1401 个字符,预计需要花费 4 分钟才能阅读完成。

装置 vim

sudo apt-get install vim

更换国内源

用下列内容替换 /etc/apt/sources.list 中原有内容:

# 默认正文了源码镜像以进步 apt update 速度,如有须要可自行勾销正文
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse

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

顺次执行下列命令

sudo apt-get update
sudo apt-get upgrade

装置 build-essential

sudo apt install build-essential

开启 openssh-server

装置 openssh-server

sudo apt install openssh-server -y

启用 openssh-server

sudo systemctl enable –now ssh

查看 openssh-server 运行状态

sudo systemctl status ssh

配置 UFW 防火墙(默认不开启)

启用 22 端口
sudo ufw allow 22/tcp

装置 emacs

sudo apt install emacs

装置 cmake

sudo apt install cmake

装置 git

sudo apt install git

正文完
 0