Ubuntu – How to enable wireless on Ubuntu Server 18.04 via CLI

iwlwifinetworkingpackage-managementserverwpa

I cannot get wpasupplicant, wireless-tools, and also lib, iwconfig (Iget ifconfig) to operate on my Server 18.04 install.

I have Windows 10 on laptop. External HD with 18.04 Desktop and 18.04 Server.
Wireless works fine on the other two OS, but not non-GUI Server CLI.
I can’t install packages with no wireless.

I AM ABLE to go to https://packages.ubuntu.com/ and get any package I want via search.

I AM ABLE to save these *.deb files on the /home drive of the server partition, reboot into Server, run some sudo dpkg and sudo apt-get install commands (all CLI). Some of it appears to install some but I get a lot of errors too. My guess is it’s trying to reach out over wireless for some of the packages parts but no wireless enabled? I’m not sure what a good order of package installs to enable wireless would be.

It seems that this issue would have a “recipe” for a good method and order of installation of certain packages to enable your intel 7265 network controller (wlo1), if not a basic recipe for installing packages for wireless without wireless or Ethernet access.

Remember, I can surf the net with Desktop and download packages to a server directory.

Right now every package seems to be looking for missing parts. I'm hunting with a blindfold. I'm using WPA encryption.

These are *.deb packages and *.iso files I have access to in server:

Screenshot showing downloaded iso and deb files

@chili555 I can't use iwconfig because I can't install wireless-tools without internet? I can't seem to install packages from my dual accessible drive shown in the picture above? I also get the following with sudo cat /etc/netplan/*.yaml:

photo of attempt to install wireless-tools

Thank you for the welcome.

ipaddr show gives me this:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether e4:42:a6:a0:42:95 brd ff:ff:ff:ff:ff:ff

Best Answer

Let's amend your netplan file. From the terminal:

sudo nano /etc/netplan/01-netcfg.yaml

Amend the file to read:

network:
  version: 2
  renderer: networkd
  wifis:
    wlo1:
      dhcp4: true
      dhcp6: true
      access-points:
        "network_ssid_name":
          password: "**********"

Of course, substitue your network name and password. Note that both are enclosed in quotation marks ".

Netplan is quite strict about indentation and spacing; proofread carefully. Next, do:

sudo netplan generate
sudo netplan apply

Reboot and tell us if you connected:

ping -c3 www.ubuntu.com

If you get ping returns, you are all set.

Reference: https://netplan.io/examples

Related Question