https://elinux.org/RPi_SD_cards
hostname -I
/sbin/ifconfig [-a]
ip addr show eth0
sudo leafpad /etc/dhcpcd.conf
-------------------
interface eth0
static ip_address=10.0.1.3/24
static routers=10.0.1.1
static domain_name_servers=10.0.1.1
interface wlan0
static ip_address=10.0.1.3/24
static routers=10.0.1.1
static domain_name_servers=10.0.1.1
google for: how to get wan router ip in lan raspberry pi
curl -s "http://whatismyip.org/"
sudo apt-get install curl
wget http://aschillings.co.uk/myscripts/getip.php
wget -q -O- icanhazip.com
Or if your router has a HTML admin interface and you have the router admin username and password, you could wget the relevant config page and grep ... DOES NOT WORK FOR Airport Extreme
import urllib2
ip = urllib2.urlopen("http://automation.whatismyip.com/n09230945.asp").read()
from requests import get
ip = get('https://api.ipify.org').text
import urllib.request
external_ip = urllib.request.urlopen('https://ident.me').read().decode('utf8')
print(external_ip)
Airport Extreme can be configured through the AirPort_Utility ONLY!!! There is no web interface....
for raspbery pi in LAN (10.0.1.3)
AirPort_Utility (V7.7.9, 10.0.1.1) -> Manual Setup -> Internet -> DHCP -> + -> Description: raspberrypi, MAC Address -> Continue -> b8:27:eb:f3:0a:74 ...
AirPort_Utility (V7.7.9, 10.0.1.1) -> Manual Setup -> Internet -> DHCP -> + -> Description: "Home raspberrypi", DHCP Client Id: raspberrypi, 10.0.1.3
$sudo -s
$adduser username
$usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi username
Turn off "Login as user pi" in Menu -> Preferences -> Raspberry Pi Configuration -> System
$reboot
$deluser --remove-home pi
Editor
leafpad, vi, idle are installed
sudo apt-get install emacs
sudo apt-get install vimSetup get
git config --global user.name <my-name>
git config --global user.email <my@email>
git config -l
cat /sys/class/net/wlan0/address : b8:27:eb:f3:0a:74
cat /sys/class/net/eth0/address : b8:27:eb:a6:5f:21