Deepin系统的安装与使用

Deepin 系统

安装

  1. Ventoy 制作可启动 U 盘
  2. 将 deepin V20.9 的镜像文件 ISO 格式的拷贝到 U 盘根目录下,可以同时拷贝多个系统安装的镜像文件到根目录下。
  3. 设置电脑的开机顺序优先 U 盘启动
  4. 进入安装程序

配置

输入法配置,系统自带的输入法框架已经足够。

  • 只需要将双拼方案选择小鹤双拼,
  • 保留五笔和地球拼音。

更新商店

  • sudo apt-get update

软件的安装与卸载

  • dpkg -l 查看已经安装的软件
  • sudo apt-get autoremove name 卸载命令,name 是耀卸载的软件名称
  • sudo apt-get clean 清理下载文件的存档
  • sudo apt-get autoclean 清理过时的软件包

应用商店安装必要的软件

  • 浏览器 EDGE,登录并同步.卸载系统自带的浏览器 sudo apt purge org.deepin.browser
  • 邮件客户端 Foxmail。下载系统自带的邮箱
  • 微信
  • QQ
  • 喜马拉雅
  • 网易云音乐
  • Vscode 满足编程和 MarkDown

重点讲解python的安装

  • 因为系统中已经包含了python2.7 和 python3.7
  • 如果直接使用系统自带的python3.7,需要设置两个的优先级别
    1
    2
    3
    4
    5
    # 分别设置级别伟1和2,数字越大代表优先级越高
    sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

    sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2

  • 安装pip `sudo apt install python3-pip
  • 更新pip sudo pip3 install --upgrade pip
  • 设置pip软件源 `pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
  • 安装包:pip3 install 包名称
  • 查看已经安装的包 pip3 list
  • 查看可以更新的包pip3 install --upgrade 包名称
  • 安装指定版本 pip install --upgrade 包名称==版本号

deepin 系统下wireguard Vpn的配置

  1. 安装 wireguard-tools
  • 下载 https://storage.deepin.org/thread/202209290945162120_wireguard-tools_1.0.20210914+r466+g7f3cd52-1_amd64.zip
  • 解压缩
  • 直接双击安装 deb 包
  1. 配置

    • 更改文件夹的权限伟可读写。chmod -R 777 ./etc/wireguard
    • 创建并编辑配置文件
    • sudo deepin-editor /etc/wireguard/wg0.conf
    • sudo gedit /etc/wireguard/wg0.conf
    • 添加配置文件内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
# 第1,2,4,7,8行的内容是固定的。其中第4行时自己注册的Vpn的密钥
# 其他行的参数内容来自VPN节点数据。此处是从注册网站下载的数据
# `https://my.shark-china.com/******`
[Interface]
ListenPort = 49815
Address = 10.14.0.2/16
PrivateKey = mKTo/XWQemHxEDJxfDaNvcFwB4R42WQDtV7ZURUitWg=
DNS = 162.252.172.57, 149.154.159.92
[Peer]
PersistentKeepalive = 25
PublicKey = iBJRXLZwXuWWrOZE1ZrAXEKMgV/z0WjG0Tks5rnWLBI=
AllowedIPs = 0.0.0.0/0
Endpoint = 23.230.212.223:51820
  1. 命令行启动运行

    • 打开代理 sudo wg-quick up wg0
    • 关闭代理 sudo wg-quick down wg0
  2. 自动从下载的配置文件添加到虚拟网卡配置信息中

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# *_2023-12-03_*
# *_python3.7_*

import os,re,stat

filename = input('输入下载的配置文件名')
filename =filename + '.conf'
downfold = '/home/xiaoyx/Downloads'
downfile = os.path.join(downfold,filename)
dct = {}
with open(downfile, 'r', encoding='utf-8') as file:
rows = file.readlines()
for row in rows:
if '=' in row:
ls = row.split(' = ',1)
dct.update({ls[0]:re.sub('\n','',ls[1])})
rows1 = ['[Interface]\n','ListenPort = 49852\n']
rows2 = ['[Peer]\n','PersistentKeepalive = 25\n']
wd1 = '<insert_your_private_key_here>'
wd2 = 'mKTo/XWQemHxEDJxfDaNvcFwB4R42WQDtV7ZURUitWg='
for k,v in dct.items():
str = k + ' = ' + v + '\n'
if k in ['Address', 'PrivateKey','DNS']:
str = re.sub(wd1,wd2,str)
rows1.append(str)
else:
rows2.append(str)
rows = rows1 + rows2
with open('/etc/wireguard/wg0.conf','w',encoding='utf-8') as f:
f.writelines(rows)