Set a wireless network in Ubuntu to enable WPA wireless Internet access

Source: Internet
Author: User

For Ubuntu, how do I set up a wireless network? Here we will unveil the curtain for us. I believe you will feel like setting yourself on the cloud.

For a long time, a major reason I haven't replaced my book with a Linux system is that wireless Internet access is too troublesome, and I don't want to drag a network cable to the room every day, so I have not made up my mind. It was very easy to achieve wireless Internet access in Ubuntu.

First, install wpa_supplicant. The command is as follows:

Apt-get install wpasupplicant

Then, create/etc/wpa_supplicant.conf to include the following content:

 
 
  1. Network = {ssid = "your wireless network ssid" psk = "Your wpa password" key_mgmt = WPA-PSK proto = WPA pairwise = TKIP}

Then, edit/etc/network/interfaces:

 
 
  1. iface eth1 inet dhcp    
  2. pre-up wpa_supplicant -Bw -Dwext -i eth1 -c/etc/wpa_supplicant.conf     
  3. post-down killall -q wpa_supplicant  

Note: eth1 is your network card, and assume that you use dhcp protocol.

Finally, start your Nic and you will be able to access the Internet wirelessly.

Ifup eth1 if there is any problem, you can disable your wired network ifdown eth0) to prevent Routing Problems.

Related Article

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.