How Can We Help?
< Back
You are here:
Print

Ubuntu 16 Console Wi-Fi

The easiest way to get Wi-Fi working in Ubuntu is with network-manager

If you don’t have network-manager installed, install it first. Run:

sudo apt-get install network-manager

Once network-manager is installed, enabled it with “systemctl enable network-manager” then reboot the system

If you’re using a USB Wi-Fi adapter, plug it in now. View the interface assignment by typing in ifconfig -a


enp4s0 Link encap:Ethernet HWaddr 32:32:be:32:52
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12266079 errors:0 dropped:12 overruns:0 frame:0
TX packets:1336673 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1255538647 (1.2 GB) TX bytes:213327723 (213.3 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4402869 errors:0 dropped:0 overruns:0 frame:0
TX packets:4402869 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:492093487 (492.0 MB) TX bytes:492093487 (492.0 MB)

wlp5s0 Link encap:Ethernet HWaddr 32:32:55:22:33:22
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

If you already have an interface enabled, you’ll either have an entry in /etc/network/interfaces.d/eth0 (for example) or /etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp4s0
iface enp4s0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4

If your interfaces are configured in /etc/network/interfaces, then add an entry for the wireless adapter:


# The primary network interface
auto wlp5s0
iface wlp5s0 inet dhcp

Then, depending on your network-manager version, use nmcli to scan for a network, depending on your network-manager version, try one of the following:


nmcli device wifi rescan
nmcli device wifi list
nmcli device wifi connect SSID-Name password wireless-password

Or:

nmcli devices wifi list
nmcli --ask d connect wlp5s0

Your mileage may vary depending on the nmcli version, your operating system version and your network type. Also rebooting at any of the major steps might help resolve issues (since restarting network-manager doesn’t always seem to help).

Network Manager config files are stored in /etc/NetworkManager/

Network specific configuration files are located in /etc/NetworkManager/system-connections/ (e.g. /etc/NetworkManager/system-connections/your-ssid)

Additional resources on nmcli can be found here:
https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/configure-wifi-connections
and here:
https://fedoraproject.org/wiki/Networking/CLI

Although there may be some differences between Fedora and Ubuntu, most commands are similar.

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Table of Contents