Skip to content

Latest commit

 

History

History
115 lines (88 loc) · 2.05 KB

File metadata and controls

115 lines (88 loc) · 2.05 KB

IP & Network

Change IP Address

Note : For Jessie package update

edit /etc/apt/sources.list

deb http://legacy.raspbian.org/raspbian/ jessie main contrib

and run sudo apt-get update

Solution 3: fixed IP on the NAT network (in VirtualBox)

Then figure out which IP/Subnet you get assigned then change the config in your /etc/network/interfaces to reflect the changes:

auto eth0
iface eth0 inet static
        address 10.0.2.84
        netmask 255.255.255.0
        network 10.0.2.0
        broadcast 10.0.2.255
        gateway 10.0.2.2
        dns-nameservers 8.8.8.8

Or

iface eth0 inet static
        address 192.168.41.146
        netmask 255.255.255.0
        network 192.168.41.0
        gateway 192.168.41.254
        dns-nameservers 8.8.8.8
Step1 :
sudo nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.56
netmask 255.255.255.0
# optional
dns-nameservers 8.8.8.8 8.8.4.4
cb2 =>> gateway 192.168.1.210

Note : For Jessie
sudo nano  /etc/dhcpcd.conf
#and add at the end of the file
interface eth0
static ip_address=192.168.1.56
static routers=192.168.1.210
static domain_name_servers=8.8.8.8

interface wlan0
static ip_address=192.168.1.111/24
static routers=192.168.1.210
static domain_name_servers=8.8.8.8

WIFI static Config

nano /etc/network/interface

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

nano /etc/wpa_supplicant/wpa_supplicant.conf

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="Raspberry"
    psk="4321wifi!@#$"
    }
Step2 :
sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf

os lite jessi

for new os raspberry

 sudo nmtui

network restart

sudo systemctl restart networking
or 
sudo /etc/init.d/networking restart

ریستارت سرویس شبکه: