Reference and guides to build kick ass raspberry pi projects.
View the Project on GitHub codingforentrepreneurs/Pi-Awesome
Are you looking to find devices on network with macOS, linux, or windows?
In terminal run:
HOST_IP=$(ipconfig getifaddr en0)
echo $HOST_IP
Verify with:
echo $HOST_IP
Option 1 In terminal run:
HOST_IP1=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
echo $HOST_IP1
Verify with:
echo $HOST_IP1
Option 2
In terminal run:
HOST_IP2=$(hostname -I | cut -f1 -d' ')
Verify with:
echo $HOST_IP2
In powershell run:
$env:HostIP = (
Get-NetIPConfiguration |
Where-Object {
$_.IPv4DefaultGateway -ne $null -and
$_.NetAdapter.Status -ne "Disconnected"
}
).IPv4Address.IPAddress
Verify with:
$env:HostIP