The Linux operating system, in particular the distribution Ubuntu, is deservedly considered one of the most stable and secure solutions for everyday work. However, for many users switching from Windows, the first hurdle is setting up a network connection. Unlike commercial systems, this process may require a deeper understanding of network protocols, although modern graphical environments have significantly simplified this task.
A successful connection to a wireless network depends on many factors: the kernel version, the presence of proprietary drivers, and the router's encryption type. In most cases, NetworkManager Automatically detects available access points and prompts you to enter a password, but sometimes manual configuration is required. Understanding how network interfaces work will allow you to quickly troubleshoot if automatic configuration fails.
In this guide, we'll cover all current internet connection methods, from the standard graphical interface to advanced command-line settings. We'll also explore common errors encountered by beginners and how to effectively resolve them without reinstalling the system.
Graphical interface and basic network setup
Modern versions of the distribution, such as Ubuntu 22.04 LTS or 24.04, use a desktop environment GNOME, which offers an intuitive network management interface. To get started, you need to ensure the Wi-Fi module is activated physically and software-wise. Typically, there's a network icon in the upper right corner of the screen; clicking it opens a list of available connections.
If you see your network in the list, simply select it and enter the security password. The system will automatically apply the settings. WPA2 or WPA3, which are used by your router. If authentication is successful, the icon will change, confirming the connection. However, if the network is hidden, you will need to select "Connect to a hidden network" and manually enter the SSID.
Sometimes automatic obtaining of IP address via protocol DHCP It takes too long or fails. In such situations, it's helpful to know how to restart the network service without rebooting the computer. This often solves the problem of the interface freezing when trying to connect.
Using the Command Prompt for Advanced Users
For system administrators and enthusiasts, the command line provides more flexible connection management tools. The main tool in modern versions is the utility nmcli (Network Manager Command Line Interface). It allows you to manage connections without leaving the terminal, which is especially convenient when working via SSH or on servers without a graphical shell.
To get started, you need to scan available networks. Run the command nmcli dev wifi listto see a list of access points with their signal strength and security type. This will help ensure your wireless adapter is working properly and can see its surroundings.
nmcli dev wifi connect "Network_Name" password "Your_Password"
This command initiates the connection process. If you have multiple profiles installed on your system, nmcli will attempt to use the saved data. If authentication fails, the system will notify you immediately, making it easier to diagnose problems with the password or encryption type.
Nmcli's secrets
The nmcli utility can create QR codes for quickly connecting mobile devices. The nmcli connection show"Name" --show-secrets command will display the saved password in plaintext if you have root privileges.
It is important to note that the changes made through nmcli, are saved permanently. This means that after restarting the computer, the system will automatically attempt to reconnect using the created profile. To delete a profile, use the command nmcli connection delete "Network_Name".
Setting up a static IP address and DNS
Corporate networks or home servers often require a fixed IP address. Dynamic address allocation is convenient for regular users, but is not suitable for devices that require a permanent address. Setting up a static IP in Ubuntu is done through the graphical interface or the terminal.
In the network settings, go to the IPv4 tab and switch the method from "Automatic (DHCP)" to "Manual." Here you will need to enter the IP address, subnet mask, gateway, and DNS servers. A single bit error in the mask can result in complete loss of connection to the local network, so be careful when entering the data.
For terminal lovers, the setup looks like this:
nmcli con mod"Connection_Name" ipv4.addresses 192.168.1.50/24nmcli con mod"Connection_Name" ipv4.gateway 192.168.1.1
nmcli con mod"Connection_Name" ipv4.dns"8.8.8.8 1.1.1.1"
nmcli con mod"Connection_Name" ipv4.method manual
After entering the parameters, you need to reboot the connection with the command nmcli con up"Connection_Name"New settings are applied almost instantly. If the connection fails, check the system logs for address conflicts.
| Parameter | Description | Example of meaning |
|---|---|---|
| IP Address | The unique address of a device on the network | 192.168.1.50 |
| Netmask | Subnet mask, which determines the size of the network | 255.255.255.0 (/24) |
| Gateway | Default gateway address (router) | 192.168.1.1 |
| DNS | Domain name servers | 8.8.8.8, 1.1.1.1 |
Working with wireless adapter drivers
One of the most common reasons for a lack of Wi-Fi in Ubuntu is the lack of suitable drivers. Unlike Windows, where drivers are often built into the installer, in Linux, some proprietary modules must be installed separately. This is especially true for adapters manufactured by Broadcom and some models Realtek.
For diagnostics use the command lspci | grep -i network for internal cards or lsusb For USB dongles. If the device is visible but doesn't work, firmware installation is likely required. Ubuntu provides a convenient "Additional Drivers" tool that will automatically detect and prompt you to install the necessary software.
- 📡 Open the "Programs and Updates" app and go to the "Additional Drivers" tab.
- 💾 Wait while we search for available proprietary drivers for your hardware.
- ✅ Select the recommended driver and click "Apply changes".
- 🔄 After installation, be sure to restart your computer.
☑️ Check Wi-Fi drivers
In some cases, automatic installation doesn't help, and manual compilation of the kernel module from source code is required. This is a complex process that requires installing packages. build-essential And linux-headersAlways check the compatibility of the kernel and driver versions before starting such operations.
⚠️ Warning: Installing drivers from untrusted sources (PPA or third-party websites) may result in system instability or failure to boot after a kernel update. Use only official Ubuntu repositories.
Netplan interface for server versions
In server editions of Ubuntu, starting with version 17.10, the utility responsible for network configuration is NetplanIt uses YAML files to describe network configuration, making the process transparent and easily automated. Configuration files are typically located in the directory /etc/netplan/.
Typical configuration file 01-netcfg.yaml It may look complicated for a beginner, but its structure is logical. Indentation in YAML is critical: a single space error will result in the network not working. Always create a backup copy of the file before editing.
network:version: 2
renderer: networkd
ethernets:
enp3s0:
dhcp4: true
To apply changes, use the command sudo netplan applyIf the configuration contains errors, the system will report them and not apply the changes, which protects against loss of access to the server. To test the configuration without applying it, use the flag --try.
Diagnosing and resolving connection problems
Even with proper configuration, failures can still occur. The first step in diagnostics should always be log analysis. The utility journalctl allows you to track events in real time. Team journalctl -f will start the monitoring mode, then try to connect to the network and look for any error messages that appear.
A common issue is a MAC address conflict or blocking by the router. It's also worth checking the service status. NetworkManager. Team systemctl status NetworkManager This will show whether the service is active and hasn't crashed. Restarting the service often resolves minor glitches.
- 🔍 Check the logs using
sudo dmesg | grep wifiorjournalctl. - 🔄 Restart the service:
sudo systemctl restart NetworkManager. - 📡 Make sure the interface is not blocked:
rfkill list.
If the problem persists, try temporarily disabling power management for your Wi-Fi adapter. Some cards go into sleep mode and don't wake up, causing connection drops. This can be configured through kernel module parameters.
⚠️ Note: Interfaces and commands may vary slightly depending on the Ubuntu version and desktop environment you're using. Always consult the official documentation for your specific distribution.
Frequently Asked Questions (FAQ)
Why can't Ubuntu see my Wi-Fi adapter?
Most likely, the driver is missing or not loaded. Check the command output. lspci or lsusbIf the device is listed but there is no network, install the package linux-firmware or a proprietary driver via "Additional Drivers".
How to reset all network settings in Ubuntu?
You can delete connection configuration files in the folder /etc/NetworkManager/system-connections/After deleting the files, restart the service. NetworkManagerThis will reset your network settings to factory defaults.
Is it possible to use WPA3 in Ubuntu?
Yes, modern versions of Ubuntu (20.04 and newer) fully support the security standard. WPA3A compatible router and Wi-Fi adapter are also required for operation. Configuration occurs automatically when you select a network.
Where can I find saved Wi-Fi passwords?
Passwords are stored in NetworkManager configuration files. You can find them in the directory /etc/NetworkManager/system-connections/To view the contents of the file, root privileges are required (sudo cat), since the files are protected from reading by ordinary users.