Have you ever forgotten the name of your Wi-Fi network while connecting to Linux via SSH or working in a non-GUI terminal? Or maybe you need to quickly copy SSID Setting up a new device? Unlike Windows or macOS, where the network name is usually displayed in the taskbar, in Linux this process isn't always obvious—especially for beginners.
The situation is complicated by the fact that in different distributions (Ubuntu, Fedora, Arch Linux) and with different connection methods (NetworkManager, wpa_supplicant, netctl) the commands for getting the network name may differ. Also, if you use systemd-networkd or ConnMan, standard solutions like nmcli won't work. But don't worry: in this article we'll figure it out. all current methods — from the simplest graphical tools to low-level commands for experienced users.
We will pay special attention to cases where:
- 🖥️ You're connected to a network, but you don't remember its name.
- 🔌 Need to know the SSID neighboring network (not your own)
- 🐧 Work on a server without a GUI or via SSH
- 🔄 The network name is displayed incorrectly (Cyrillic, special characters)
All commands are tested on Ubuntu 22.04/24.04, Debian 12, Arch Linux And Fedora 39 with the latest kernel updates (6.2+). If you're using a rare distribution or an older version, check the availability of the mentioned utilities via which or whereis.
1. Method for beginners: Graphical user interface (GUI)
If you have a graphical shell installed (GNOME, KDE Plasma, XFCE etc.), the name of the current Wi-Fi network can be found in just two clicks. This method is suitable for desktop versions Linux and does not require knowledge of commands.
IN Ubuntu with shell GNOME:
- Click on the network icon in the upper right corner of the panel (next to the clock).
- In the drop-down menu, the current network will be checked or highlighted. For example: "Connected to MyWiFi_5G".
- To copy the network name, click
Right-click → Connection Details.
IN KDE Plasma (used in Kubuntu, KDE Neon):
- 📍 Click on the network icon in the system tray (usually at the bottom right).
- 🔍 The current network will be marked with a green circle with a check mark.
- 📋 To copy the SSID, right-click on the network and select
Connection information.
If the network icon is not on the panel, you may have disabled the applet. NetworkManagerIn this case:
nm-applet &
This command will temporarily launch the applet in the current session. To enable autostart, add it to ~/.config/autostart/.
2. Universal method: team nmcli (NetworkManager)
nmcli — is the primary network management tool in most modern distributions. It works even without a graphical interface and provides the most detailed connection information.
To find out the name of the current Wi-Fi network, run:
nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d':' -f2
This command:
- 🔍 Filters only active connections (
active=yes) - 📋 Extracts only the field
ssid(network name) - ✂️ Removes unnecessary characters using
cut
If you want to see all the information about the current connection (including IP, MAC address, speed):
nmcli device show wlan0
Replace wlan0 to your network interface (you can find it out using the command ip a - look for the line with wlp or wlan).
What to do if nmcli not installed?
In some minimal builds (for example, Arch Linux without NetworkManager) This utility may be missing. Install it through your package manager:
sudo pacman -S networkmanager # Arch/Manjaro
sudo apt install network-manager # Debian/Ubuntu
After installation, start the service:
sudo systemctl enable --now NetworkManager3. Alternative: iwconfig And iw for low-level diagnostics
If NetworkManager not used (for example, on a server with wpa_supplicant), utilities will come in handy iwconfig And iwThey work directly with Wi-Fi drivers and display raw connection information.
Method 1: via iwconfig (obsolete, but still used):
iwconfig wlan0 | grep 'ESSID'
The output will look like:
wlan0 IEEE 802.11 ESSID:"MyHomeWiFi_2.4"
Please note: If the network name contains spaces or special characters, they may be displayed in quotation marks or in hexadecimal format (e.g. ESSID:5Cx7B...).
Method 2: via iw (modern replacement iwconfig):
iw dev wlan0 link
Look for the line SSID: MyWiFiNameThis method is more reliable because iw actively develops and supports new Wi-Fi standards (including Wi-Fi 6/6E).
If both commands return empty output, check:
- 🔌 Are you connected to Wi-Fi (not Ethernet)?
- 🔄 Is the interface specified correctly (check via
ip a) - 🛠️ Are the packages installed?
wireless-tools(Foriwconfig) Andiw
4. View all available networks (including neighboring ones)
Sometimes you need to know not only your own network but also those nearby—for example, to diagnose interference or select a less congested channel. To do this, use the scan command.
Method 1: via nmcli (shows networks with signal strength):
nmcli device wifi list
The output will be in the form of a table:
| SSID | Modus | Channel | Speed | Signal | Security |
|---|---|---|---|---|---|
| MyWiFi_5G | Infrastructure | 36 | 1.3 Gbps | ★★★★☆ | WPA2 |
| Neighbor_WiFi | Infrastructure | 6 | 600 Mbps | ★★☆☆☆ | WPA3 |
Method 2: via iw (shows hidden networks and technical details):
sudo iw dev wlan0 scan | grep 'SSID:'
For more detailed analysis (channel, encryption, access point MAC address) use:
sudo iw dev wlan0 scan | less
And scroll through the output using the keys ↑/↓.
Make sure your Wi-Fi adapter is enabled|Check your root privileges (sudo)|Disable MAC address filtering on your router (if scanning doesn't show any networks)|Use iw reg set RU for correct display of channels in Russia-->
5. View saved networks (connection history)
Linux keeps a list of all networks you've ever connected to. This is useful if you need to remember the name of a network you haven't connected to in a while or delete outdated profiles.
Method 1: via nmcli (for NetworkManager):
nmcli connection show
The output will contain all saved connections, including Ethernet and VPN. To filter only Wi-Fi:
nmcli -t -f name,type connection show | grep 'wifi'
Method 2: via configuration files wpa_supplicant:
If you use wpa_supplicant (for example, on a server without NetworkManager), the list of networks is stored in:
/etc/wpa_supplicant/wpa_supplicant.conf
Open the file with superuser rights:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Look for blocks like:
network={ssid="OldWiFiName"
psk="encrypted_password"
...
}
nmcli connection delete "SetiName"
This is useful if Linux automatically connects to an unwanted network.-->
6. Special cases: hidden networks, Cyrillic, special characters
Some networks are configured to not broadcast their name (hidden SSID). Others contain Cyrillic characters or emoji, which can cause display issues. Let's look at how to work around this.
Hidden networks (hidden SSID):
If the network is not visible in the scan results, but you know its name, connect to it manually:
nmcli device wifi connect "HiddenNetworkName" password "password"
Or through wpa_supplicant:
wpa_passphrase "HiddenNetworkName" "password" | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
Cyrillic and special characters:
If the network name is displayed as ESSID:off/any or a set of hexadecimal characters, try:
- 🔤 Set the correct locale:
export LANG=ru_RU.UTF-8 - 📏 Use
iwinstead ofiwconfig(better handles Unicode) - 🖥️ Connect via GUI (the GUI usually displays Cyrillic correctly)
Network with spaces or quotes:
If the network name contains spaces or quotes, escape them when connecting:
nmcli device wifi connect "My\"WiFi" password "12345678"
Or use single quotes:
nmcli device wifi connect 'My"WiFi' password '12345678'
Why are some networks showing up as [ESSID
off]?:
This means that the access point does not broadcast its name (hidden SSID). To connect to such a network, you need to know its name in advance and manually specify it in the connection command or configuration file.
7. Automation: How to save a network name to a variable or file
If you need to use the Wi-Fi network name in scripts (for example, for logging or notifications), you can automatically save it to a variable or file.
Saving to a variable (Bash):
CURRENT_SSID=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d':' -f2)
echo "Current network: $CURRENT_SSID"
Saving to file:
nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d':' -f2 > ~/current_wifi.txt
Connection check and notification:
Script for sending a notification if the network has changed:
#!/bin/bashOLD_SSID=$(cat ~/current_wifi.txt 2>/dev/null)
NEW_SSID=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d':' -f2)
if [ "$OLD_SSID" != "$NEW_SSID" ]; then
echo "$NEW_SSID" > ~/current_wifi.txt
notify-send "Wi-Fi changed" "You are now connected to: $NEW_SSID"
fi
Save this code to a file (eg. ~/wifi_monitor.sh), make it executable (chmod +x ~/wifi_monitor.sh) and add in crontab for regular execution.
8. Troubleshooting: Why the Network Name Isn't Displayed
If none of the methods showed the name of the Wi-Fi network, check the following:
| Problem | Possible cause | Solution |
|---|---|---|
| Commands return empty output | The Wi-Fi adapter is disabled or not recognized. | rfkill unblock wifi or ip link set wlan0 up |
nmcli it says "Device 'wlan0' not found" |
Invalid interface name | Check through ip a or iw dev |
The network name is displayed as ? or krakozyabry |
Incorrect terminal encoding | Install LANG=ru_RU.UTF-8 or use iw |
iwconfig does not show ESSID |
The driver does not support this utility. | Use iw or check the driver (lspci -k) |
If the problem persists, check:
- 🔌 Physically connecting the Wi-Fi adapter (especially on laptops with a hardware switch)
- 🛠️ Are the drivers for your adapter downloaded? (
lsmod | grep iwlwififor Intel,rtl8xxxufor Realtek) - 🔄 Is the NetworkManager service running? (
systemctl status NetworkManager)
⚠️ Attention: On some laptops (especially with Realtek or Broadcom (Adapters) Wi-Fi may turn off when the battery is low or overheating. Check the power saving settings in the BIOS/UEFI.
FAQ: Frequently Asked Questions
Is it possible to find out the name of the Wi-Fi network to which another computer on the same network is connected?
No, it's not possible directly. You can only see MAC address access points (via arp -a or nmap), but not the network name (SSID). The exception is if the other computer broadcasts the network name in its hostname (which is unlikely).
Why iwconfig shows ESSID:off even though I'm connected to the network?
This means that the access point does not broadcast its name (hidden SSID). Your device remembers the network name from previous connections, but doesn't receive it from the router. To see the real name, check the configuration files (/etc/NetworkManager/system-connections/ or /etc/wpa_supplicant.conf).
How do I copy a Wi-Fi network name to the clipboard from the terminal?
Use the command xclip (for X11) or wl-copy (for Wayland):
nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d':' -f2 | xclip -selection clipboard
If the utility is not available, install it:
sudo apt install xclip # Debian/Ubuntu
sudo pacman -S xclip # Arch
Is it possible to change the name of your Wi-Fi network directly from Linux?
No, network name (SSID) It's set on the router side. You can only:
- Connect to another network
- Forget current network (
nmcli connection delete "Name") - Change the network name in the router settings (usually at
192.168.0.1or192.168.1.1)
Why don't commands work in some distributions?
In minimal builds (for example, Arch Linux without NetworkManager or server versions of Ubuntu) utilities like nmcli or iwInstall them manually:
sudo apt install wireless-tools iw wpagui # Debian/Ubuntu
sudo pacman -S wireless_tools iw wpa_supplicant # Arch
If you use systemd-networkd, the network name can be found through:
networkctl status wlan0
⚠️ Attention: In some corporate networks, the Wi-Fi name (SSID) may be masked or dynamically changed (for example, in hotels or airports). In this case, none of the described methods will reveal the real name—only the one assigned by the DHCP server.