Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).


  Search this Thread
Old 08-13-2009, 09:40 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 4

Rep: Reputation: 0
Setting wlan0 up as default.

Whenever I reboot my system, the wlan0 automatically goes down, requiring me to:

#ifconfig wlan0 up

#dhcpcd wlan0
after startup every time.

It's not fatal or anything, just somewhat of an inconvenience. My question is if there is a way to reboot and maintain the wireless status as up?

Last edited by JakeyHards; 08-13-2009 at 09:43 PM.
Old 08-14-2009, 01:13 AM   #2
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 331

Rep: Reputation: 59
If you have a Debian based distro you could try adding this to /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp
# Static IP
#iface wlan0 inet static
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 mode managed
#pre-up iwconfig wlan0 essid "WLANNAME_HERE"
pre-up iwpriv wlan0 set PSMode=FAST_PSP
pre-up iwpriv wlan0 set NetworkType=Infra
pre-up iwpriv wlan0 set AuthMode=WPA2PSK
pre-up iwpriv wlan0 set EncrypType=AES
pre-up iwpriv wlan0 set SSID="WLANNAME_HERE"
pre-up iwpriv wlan0 set WPAPSK="my_wifi_password"

For some reason I could not get it to work for me. Eventually I added the following to /etc/rc.local:

/sbin/ifconfig eth0 down
/bin/sleep 1

/sbin/ifconfig wlan0 up
/bin/sleep 2

/sbin/iwconfig wlan0 mode managed
/sbin/iwpriv wlan0 set PSMode=FAST_PSP
/sbin/iwpriv wlan0 set NetworkType=Infra
/sbin/iwpriv wlan0 set AuthMode=WPA2PSK
/sbin/iwpriv wlan0 set EncrypType=AES
/sbin/iwpriv wlan0 set SSID="WLANNAME_HERE"
/sbin/iwpriv wlan0 set WPAPSK="my_wifi_password"

/bin/sleep 1
/sbin/dhclient wlan0
#  Static IP
#/sbin/ifconfig wlan0 up
#/sbin/route add default gateway


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting font in one console doesnt override the default setting Lakki Linux - Enterprise 0 09-01-2008 08:19 AM
Problem setting up wlan0 using DLink harpoon45 Linux - Wireless Networking 10 10-31-2007 07:37 AM
Setting a wireless card to work with wlan0 zx10rhulk Linux - Wireless Networking 5 01-17-2007 08:59 AM
setting wlan0 key sublyme718 Linux - Wireless Networking 1 11-06-2005 03:30 PM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 02:39 PM > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration