Ubuntu command line mode connection WiFi

Source: Internet
Author: User
Tags nameserver

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.