PC & IT SUPPORT MADE EASY FORUM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

setting up raspberry pi for auto login and ssh and static ip config examples

Go down

setting up raspberry pi for auto login and ssh and static ip config examples Empty setting up raspberry pi for auto login and ssh and static ip config examples

Post by jamied_uk 15th February 2014, 19:53

~~~~~~~

First enter these commands to update software!

sudo apt-get install update -y

sudo apt-get upgrade -y
Auto login to gui

sudo nano /etc/profile

Scroll down to the very bottom of the file and add the following command

Startx

Press Ctrl+X to exit followed by Y to accept the changes.



http://frustrateditengineer.wordpress.com/2012/07/15/raspberry-pi-setting-up-auto-login-and-auto-loading-the-gui/

~~~~~~~


sudo apt-get install -y gedit
sudo gedit /etc/network/interfaces (or nano)
This will allow you to edit the file using nano.  Change the line that reads

iface eth0 inet dhcp

to

iface eth0 inet static

Below this line enter the following.

iface eth0 inet static

address 192.168.1.16
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


backup original of dynamic local ip


  GNU nano 2.2.6         File: /etc/network/interfaces                         

auto lo

iface lo inet loopback
iface eth0 inet dhcp


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


~~~~~~~~~~~~~~~~
restart pi from ssh
sudo reboot



For more info visit
http://www.raspberryshake.com/raspberry-pistatic-ip-address/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ssh from other systems with this example (edit for your settings).

ssh pi@192.168.1.16


now set an alias

alias picon1='ssh pi@192.168.1.16'
jamied_uk
jamied_uk
Admin

Posts : 2952
Join date : 2010-05-09
Age : 41
Location : UK

https://jnet.sytes.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum