软件:linux

这是本文档旧的修订版!


Linux

访问Debian官网https://www.debian.org/ 下载https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-13.1.0-amd64-netinst.iso

安装向导 Graphical install

语言环境 Chinese(Simplified)中文(简体)

地区位置 中国

配置键盘 汉语

配置网络 主机名 host 域名 空

设置用户名密码 root 和 user

磁盘分区 向导-使用整个磁盘>将所用文件放在同一分区中>完成分区操作并将修改写入磁盘>是

配置软件包管理器 扫描额外的安装介质-否 > 手动输入 > 仓库镜像站点主机名mirrors.tuna.tsinghua.edu.cn 目录/debian/ 代理 空

是否参与流行度调查 否

软件选择 SSH server 标准系统工具

GRUB启动引导器 是

/dev/sda

在终端执行命令

#查看网卡,记录eth*网卡

ip addr

#配置网络

vi /etc/network/interfaces

修改interfaces文件内容,设置自动获取IP

source /etc/network/interfaces.d/*

auto lo

iface lo inet loopback

# The primary network interface

allow-hotplug ens33

iface ens33 inet dhcp

按`esc`键,输入`:wq`退出

查看IP地址

ip addr

查看DNS

cat /etc/resolv.conf

中文

locale

su -

dpkg-reconfigure locales

按空格选择

[*]zh_CN.utf-8 utf-8

tab切换ok

zh_CN.utf-8

cat /root/.profile

注释

LANG=C

LANGUAGE=C

使用sudo权限时,系统提示“sudo系统提示user 不是 sudoers 文件。”,可以按照以下方法解决

先登入root权限用户,并切换root权限环境

su -

安装软件包

apt update

apt install sudo

查看user是否设置权限

cat /etc/sudoers

修改

vi /etc/sudoers

user ALL=(ALL:ALL) ALL

:wq!

查看是否添加成功

cat /etc/sudoers

镜像站点

在终端输入

vi /etc/apt/sources.list

添加镜像源,完成后执行更新

apt update

apt upgrade

deb https://mirrors.aliyun.com/debian/ trixie main non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie main non-free non-free-firmware
deb https://mirrors.aliyun.com/debian-security/ trixie-security main
deb-src https://mirrors.aliyun.com/debian-security/ trixie-security main
deb https://mirrors.aliyun.com/debian/ trixie-updates main non-free non-free-firmware
deb-src https://mirrors.aliyun.com/debian/ trixie-updates main non-free non-free-firmware
#deb https://mirrors.aliyun.com/debian/ trixie-backports main non-free
deb https://mirrors.huaweicloud.com/debian/ bookworm main non-free-firmware
deb https://mirrors.huaweicloud.com/debian-security/ bookworm main non-free-firmware

apt-get install apt-transport-https ca-certificates
apt-get update
deb http://mirrors.ivolces.com/debian/ bookworm main non-free non-free-firmware contrib
#deb-src http://mirrors.ivolces.com/debian/ bookworm main non-free non-free-firmware contrib
deb http://mirrors.ivolces.com/debian-security/ bookworm-security main
#deb-src http://mirrors.ivolces.com/debian-security/ bookworm-security main
deb http://mirrors.ivolces.com/debian/ bookworm-updates main non-free non-free-firmware contrib
#deb-src http://mirrors.ivolces.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb http://mirrors.ivolces.com/debian/ bookworm-backports main non-free non-free-firmware contrib
#deb-src http://mirrors.ivolces.com/debian/ bookworm-backports main non-free non-free-firmware contrib

访问https://mirror.tuna.tsinghua.edu.cn/help/debian/

apt install apt-transport-https ca-certificates
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ trixie-backports main contrib non-free non-free-firmware

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.hust.edu.cn/debian bookworm main contrib non-free non-free-firmware

# deb-src https://mirrors.hust.edu.cn/debian bookworm main contrib non-free non-free-firmware

deb https://mirrors.hust.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

# deb-src https://mirrors.hust.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.hust.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware

# deb-src https://mirrors.hust.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

# deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

# 默认注释了源码仓库,如有需要可自行取消注释

deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware

# deb-src http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware

deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

# deb-src http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

# backports 软件源,请按需启用

# deb http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware

# deb-src http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware

打印机

安装cups打印机服务

sudo apt-get install cups cups-client

访问 http://localhost:631/

sudo apt update

访问https://packages.debian.org/bookworm/amd64/libcupsimage2/download下载

sudo apt --fix-broken install

sudo dpkg -i libcupsimage2_2.4.2-3+deb12u8_amd64.deb

apt install libcupsimage2

应用商店

访问 https://www.spark-app.store/\

cd ~/Downloads
sudo apt install ./spark-store-\*.deb

下载

Extension Manager中下载Dash to Dock

访问https://linyaps.org.cn/

echo "deb [trusted=yes] https://ci.deepin.com/repo/obs/linglong:/CI:/release/Debian_12/ ./" | sudo tee /etc/apt/sources.list.d/linglong.list 
 
sudo apt update 
 
sudo apt install linglong-builder linglong-box linglong-bin 

Wine

安装依赖
sudo dpkg --add-architecture i386
sudo apt-get update

sudo apt update
sudo apt install wine32:i386

sudo apt wine

sudo apt install winetricks
winetricks vcrun2022 # 安装 Visual C++ 运行库
winetricks allfonts corefonts cjkfonts # 安装常用字体,包括中文字体
winetricks d3dx9 d3dx10 # 安装 DirectX 提升兼容性和游戏性能
winetricks riched20 riched30 #渲染奇葩问题

浏览器

sudo apt install fonts-liberation
sudo dpkg -i microsoft-edge-stable_138.0.3351.65-1_amd64.deb

远程控制

向日葵

sudo apt-get install lightdm


sudo mkdir /media/usb0

sudo mount -o rw /dev/sdd

维护

备份

tar -czvf www_backup_$(date +%F).tar.gz -C /var www/

  • 软件/linux.1761046351.txt.gz
  • 最后更改: 2025/10/21 19:32
  • admin