我正在尝试使 dnsmasq 与 NetworkManager 一起使用来在 Archlinux 上创建一个临时连接,并且之后可能还有其他事情要做......
有方法:(https://wiki.archlinux.org/index.php/Dnsmasq和https://bbs.archlinux.org/viewtopic.php?id=6431)
pacman -S dnsmasq
mkdir /etc/dnsmasq
mv /etc/resolv.conf /etc/dnsmasq
cd /etc
echo nameserver 127.0.0.1 > resolv.conf
mv rc.conf rc.conf.save
sed '/DAEMON/s/network/network dnsmasq.local/g' rc.conf.save>rc.conf
cd rc.d
sed '/-z/s/dnsmasq/dnsmasq -r /etc/dnsmasq/resolv.conf /g' dnsmasq>dnsmasq.local
/etc/rc.d/dnsmasq.local start
/etc/rc.d/network restart
我遇到了一个问题:
sed '/-z/s/dnsmasq/dnsmasq -r /etc/dnsmasq/resolv.conf /g' dnsmasq>dnsmasq.local
在简历中它说.../s/...不是一个已知选项...