Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ad-hoc to realize Wifi sharing on Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how to use ad-hoc to achieve Wifi sharing on Linux. Many people may not know much about it. In order to let everyone know more, Xiaobian summarized the following contents for everyone. I hope everyone can gain something according to this article.

Recently in Ubuntu for a long time, also can not find a wireless network card as AP software, tried a lot of methods online are not good, some can be found hot spots, but my Android phone connected to the time can not get the ip address. After studying for a few days, I spent the whole night writing a script and successfully connected it.

Mainly use iwconfig this wireless configuration tool, and then set NAT rules with iptable, use dnsmasq to assign ip addresses.

Full script download address: https://gist.github.com/1117004

Here is how to use the script:

#Add executable permissions first,XXX represents the path of the script

chmod +x /XXX/XXX/adhoc

#Run scripts

sudo /XXX/XXX/adhoc

Stop sharing

sudo /XXX/XXX/adhoc -s

#Restart sharing

sudo /XXX/XXX/adhoc -r

Note:

If your phone or computer can't find your share after running the script, run the Restart Share command

sudo /XXX/XXX/adhoc -r

Yes, several times a day.

Update: According to Aenon's prompt, it is actually easier to use NetworkManager directly,"Create a new wireless network", you can

After reading the above, do you have any further understanding of how to implement Wifi sharing with ad-hoc on Linux? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report