Ubuntu is not allowed to enter the graphical interface for some reason, and when there is no network port, it needs to connect to the WiFi update network. And WiFi has changed a lot. WEP mode has been eliminated, with plenty of WPA mode WiFi, which describes the entire process, as well as the pits that may be encountered.
List all of your network card devices. Find your wireless card, this is wlan2
Ifconfig
Turn on the WLAN interface
Ifconfig wlan2 up/ifup wlan2
Find all available WiFi access points and record the access point name (Essid). This is Tp_link.
Iwlist Scanning
Because of the WPA mode password, you enter and actually use a transform. You need to use another set of APIs to do the processing. Enter the following command, and you will be prompted to enter your password. The wpa.conf generated by the carriage return is the connection configuration file
Wpa_passphrase Tp_link > wpa.conf
Connect Wi-Fi via configuration file. -B means the background mode
Wpa_supplicant-iwan2-cwpa.conf-b
If it is DHCP. Activate as follows,
Dhclient-r
Dhclient wlan2
If the DNS server is not configured, you need to modify the/etc/resolv.conf file. Add DNS servers, such as
NameServer 8.8.8.8
NameServer 8.8.4.4
So you can get online.
Reference:
Http://askubuntu.com/questions/104066/enable-wi-fi-in-recovery-terminal
http://www.computertechblog.com/assign-a-static-ip-dns-gateway-with-ifconfig-and-route-add/
Ubuntu command line mode connection WiFi