Debian 12 操作命令集合

查看ip地址

ip addr

 

固定ip地址

编辑/etc/network/interfaces网络配置文件

iface ens33 inet static
address 192.168.168.88
netmask 255.255.255.0
gateway 192.168.168.2

 

固定DNS地址

编辑/etc/resolv.conf解析配置文件

nameserver 8.8.8.8
nameserver 114.114.114.114

 

重启服务器

systemctl reboot

 

更改国内软件源

新建文件:/etc/apt/sources.list.d/debian.sources

填入下面数据

Types: deb
URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
Suites: bookworm bookworm-updates bookworm-backports
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://mirrors.tuna.tsinghua.edu.cn/debian
# Suites: bookworm bookworm-updates bookworm-backports
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
Types: deb
URIs: https://security.debian.org/debian-security
Suites: bookworm-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

# Types: deb-src
# URIs: https://security.debian.org/debian-security
# Suites: bookworm-security
# Components: main contrib non-free non-free-firmware
# Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

 

设置root可以使用ssh登陆

打开文件 vim /etc/ssh/sshd_config
把 #PermitRootLogin 一行 改成 PermitRootLogin yes
删掉#PasswordAuthentication yes前面的#
重启服务器

 

创建服务

创建文件 /etc/systemd/system/xxx.service
文件内容模板如下:

[Unit]
Description=FrpC Service
Requires=network.target  
After=network.target

[Service]
Type=simple
ExecStart=/home/soft/Frp/frpc -c /home/soft/Frp/frpcool.ini
Restart=on-failure

Restart=always
RestartSec=120

[Install]
WantedBy=multi-user.target

使用命令启动服务,并设置开机启动:
(1).设置服务可用性,设置完后开机自启动
systemctl enable frpc.service

(2).查看服务是否已启动
systemctl status frpc

(3).如果服务文件经过修改,则需要执行以下命令更新
systemctl daemon-reload

如果您喜欢本站,点击这儿不花一分钱捐赠本站

这些信息可能会帮助到你: 下载帮助 | 报毒说明 | 进站必看

修改版本安卓软件,加群提示为修改者自留,非本站信息,注意鉴别

THE END
分享
二维码
打赏
海报
Debian 12 操作命令集合
查看ip地址 ip addr   固定ip地址 编辑/etc/network/interfaces网络配置文件 iface ens33 inet static address 192.168.168.88 netmask 255.255.255.0 gateway 192.168.168.2   ……
<<上一篇
下一篇>>