0

I have setup raspberry pi last night but my wlan0 not start automatically on startup. I need to run below command every time my raspberry restart.

sudo ifup wlan0

Any solution for that so I can add this command to startup.

Rock
  • 3
  • 1
  • This seems to be a general Linux question (not specific to the Raspberry Pi). Perhaps put the appropriate commands in /etc/network/interfaces. The command man interfaces should give help. – joan Oct 23 '15 at 21:15
  • Related http://raspberrypi.stackexchange.com/questions/13558/how-to-get-wi-fi-to-connect-on-boot and http://raspberrypi.stackexchange.com/questions/3852/start-wireless-network-automatically-on-boot-up-how-to – Ghanima Oct 23 '15 at 21:28
  • @Ghanima Those are OLD posts and probably don't apply to any new (post May 2015) image. – Milliways Oct 24 '15 at 00:03
  • You don't tell us how you "setup raspberry pi". You need to specify what you did, and list any files you changed. – Milliways Oct 24 '15 at 00:04
  • @milliways, might be old. Still the first answer to the first linked question reads prominently "The first missing piece was the line auto wlan0"... which is kinda the same the answer to this question suggests ;) – Ghanima Oct 24 '15 at 20:05
  • @Ghanima both answers include dhcp e.g. iface wlan0 inet dhcp. This may work on the command line, but breaks the GUI WiFi, as it causes dhcpcd to crash (as can be seen by the boot log). If you are experienced and had setup your Pi before May it is OK, but won't work for clean installations. It is best to stick to the Foundation methods. See some of my other rants on dhcpcd. Still Rock hasn't provided any info about what he did, or why he changed the supplied code, which does work (and work better), even if poorly explained. – Milliways Oct 24 '15 at 21:49

1 Answers1

0

Simple: add auto wlan0 above your wlan0 configuration in /etc/network/interfaces

Patrick Cook
  • 6,365
  • 7
  • 37
  • 63