4

I am using Ubuntu 20.04 in which I am unable to turn on the hotspot as well as wifi simultaneously.

I want to share the internet which I am using.

I have dual boot with Windows 10 in which I can use wifi and hotspot at the same time.

Thanks in advance.

Zanna
  • 70,465

2 Answers2

6

Install Linux wifi hotspot

sudo add-apt-repository ppa:lakinduakash/lwh
sudo apt update
sudo apt install linux-wifi-hotspot

Then find the wifi hotspot program in your program menu

The create_ap hasn't been maintained since July 2020

Jeremy31
  • 12,602
  • 10
  • 58
  • 114
2

You will need hostapd package and create_ap utility to do this. hostapd (host access point daemon) is a background process that can be used to create authenticated servers and access points.

create_ap is actually a script that offers some useful Wireless features. One of the features is creating a bridged Wi-Fi access point. You can go through its features and commands here

First, install the hostapd package

sudo apt install hostapd
sudo apt update

Now, download the create_ap-master zip file from here

Extract the zip file, open a terminal in that directory (create_ap-master) and then run the following command

sudo make install

You have installed all the necessary tools. Now, you need to find out the Wi-Fi interface name which usually starts with wl. To get get this, simply run

ifconfig

If the above command did not work, install the net-tools package and run the above command again. The ifconfig stands for interface configuration and it gives all the possible interfaces that your network card can establish. You can see the results starting with en (ethernet), lo (loopback) and wl (wifi). Note down the wifi interface name e.g., wlo1

You can use the example commands in the official github page of create_ap that is given in the first link. For creating an ap sharing the same wifi interface, the given example isenter image description here

Note that wlan0 is the wifi interface name. Replace it with the wifi interface name you got from the results of ifconfig command. So, to creat an wifi access point with <hotspot_name> and <pass_word>, run the following command.

sudo create_ap wlan0 wlan0 <hotspot_name> <pass_word>

Don't forget to replace wlan0 with your wifi interface name. Also, choose your desired hotspot name and password. After successfully doing the above steps, you can see your device's wifi and hotspot running simultaneously. It can now share the internet connection through an access point you just created.

  • all goes well but in the end i might have enabled --no-virt option and due to which i am unable to create wifi and hotspot at the same time. I am uploading the output image of the termnal. Please help me to disable --no-virt option. image – Hritik Kumar Mar 21 '21 at 13:36
  • Find out the type of wireless network card your device has by running lspci command. If its an intel card, you have a little bit of chancee to rectify this I think. Intel provides linux supported drivers in its website. But if it is a realtek one, there is a very slim chance. Because I have never seen any linux supported drivers for realtek network cards. – prithividpr Mar 22 '21 at 17:07
  • Network controller: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter – Hritik Kumar Mar 22 '21 at 21:16
  • Can't state how grateful I am for this <3 – Fahad Nadeem Oct 30 '23 at 08:19