[1]
systemctl enable --now rc-local
查看状态
systemctl status rc-local.service
nano /etc/rc.local
[2]添加以下内容,exit 0 在末尾,表示退出。
cd /root/proxy
./proxy @configfile.txt
exit 0
[3]
chmod +x /etc/rc.local
[1]
systemctl enable --now rc-local
查看状态
systemctl status rc-local.service
nano /etc/rc.local
[2]添加以下内容,exit 0 在末尾,表示退出。
cd /root/proxy
./proxy @configfile.txt
exit 0
[3]
chmod +x /etc/rc.local
You must be logged in to post a comment.
设置写保护锁定 resolv.conf 文件
此时 resolv.conf 文件会被锁定, 重启系统后不会被覆盖。
如果想要解锁可以运行:
chattr -i /etc/resolv.conf
cd /etc
rm -rf /etc/resolv.conf
wget https://www.twzo.com/shell/resolv.conf
chattr +i /etc/resolv.conf
cd /etc
rm -rf /etc/resolv.conf
editor /etc/resolv.conf
nameserver 1.1.1.1
nameserver 8.8.8.8
chattr +i /etc/resolv.conf