You can use the Linux desktop to wirelessly share a wired Internet connection by creating a Wi-Fi hotspot. This way, your computer can work like a wireless router, allowing other devices to connect to the Internet through its Wi-Fi.
Please note that using these instructions, you will not be able to use the same wireless network to connect to the Internet and create hotspots. You need to establish a wired Internet connection and unused Wi-Fi on the same computer.
This article describes how to create a Wi-Fi hotspot on the Ubuntu 18.04 Gnome desktop, and how to edit its settings (change password, SSID, etc.), which is hidden in settings and menus. By default, the hotspot uses infrastructure mode (Wi-Fi mode will be set to “hotspot”), which allows sharing of Internet connection with Android devices.
How to create a Wi-Fi hotspot in Ubuntu 18.04 using Gnome desktop
1. To create a Wi-Fi hotspot, the first thing you need to do is turn on Wi-Fi (if it is not already enabled):
By going to the “System” menu and selecting
Wi-Fi Off > Turn On.2. Next, choose
Wi-Fi Settings From the system’s Wi-Fi menu:3. In the “Wi-Fi Settings” window, click the Gnome menu icon in the upper right corner of the window, and then select
Turn On Wi-Fi Hotspot:
The new Wi-Fi hotspot will use the AP (Infrastructure) mode by default in Ubuntu 18.04, the network SSID and password, and the security type (WPA / WPA2 is used by default in Ubuntu 18.04) will be displayed on the next screen-after enabling Wi-Fi- Immediately after Fi hotspot:
If you are satisfied with the default settings and do not want to change anything, then all you have to do is create a Wi-Fi hotspot in Ubuntu 18.04.
However, you cannot at least find any options in this settings pane to change these default values. If you want to change some hotspot settings (such as network SSID and password), you can do it in two ways, which will be explained below.
How to change Wi-Fi hotspot settings in Ubuntu 18.04 (Gnome desktop)
Option 1: Edit the hotspot configuration file.
After creating the hotspot for the first time, it is named
Hotspot Built in
/etc/NetworkManager/system-connections, Which contains some settings. Therefore, please make sure to create a hotspot first, otherwise the file will not exist! You can then use a text editor (such as Nano) to edit the configuration file as follows:
sudo nano /etc/NetworkManager/system-connections/Hotspot
In this file, you can configure the network SSID (displayed as
[wifi]), Password (Wi-Fi password is
[wifi-security]) And other settings.
After changing the Hotspot file, save it (to save the file in the Nano command line text editor, press
Ctrl + O, Then
Enter, Then use exit
Ctrl + X).
After changing the hotspot configuration file, you need to restart Network Manager:
sudo systemctl restart NetworkManager
This tool allows you to modify the Wi-Fi mode and frequency band of the hotspot (if available, please choose between 2.4 Ghz and 5 Ghz). You can press
Alt + F2 Or open a terminal and enter:
If you use nm-connection-editor to change the hotspot password in Ubuntu 18.04, and use the default WPA and WPA2 Personal security, the device may not be able to connect to your hotspot, thereby showing authentication / wrong password errors. At least in my case, this is how it works, using Ubuntu 18.04 to create a hotspot, and using an Android phone to connect to the hotspot.
I am not sure why this happens when using the NM Connection Editor, but if you manually edit the hotspot configuration, this problem will not occur. This is why I do not recommend using NM Connection Editor to change the WPA / WPA2 hotspot password. Instead, do this from the command line (option 1, will not cause any problems).
Make any changes after use
nm-connection-editor, You need to restart Network Manager:
sudo systemctl restart NetworkManager
It ’s important to note that in both cases, to ensure that all settings are retained, just select
Turn On Wi-Fi Hotspot... Select once from the Wi-Fi system settings. To use
Connect to Hidden Network... Option for subsequent use, then select the name
Hotspot then click
In this way, you can use a custom Wi-Fi SSID, as shown in the screenshot. Selecting
Turn On Wi-Fi Hotspot... Each time the hotspot SSID is set to the host name, and other settings may be reset.