alechk
Posts: 17
Joined: Thu Aug 06, 2015 7:53 am

Strange output from 'host name -I' command

Mon Jul 24, 2017 10:21 pm

What have I done to create this output after typing 'hostname -I':
192.168.1.85 192.168.1.86

???

User avatar
DougieLawson
Posts: 40523
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Strange output from 'host name -I' command

Mon Jul 24, 2017 11:04 pm

You've got two addresses assigned. That's due to mucking about with /etc/network/interfaces after failing to read the first five lines of that file.

Put it back to

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

klricks
Posts: 7430
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Strange output from 'host name -I' command

Mon Jul 24, 2017 11:12 pm

alechk wrote:What have I done to create this output after typing 'hostname -I':
192.168.1.85 192.168.1.86

???
Looks normal to me. What were you expecting?
On my RPi3B the first IP is the wired interface and the 2nd is the WIFI interface.
Unless specified otherwise my response is based on the latest and fully updated RPiOS Buster w/ Desktop OS.

Return to “Networking and servers”