学习Linux这么久做的一些笔记


首先是软路由用的 【Proxmox Virtual Environment】系统,简称【PVE】

官网在这 https://www.proxmox.com/en/

下载地址1 https://www.proxmox.com/en/downloads/item/proxmox-ve-7-2-iso-installer

下载地址2 https://www.proxmox.com/en/downloads/item/proxmox-ve-7-2-iso-installer-bittorrent

balenaEtcher工具 https://www.balena.io/etcher/

清华大学镜像站 https://mirrors.tuna.tsinghua.edu.cn/

Ubuntu官网 https://ubuntu.com/

xuubuntu系统官网 基于ubuntu Xfce界面 https://xubuntu.org/


关于PVE、Linux我曾经做了很多视频

教你如何在「Proxmox VE」中安装「Ubuntu」系统 | 软路由PVE

「PVE」教大家如何在Proxmox VE中安装Win10&驱动| 2021最新教程

2021年最新《RUST》开服教程 - LinuxGSM & Oxide

「进阶」如何在Proxmox VE中安装OpenWrt 网卡直通


#编辑源列表(个人比较喜欢用nano)

#如果没有装nano,可以sudo apt install nano来安装

nano /etc/apt/sources.list

#PVE的源列表添加下面这一行,注意buster,那是那个时候的debian版本代号,现在是bullseye

deb http://download.proxmox.com/debian buster pve-no-subscription

#PVE企业源

nano /etc/apt/sources.list.d/pve-enterprise.list

注释掉那一行 #deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise

#配置网卡直通选项(记得主板BIOS开启虚拟化技术 intel virtualization technology)

nano /etc/default/grub

在quiet后面输入 intel_iommu=on

#编辑模块

nano /etc/modules

#打开后输入

vfio

vfio_iommu_type1

vfio_pci

vfio_virqfd

保存之后 reboot 重启

#chrome浏览器进入PVE后台,就比如

https://10.0.0.2:8006

#新建opernwrt虚拟机

qm importdisk 100 /var/lib/vz/template/iso/OpenWrt.img local-lvm

#初始化openwrt网络设置

vi etc/config/network

#insert键进入编辑模式

#esc键退出编辑模式 输入:wq退出

关于linux的学习教程(学习Linux的笔记非教程)(1)

#备份软件源

cp /etc/apt/sources.list /etc/apt/sources/list.bak

#最新的ubuntu 22.04 LTS清华大学软件源

# 默认注释了源码镜像以提高 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

#修改root密码

sudo passwd root

#更新源列表

sudo apt-get update

sudo apt-get upgrade

一些必装的例如 vim dpkg vim docker


#安装中文语言包

sudo apt install LANGuage-pack-zh-hant language-pack-zh-hans language-pack-zh-hant-base language-pack-zh-hans-base

#安装docker

apt-get install docker-ce=5:20.10.16~3-0~ubuntu-jammy docker-ce-cli=5:20.10.16~3-0~ubuntu-jammy containerd.io docker-compose-plugin

#kubuntu依赖

sudo add-apt-repository ppa:kubuntu-ppa/backports

#安装kubuntu

sudo apt install kubuntu-desktop

#卸载kubuntu

sudo apt install ppa-purge

sudo ppa-purge ppa:kubuntu-ppa/backports

sudo apt update

#ubuntu 设定中文语言环境

sudo apt-get install language-pack-zh-han*

sudo apt install $(check-language-support)

#修改配置文件

vim /etc/default/locale

LANG="zh_CN.UTF-8"

LANGUAGE="zh_CN:zh"

LC_NUMERIC="zh_CN"

LC_TIME="zh_CN"

LC_MONETARY="zh_CN"

LC_PAPER="zh_CN"

LC_NAME="zh_CN"

LC_ADDRESS="zh_CN"

LC_TELEPHONE="zh_CN"

LC_MEASUREMENT="zh_CN"

LC_IDENTIFICATION="zh_CN"

LC_ALL="zh_CN.UTF-8"

#修改环境

vim /etc/environment

LANG="zh_CN.UTF-8"

LANGUAGE="zh_CN:zh"

LC_NUMERIC="zh_CN"

LC_TIME="zh_CN"

LC_MONETARY="zh_CN"

LC_PAPER="zh_CN"

LC_NAME="zh_CN"

LC_ADDRESS="zh_CN"

LC_TELEPHONE="zh_CN"

LC_MEASUREMENT="zh_CN"

LC_IDENTIFICATION="zh_CN"

LC_ALL="zh_CN.UTF-8"

#还有

vim ~/.bashrc

LANG="zh_CN.utf8"

#别忘了安装

nano vim net-tools

#配置networkd

systemctl --version

sudo systemctl disable NetworkManager

sudo systemctl enable systemd-networkd

sudo systemctl enable systemd-resolved

sudo systemctl start systemd-resolved

sudo rm /etc/resolv.conf

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

sudo mkdir /etc/systemd/network

sudo vi /etc/systemd/network/10-static-ens18.network

[Match]

Name=ens18

[Network]

Address=10.0.0.9/24

Gateway=10.0.0.1

DNS=8.8.8.8

sudo systemctl restart systemd-networkd

systemctl status systemd-networkd

systemctl status systemd-resolved

,