Unlike Ubuntu desktop, Ubuntu server does not come with NetworkManager. This is one way (without installing NetworkManager) to get WiFi working on Ubuntu server.
First, install the packages that we will need. Strictly speaking,
wireless-tools isn't necessary, but it's nice to get
sudo apt install wireless-tools sudo apt install wpasupplicant
Now, figure out the name of your wireless adapter:
$ iwconfig wlx60somelongstring IEEE 802.11bgn ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off ...
Next, add a configuration for your wireless adapter to
# Wifi auto wlx60somelongstring iface wlx60somelongstring inet dhcp wpa-ssid <your SSID> wpa-psk <your WiFi Password>
Finally, restart networking via systemd:
sudo service networking restart
At this point your wireless adapter should automatically connect to your AP. Also, because we put
/etc/network/interfaces, it should come up on every boot.
At this point, if desired, you can use
iwconfig to inspect the connection:
$ iwconfig wlx60somelongstring IEEE 802.11bgn ESSID:"<your SSID>" Mode:Managed Frequency:2.437 GHz Access Point: XX:YY:ZZ:AA:BB:CC Bit Rate=72.2 Mb/s Tx-Power=20 dBm Retry short limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=67/70 Signal level=-43 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:30 Invalid misc:17 Missed beacon:0 ...