Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make dnsmasq work to use it with NetworkManager to create an adhoc connection on Archlinux and there may be other stuff left to do after to make it work ...

There is how : ( and

pacman -S dnsmasq
mkdir /etc/dnsmasq
mv /etc/resolv.conf /etc/dnsmasq
cd /etc
echo nameserver > resolv.conf
mv rc.conf 
sed  '/DAEMON/s/network/network dnsmasq.local/g'>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

I got a problem with :

sed  '/-z/s/dnsmasq/dnsmasq -r /etc/dnsmasq/resolv.conf /g' dnsmasq>dnsmasq.local

In resume it say that's the .../s/... is not a known option ...

share|improve this question
I don't know how that guy in the forums supposes that sed command to work. You have to escape the slashes like this: sed '/-z/s/dnsmasq/dnsmasq -r \/etc\/dnsmasq\/resolv.conf /g' dnsmasq>dnsmasq.local or choose another delimiter in sed like this sed '/-z/s!dnsmasq!dnsmasq -r /etc/dnsmasq/resolv.conf !g' – micke Oct 7 '11 at 22:54
It make dnsmasq work but it's not the stuff I need to do, should be something else ... Wiki pages most peoples tell me to try :… The problem is they uses specific options for hardware mostly ... – zillion Oct 9 '11 at 21:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.