How to create an ad-hoc wireless network in Ubuntu

5,269

Install dnsmasq-base. This should take care of your problem.

sudo apt-get update # update the software database

sudo apt-get install dnsmasq-base # install dnsmasq-base

Share:
5,269

Related videos on Youtube

Startec
Author by

Startec

Updated on September 18, 2022

Comments

  • Startec
    Startec over 1 year

    This should be very easy but I am finding it quite hard in Ubuntu.

    I want to create a network so that I can connect other devices to my computer wirelessly. I do not need an internet connection, I just need an ad-hoc network from my Ubuntu computer which is running Gnome.

    These directions are inaccurate, there is no "Use as a..." in step 4.

    These directions imply that I can not change the automatically generated password for the Wi-Fi network. Also, see below, the network disappears after a few minutes.

    The closest I have found is clicking the "hamburger nav" in settings and clicking "Turn On Wi-Fi hotspot" (pictured):

    enter image description here

    This does create an ad-hoc network but:

    • The name of the nework is fixed (can't change it)
    • The password is fixed (can't change it)
    • After about 20 seconds the hotspot menu (pictured below) goes away and I can't connect any devices to it even when it does appear.

    enter image description here

    Why is this so ghetto? I could do this on mac in about 10 seconds. How can I rename the ad-hoc network and how do I make it persist (i.e. not go anywhere)?

    The output of dpkg -l *dnsmasq* is as follows:

    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
    |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name           Version      Architecture Description
    +++-==============-============-============-=================================
    un  dnsmasq        <none>       <none>       (no description available)
    un  dnsmasq-base   <none>       <none>       (no description available)
    
    • Boris Hamanov
      Boris Hamanov about 5 years
      Edit your question and show me dpkg -l *dnsmasq*.
    • Startec
      Startec about 5 years
      @heynnema I updated my question with the output of that command.
    • ThatsRightJack
      ThatsRightJack about 4 years
      Is this a hot spot or ad hoc network?
    • Startec
      Startec about 4 years
      @ThatsRightJack unsure what the difference is.
  • Startec
    Startec about 5 years
    where are these options. I don't see "Edit connections" anywhere under WI-FI tab, not any option for Ad-hoc (see above picture).
  • Startec
    Startec about 5 years
    That fixed it. I still can't set the password or network name (bummer) but now it stays open and I can connect. I have no idea why you knew that would fix it but thank you.
  • Boris Hamanov
    Boris Hamanov about 5 years
    @Startec you're very welcome!
  • LEo
    LEo over 4 years
    I have this package installed, but when I create a Hotspot it does not go visible in any Android device I've tested... Any tip?
  • Boris Hamanov
    Boris Hamanov over 4 years
    @LEo Does it work with non-Android devices? Did you try the next answer?
  • ThatsRightJack
    ThatsRightJack about 4 years
    @heynnema does this solution work for ad hoc or hot spot?
  • ThatsRightJack
    ThatsRightJack about 4 years
    what does "shared with other computers" mean? What kinda network is that?
  • Boris Hamanov
    Boris Hamanov about 4 years
    @ThatsRightJack Try it. It's a quick install, and a quick uninstall if it doesn't solve your problem. Report back.