-1

I am trying to get the IP of my Raspberry Pi running Raspbian. I have run the ifconfig command in the terminal and I get this result.

terminal image

Is the first line for iface enxb827 for the ethernet?

How do I turn on the wifi? I have tried many ways, yet I still can't turn it on.

sa_leinad
  • 141
  • 1
  • 1
  • 9
blackz
  • 1
  • 1
  • 3

3 Answers3

2

How do I set up networking/WiFi/Static IP documents the possible methods of setting up WiFi (and networking in general) on the Pi.

The simplest (and recommended method for new users) if you are using the GUI is to set up by following the Foundation Guidelines

It appears from your question that you already have an Ethernet connection to your network, which should work. It is possible to have both an Ethernet and WiFi connection, although this creates conflicts, and is not recommended; use one or the other until you become familiar with networking.

If your question is what IP is the Pi using; hostname -I on the Pi will show this, and it is also listed in ifconfig.

Milliways
  • 54,718
  • 26
  • 92
  • 182
1

In Stretch it's no longer eth0, it uses the new way of naming interfaces, predictable interface names.

To configure WiFi is well described here: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

Adding the network details to the Raspberry Pi

Open the wpa-supplicant configuration file in nano:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of the file and add the following:

network={
ssid="testing"
psk="testingPassword" }

both from command line and by adding a file to the SD card before the first boot.

MatsK
  • 2,478
  • 3
  • 12
  • 20
  • Nope, these are stable, but *unpredictable* names, unless you are able to predict MAC48 addresses from simply looking at the Pi board. – TheDiveO Sep 10 '17 at 06:18
  • @TheDiveO Noop they are still predictable! That the MAC isn't printed on the Raspberry Pi boards is a Raspberry Pi flaw! – MatsK Sep 10 '17 at 07:15
  • Yeah, but when you have more than one box, that's ugly. Believe me, I'm working in the industry for years, and using MAC48 for naming server systems, such as even a Pi is, is beyond sensible comprehension. Ask some industrial users if you don't believe. Not that I'm afraid MAC48s, I like them in IPv6 SLAAC, but then I have DNS in place. Anyway, ordinary users can't predict MAC48s. – TheDiveO Sep 10 '17 at 07:21
  • That is your opinion and don't assume that users are stupid! – MatsK Sep 10 '17 at 07:24
  • on the contrary, it's these sane users in industry where I get the requests from to help them with such decisions as Debian's. Nowhere did I imply that users are dump. Read carefully. – TheDiveO Sep 10 '17 at 07:27
  • Still opinion based. – MatsK Sep 10 '17 at 07:29
  • To make this a better answer, it would be good to include some of the content in the link. – Bex Sep 10 '17 at 10:37
  • OK, have done that @Bex . – MatsK Sep 10 '17 at 11:28
-1

Follow the simple instructions given here to disable unpredictable stable network names, to get back stable predictable names, so you can identify eth0 and wlan0: https://raspberrypi.stackexchange.com/a/72261/64046.

In short:

sudo ln -s /dev/null /etc/systemd/network/99-default.link
sudo reboot

I fail to see how the new unpredictable network interface names fit into the self-esteem of Debian as being the stablest of stable distribution. The MAC48-based network names are the opposite of usable for most users, except real network experts.

TheDiveO
  • 1,551
  • 1
  • 9
  • 15