I'm trying to get Ubuntu on a new machine. Neither my graphics drivers or my wifi is working. I need to handle the wifi before handling the graphics drivers, so I'm forced to do this from terminal.
I am not having a driver problem with my wifi. I could connect during the initial install, and could connect download things then, but does not connect automatically on real boots. Right now wlan0 is unknown, but I have been able to make progress with the 'logical name' of my card used in place of that. I have been able to scan for my network with
sudo iw $logical_name scan | grep [SSID], so I think I'm close.
I've been following "Connect to WPA/WPA2 via terminal" things, and have been shut down in a few different places.
Failer point 1:
/etc/networking/interface to read
auto lo iface lo inet loopback auto <logical name spelled out> iface <logical name spelled out> inet dhcp wpa-ssid mynetworkname wpa-psk mypassphrase
sudo ifup <logical name> return "unknown interface ", same with wlan0. I have had another person double check the file for correctness.
Failure Point 2
sudo iwconfig wlan0 wpa-ssid mynetworkname sudo iwconfig wlan0 wpa-psk mypassphrase sudo dhclient wlan0
called with wlan0 or logical name gives me ' iwconfig: unknown command "wpa-ssid" '
EDIT 1 @Jeremy31 asked why I wasn't using network manager. Answer: I didn't know about it.
STATE: disconnected CONNECTIVITY: none WIFI-HW: enabled WIFI: enabled WWAN: enabled
DEVICE: [logical name] TYPE: wifi STATE: disconnected CONNECTION: --
nmcli device wifi connect [SSID] password [pw]
Error: Connection activation failed: (0) No reason given.
Bus 001 Device 002: ID 0b05:179d ASUSTek Computer, Inc. USB-N53 802.11abgn Network Adapter [Ralink RT3572]
lshw -class network
description: Wireless interface physical id: 1 bus info: usb@1:2 logical name: wlxf46d045ddd3a capabilities: ethernet physical wireless configuration: broadcast=yes driver=rt2800usb driverversion=4.4.0-51-generic firmware=0.29 link=no multicast=yes wireless=IEEE 802.11abgn