Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 set my wireless card to adhoc mode after the system starts. I have created a shell script following this guide:

If I execute the script manually, everything works fine. However if I add it to the init.d as described here:

or if I set it as a cron job triggered at "@reboot", the wireless interface doesn't seem to start.

I'm guessing that I can configure the card to start directly into the adhoc mode with /etc/network but I don't really know how.

Can anybody point me in the right direction?

share|improve this question

From here you add wireless-mode ad-hoc to your interface definition

auto wlan0
iface wlan0 inet static
    wireless-channel 1
    wireless-essid MYNETWORK
    wireless-mode ad-hoc
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.