In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "how to turn on wireless hotspots on the computer of Ubuntu system". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Create hotspots by using the network features of the system
Please note: you must have a wireless card that can be used to create AP hotspots. If you don't know how to confirm it, type iw list in the Terminal.
If you don't have iw installed, you can use sudo apt-get install iw to install it under Ubuntu.
After you type iw list, look at the "supported interface modes" and you should see AP in an entry similar to the following:
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
Let's take a look at it step by step:
1. Disconnect the WIFI. Use a wired network to access your laptop.
2. Click the network icon-> Edit Connections (Edit connection)-> click the Add button in the pop-up window in the top panel.
3. Select Wi-Fi from the drop-down menu.
4. Next:
Enter a link name such as: Hotspot 1
B. Enter a SSID such as Hotspot 1
C. Select mode (mode): Infrastructure (infrastructure)
D, device MAC address: select your wireless device from the drop-down menu
5. Go to the Wi-Fi Security tab, select WPA & WPA2 Personal and enter the password.
6. Go to the IPv4 Settings tab, in the Method (method) drop-down menu, select Shared to other computers (share to other computers).
7. Go to the IPv6 tab, set ignore to be ignored in Method (method) (only if you don't use IPv6) 8, and click the Save button to save the configuration.
9. Open Terminal from menu/dash.
10. Modify the connection you just created using network settings.
Use the Gedit editor:
The code is as follows:
Gksu gedit / etc/NetworkManager/system-connections/Hotspot
Replace the name Hotspot with the connection name you gave in step 4.
A. Change mode=infrastructure to mode=ap and save the file.
Once you have saved this file, you should be able to see the AP you just created in the Wifi menu. (if not, please turn off / turn on the Wifi option in the top bar again)
You can connect your equipment to Wifi now. Has passed the millet 4 test of Android 5.0. (downloaded 1GB files to test speed and stability)
Create hotspots with hostapd
1: install hotspot generation tool, hostapd
The code is as follows:
Sudo apt-get install hostapd
2: installing a dhcp,DHCP server can be used to dynamically allocate IP, and it can also be used in conjunction with a TFTP server to install a network installation server to install clients that support PXE.
The code is as follows:
Sudo apt-get install dhcp3-server
3: create a new hostapd.conf file, which is very important and contains the encryption method and access password for the hotspots we generate.
The code is as follows:
Sudo nano / etc/hostapd.conf
The contents are as follows:
The code is as follows:
Interface=wlan0
Driver=nl80211
Ssid=XXXXXX # xxxx is the name of the wireless network you see when you access it on your mobile phone
Hw_mode=g
Channel=10
Macaddr_acl=0
Auth_algs=3
Wpa=2
Wpa_passphrase=XXXXXX # xxxx is the password you need to enter when you access it on your mobile phone. Set your own password
Wpa_key_mgmt=WPA-PSK
Wpa_pairwise=TKIPCCMP
Rsn_pairwise=TKIPCCMP
4: configure dhcp (this step is very important, there is no such step before, so when the phone is connected to a hot spot, it is always the process of obtaining the ip address)
The code is as follows:
Sudo nano / etc/dhcp/dhcpd.conf
Add the following at the end of the file:
The code is as follows:
Subnet 192.168.0.0 netmask 255.255.255.0
{
Range 192.168.0.2 192.168.0.10
Option routers 192.168.0.1
Option domain-name-servers 8.8.8.8; # this place 8.8.8.8 fill in the ip of the domain name resolution server, Hubei can fill in this: 202.114.0.242
}
5: the last step, write a script, put it in your home directory (or where you think it is convenient), and easily open the hotspot
The code is as follows:
Nano ap.sh
The contents are as follows:
The code is as follows:
#! / bin/bash
# this is ap create script
Sudo ifconfig wlan0 192.168.0.1 netmask 255.255.255.0
Sudo dhcpd wlan0-pf / var/run/dhcp-server/dhcpd.pid
Sudo bash-c "echo 1 > / pro/sys/net/ipv4/ip_forward"
Sudo iptables-t nat-A POSTROUTING-o eth0-j MASQUERADE
Sudo hostapd / etc/hostapd.conf &
After saving the ap.sh script, change it to executable permissions:
The code is as follows:
Sudo chmod 776 ap.sh
After the above work is done, you can enjoy the results. In the directory where the ap.sh script is located, enter the command:
The code is as follows:
Sudo. / ap.sh
This is the end of the content of "how to turn on Wireless hotspots on computers in Ubuntu system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.