Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Command needed for use in terminal

    I use a couple of different linux (ubuntu or derivative) laptops on my employer's network. MAC addresses are used for connecting to the network and I have figured out how to change the MAC on the laptops so I only need to have one MAC registered. I use the following script:

    sudo ifconfig wlan0 down && sudo ifconfig wlan0 <new MAC> && sudo ifconfig wlan0 up

    I still have to click on the wireless network connection icon to reset the connection after the script runs. To complete the script I'd like to add the command to reset the wireless but cannot figure out what that command is. Could someone tell me the command or tell me how to find out what command the icon runs?

    Lovin' the command line!
    Thank You

  2. #2
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Boston, MA
    There are a number of possibilities. The most basic for Ubuntu is
    sudo iwconfig wlan0 essid "network name"
    sudo dhclient wlan0
    Or with WEP encryption
    sudo iwconfig wlan0 essid "network name" key <WEP hex key>
    If you're using WPA encryption, however, it gets more complicated and you need to use wpa_supplicant.

    There is a new-ish command line client for network-manager as well, but I don't think it's in the Ubuntu repositories yet.

  3. #3
    Perfect! I didn't have the confidence to try it without coaching. Thank You


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts