Monday, February 1, 2016

Embedded Systems: Raspberry Pi Primer

[Raspberry Pi Model B, Courtesy RaspberryPi.org ]

Abstract:

Computers originated as systems the size of large rooms filled with vacuum tubes with massive heat dissipation and equipment failure issues. Over time, the creation of the transistor and it's replacement of tubes created cooler systems requiring less power and more robust reliability. The creation of the Silicon Chip enabled the consolidation of many transistors onto tiny surfaces. Techniques to merge more parts onto a single piece of silicon created the concept of a Single Board Computer, to the point where the best of these computers can reside mostly on a single chip. The Raspberry Pi is one example of this.
[Solaris Logo, Courtesy Sun Microsystems]

Is Solaris Available?

No, unfortunately, Solaris is not available. There is an attempt to bring up Illumos under the Raspberry Pi, so people are only hoping that this will be finished quickly to provide an enterprise UNIX for the embedded platform.

[Raspbian Logo, courtesy Raspbian.org]

Where to Start

The Frequently Asked Questions list is very important for understanding the system. Acquire a fairly inexpensive but fully functional single board embedded system - used in this article is the Raspberry Pi model B, which includes 4 USB ports, an ethernet port, SD Card, 512MB of RAM, HDMI port, and some other ports. Download the Raspberry Pi supported Operating System called Raspbian.  Raspbian is based upon the Debian flavor of the Linux Operating System. At the time of this writing, Jessie is the most recent release of Raspbian.

Preparing the Embedded System

An SD Card should be chosen, with high performance read and write cycles, 32 Gigabytes is a good size. The common OS images, like Raspbian, easily fits within 8 Gigabytes, but a larger card should be chosen, all the way up to 32 Gigabytes with the model chosen in this article. Instructions below will expand into the entire card. After imaging an SD Card with Raspbian, the card can be booted from the SD Card.

Attaching the Embedded System

After attaching the Raspberry Pi to USB Power, Ethernet Cable, and optionally an HDMI cable. Other optional connections can be a mouse and keyboard. In this case, an alternate computer system will be used in order to contact the embedded system over SSH.

Booting the Embedded System

When booting the card, it will automatically get an IP Address via DHCP from a local DSL or Cable Modem. The Raspberry Pi will also update the DNS on an AT&T DSL terminator. There is a Red power light, next to the SD Card slot which illuminates during the boot. With each disk access, the green light illuminates. As the Operating System comes up, the Link integrity lights appear on the Ethernet Port.

Testing Network Connectivity

From another local machine on the network, the embedded system can be contacted.

macosx/user$ ping -c 3 raspberrypi 
PING raspberrypi.attlocal.net (192.168.1.94): 56 data bytes
64 bytes from 192.168.1.94: icmp_seq=0 ttl=64 time=5.453 ms
64 bytes from 192.168.1.94: icmp_seq=1 ttl=64 time=1.808 ms
64 bytes from 192.168.1.94: icmp_seq=2 ttl=64 time=3.614 ms

--- raspberrypi.attlocal.net ping statistics ---

3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.808/3.625/5.453/1.488 ms

The DNS Name will be available whenever the device is connected to the local network.

Remote Control of the Embedded System

The Raspberry Pi can be contacted through Secure Shell. Once logging in, root permission can be acquired via sudo.

macosx/user$ ssh pi@raspberrypi
The authenticity of host 'raspberrypi (192.168.1.94)' can't be established.
RSA key fingerprint is d0:e7:3c:78:b6:58:c6:22:8e:fa:fe:30:7e:cd:8e:79.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'raspberrypi' (RSA) to the list of known hosts.
pi@raspberrypi's password: raspberry

The programs included with the Debian GNU/Linux system are free software;

the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent

permitted by applicable law.
Last login: Sun Jan 24 01:37:07 2016 from unknown001cb3b2a5ec
pi@raspberrypi:~ $ sudo bash
root@raspberrypi:/home/pi# 

From the root based shell account, all updates can be conducted.

First Time Configuration

There are a variety of different options to adjust on the hardware configuration, which can be done through the command line.
root@raspberrypi:/home/pi# raspi-config

A Character based User Interface appears, with various capabilities. It is best viewed with a terminal window of 112 characters wide or larger.
┌─────────────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├─────────────────────┐
│                                                                                                     │
│ 1 Expand Filesystem            Ensures that all of the SD card storage is available to the OS       │
│ 2 Change User Password         Change password for the default user (pi)                            │
│ 3 Boot Options                 Choose whether to boot into a desktop environment or the command line│
│ 4 Wait for Network at Boot     Choose whether to wait for network connection during boot            │
│ 5 Internationalisation Options Set up language and regional settings to match your location         │
│ 6 Enable Camera                Enable this Pi to work with the Raspberry Pi Camera                  │
│ 7 Add to Rastrack              Add this Pi to the online Raspberry Pi Map (Rastrack)                │
│ 8 Overclock                    Configure overclocking for your Pi                                   │
│ 9 Advanced Options             Configure advanced settings                                          │
│ 0 About raspi-config           Information about this configuration tool                            │
│                                                                                                     │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘

Various steps should be taken to prepare the system during first time usage.

Expanding Root Filesystem

By default, the boot image is designed to fit on a 4 GB SD card. Larger SD cards are available and common, so increasing the size of the SD card through the config menu is the first order.

Selecting "1 Expand Filesystem" and Enter reminds the user that a reboot is needed to activate.

┌──────────────────────────────────────────────────────┐
│                                                      │ 
│ Root partition has been resized.                     │ 
│ The filesystem will be enlarged upon the next reboot │ 
│                                                      │ 
└──────────────────────────────────────────────────────┘ 

Pressing Enter again will select Ok and return to the menu

In the above example, the root file system was expanded into a 32 Gig card. The following is reported onto the terminal window, behind the Character Based User Interface.
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 29 GiB, 31167873024 bytes, 60874752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xea0e7380

Device         Boot  Start     End Sectors  Size Id Type
/dev/mmcblk0p1        8192  131071  122880   60M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      131072 7684095 7553024  3.6G 83 Linux


Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-60874751, default 2048): Last sector, +sectors or +size{K,M,G,T,P} (131072-60874751, default 60874751): 
Created a new partition 2 of type 'Linux' and of size 29 GiB.

Command (m for help): Disk /dev/mmcblk0: 29 GiB, 31167873024 bytes, 60874752 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xea0e7380

Device         Boot  Start      End  Sectors Size Id Type
/dev/mmcblk0p1        8192   131071   122880  60M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      131072 60874751 60743680  29G 83 Linux


Command (m for help): The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

The next reboot will facilitate the larger root slice.

Updating Configuration Tool

The Raspberry Pi Configuration Tool should also be updated, while still in the Character Based User Interface.

Selected the "9 Advanced Options" brings the user to a menu where the updating the tool to the latest version can be conducted.
┌──────────────────┤ Raspberry Pi Software Configuration Tool (raspi-config) ├──────────────────┐
│                                                                                               │
│ A1 Overscan     You may need to configure overscan if black bars are present on display       │
│ A2 Hostname     Set the visible name for this Pi on a network                                 │
│ A3 Memory Split Change the amount of memory made available to the GPU                         │
│ A4 SSH          Enable/Disable remote command line access to your Pi using SSH                │
│ A5 Device Tree  Enable/Disable the use of Device Tree                                         │
│ A6 SPI          Enable/Disable automatic loading of SPI kernel module (needed for e.g. PiFace)│
│ A7 I2C          Enable/Disable automatic loading of I2C kernel module                         │
│ A8 Serial       Enable/Disable shell and kernel messages on the serial connection             │
│ A9 Audio        Force audio out through HDMI or 3.5mm jack                                    │
│ A0 Update       Update this tool to the latest version                                        │
│                                                                                               │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
The Character Based User Interface briefly switches to the screen to show what is happening

Get:1 http://archive.raspberrypi.org jessie InRelease [13.4 kB]
Get:2 http://mirrordirector.raspbian.org jessie InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org jessie/main armhf Packages [109 kB]
Get:4 http://mirrordirector.raspbian.org jessie/main armhf Packages [8,963 kB]
Get:5 http://archive.raspberrypi.org jessie/ui armhf Packages [7,639 B]       
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB                    
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Get:6 http://mirrordirector.raspbian.org jessie/contrib armhf Packages [37.5 kB]                                
Get:7 http://mirrordirector.raspbian.org jessie/non-free armhf Packages [70.3 kB]                               
Get:8 http://mirrordirector.raspbian.org jessie/rpi armhf Packages [1,356 B]                                    
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB                                         
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en                                            
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB                                            
Ign http://mirrordirector.raspbian.org jessie/main Translation-en                                               
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB                                        
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en                                           
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB                                             
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Fetched 9,217 kB in 41s (222 kB/s)                                                                              
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
  raspi-config
1 upgraded, 0 newly installed, 0 to remove and 71 not upgraded.
Need to get 13.4 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian/ jessie/main raspi-config all 20160108 [13.4 kB]
Fetched 13.4 kB in 0s (31.0 kB/s)       
(Reading database ... 123536 files and directories currently installed.)
Preparing to unpack .../raspi-config_20160108_all.deb ...
Unpacking raspi-config (20160108) over (20151117) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up raspi-config (20160108) ...

The Raspberry Pi Software Configuration Tool has been updated.

Verify Root Resize via Exit and Restart

The user should Tab Twice to the Back option and hit Enter to exit the Advanced Menu, tab twice to the Finish option and hit Enter to exit the Character Based User Interface.

At this point, verification of the root slice resize can be done, first checking the existing size:

root@raspberrypi:/home/pi# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       3.5G  3.2G   96M  98% /

Force a restart of the embedded system:

root@raspberrypi:/home/pi# cd / ; sync ; init 6
Connection to raspberrypi closed by remote host.
Connection to raspberrypi closed.

Wait for Embedded System to become available:

macosx/user$ ping -c 1 raspberrypi 
PING raspberrypi.attlocal.net (192.168.1.94): 56 data bytes
64 bytes from 192.168.1.94: icmp_seq=0 ttl=64 time=1.558 ms

--- raspberrypi.attlocal.net ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 1.558/1.558/1.558/0.000 ms

Log back into system:

macosx/user$ ssh pi@raspberrypi
pi@raspberrypi's password: raspberry

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jan 24 05:48:43 2016

Note the larger available root space

pi@raspberrypi:~ $ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  3.2G   25G  12% /

The SD Card now has 29 Gigabytes of usable space.

[Chocolate Packaging, courtesy jayce-o.blogspot.com ]

Update Debian Packaging Repository

With extra storage, the packaging system repository should now be updated, as root.

pi@raspberrypi:~ $ sudo bash
root@raspberrypi:/home/pi# apt-get update
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_GB
Ign http://archive.raspberrypi.org jessie/main Translation-en  
Ign http://archive.raspberrypi.org jessie/ui Translation-en_GB
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_GB                                         
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_GB
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists... Done

The local package lists are now synchronized with remote Debian package lists.

Upgrade Debian Package Software

The Debian Package Software should now be upgraded as root. A 122 character wide terminal minimum is best for viewing. This may take some time.

root@raspberrypi:/home/pi# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apt apt-utils bind9-host ca-certificates claws-mail claws-mail-i18n dpkg dpkg-dev file fuse
  gir1.2-gdkpixbuf-2.0 git git-core git-man isc-dhcp-client isc-dhcp-common libapt-inst1.5 libapt-pkg4.12
  libbind9-90 libcupsfilters1 libdns-export100 libdns100 libdpkg-perl libfuse2 libgdk-pixbuf2.0-0
  libgdk-pixbuf2.0-common libirs-export91 libisc-export95 libisc95 libisccc90 libisccfg-export90 libisccfg90
  libjavascriptcoregtk-3.0-0 libldb1 liblwres90 libmagic1 libnspr4 libpam-modules libpam-modules-bin
  libpam-runtime libpam0g libpcre3 libpng12-0 libpng12-dev libsmbclient libssh-4 libssl1.0.0 libwbclient0
  libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libxml2 lxpanel lxpanel-data nodered openssh-client openssh-server
  openssh-sftp-server openssl perl perl-base perl-modules python-rpi.gpio python3-rpi.gpio rc-gui samba-common
  samba-libs sonic-pi ssh sudo tzdata wiringpi
71 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 94.6 MB of archives.
After this operation, 10.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspberrypi.org/debian/ jessie/main libwebkitgtk-3.0-common all 1:2.4.1-1rpi53rpi1g [462 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main dpkg armhf 1.17.26 [2,927 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ jessie/main perl armhf 5.20.2-3+deb8u2 [2,064 kB]            
Get:4 http://archive.raspberrypi.org/debian/ jessie/main libwebkitgtk-3.0-0 armhf 1:2.4.1-1rpi53rpi1g [5,212 kB]
Get:5 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-pkg4.12 armhf 1.0.9.8.2 [711 kB]          
Get:6 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt armhf 1.0.9.8.2 [1,067 kB]                   
Get:7 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpcre3 armhf 2:8.35-3.3+deb8u2 [300 kB]        
Get:8 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpam-modules armhf 1.1.8-3.1+deb8u1 [287 kB]   
Get:9 http://mirrordirector.raspbian.org/raspbian/ jessie/main libssl1.0.0 armhf 1.0.1k-3+deb8u2 [846 kB]       
Get:10 http://mirrordirector.raspbian.org/raspbian/ jessie/main libapt-inst1.5 armhf 1.0.9.8.2 [166 kB]         
Get:11 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpam0g armhf 1.1.8-3.1+deb8u1 [120 kB]        
Get:12 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpam-modules-bin armhf 1.1.8-3.1+deb8u1 [101 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian/ jessie/main file armhf 1:5.22+15-2+deb8u1 [60.0 kB]         
Get:14 http://mirrordirector.raspbian.org/raspbian/ jessie/main libmagic1 armhf 1:5.22+15-2+deb8u1 [244 kB]     
Get:15 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpng12-0 armhf 1.2.50-2+deb8u2 [161 kB]       
Get:16 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgdk-pixbuf2.0-0 armhf 2.31.1-2+deb8u4 [146 kB]
Get:17 http://mirrordirector.raspbian.org/raspbian/ jessie/main fuse armhf 2.9.3-15+deb8u2 [69.1 kB]            
Get:18 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccfg-export90 armhf 1:9.9.5.dfsg-9+deb8u5 [37.5 kB]
Get:19 http://mirrordirector.raspbian.org/raspbian/ jessie/main libfuse2 armhf 2.9.3-15+deb8u2 [123 kB]         
Get:20 http://mirrordirector.raspbian.org/raspbian/ jessie/main perl-base armhf 5.20.2-3+deb8u2 [1,097 kB]      
Get:21 http://mirrordirector.raspbian.org/raspbian/ jessie/main libsmbclient armhf 2:4.1.17+dfsg-2+deb8u1 [135 kB]
Get:22 http://archive.raspberrypi.org/debian/ jessie/main libjavascriptcoregtk-3.0-0 armhf 1:2.4.1-1rpi53rpi1g [1,716 kB]
Get:23 http://mirrordirector.raspbian.org/raspbian/ jessie/main libssh-4 armhf 0.6.3-4+deb8u1 [104 kB]          
Get:24 http://mirrordirector.raspbian.org/raspbian/ jessie/main samba-common all 2:4.1.17+dfsg-2+deb8u1 [255 kB]
Get:25 http://mirrordirector.raspbian.org/raspbian/ jessie/main perl-modules all 5.20.2-3+deb8u2 [2,545 kB]     
Get:26 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpam-runtime all 1.1.8-3.1+deb8u1 [213 kB]    
Get:27 http://mirrordirector.raspbian.org/raspbian/ jessie/main tzdata all 2015g-0+deb8u1 [184 kB]              
Get:28 http://mirrordirector.raspbian.org/raspbian/ jessie/main apt-utils armhf 1.0.9.8.2 [353 kB]              
Get:29 http://archive.raspberrypi.org/debian/ jessie/main lxpanel armhf 0.7.2-1+rpi4 [192 kB]                   
Get:30 http://archive.raspberrypi.org/debian/ jessie/main lxpanel-data all 0.7.2-1+rpi4 [1,065 kB]              
Get:31 http://mirrordirector.raspbian.org/raspbian/ jessie/main libxml2 armhf 2.9.1+dfsg1-5+deb8u1 [705 kB]     
Get:32 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdns100 armhf 1:9.9.5.dfsg-9+deb8u5 [598 kB]  
Get:33 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpng12-dev armhf 1.2.50-2+deb8u2 [237 kB]     
Get:34 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcupsfilters1 armhf 1.0.61-5+deb8u3 [97.9 kB] 
Get:35 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisc-export95 armhf 1:9.9.5.dfsg-9+deb8u5 [124 kB]
Get:36 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdns-export100 armhf 1:9.9.5.dfsg-9+deb8u5 [397 kB]
Get:37 http://archive.raspberrypi.org/debian/ jessie/main nodered armhf 0.12.5 [4,633 kB]                       
Get:38 http://mirrordirector.raspbian.org/raspbian/ jessie/main libgdk-pixbuf2.0-common all 2.31.1-2+deb8u4 [294 kB]
Get:39 http://mirrordirector.raspbian.org/raspbian/ jessie/main openssl armhf 1.0.1k-3+deb8u2 [664 kB]          
Get:40 http://mirrordirector.raspbian.org/raspbian/ jessie/main ca-certificates all 20141019+deb8u1 [204 kB]    
Get:41 http://mirrordirector.raspbian.org/raspbian/ jessie/main libirs-export91 armhf 1:9.9.5.dfsg-9+deb8u5 [36.1 kB]
Get:42 http://mirrordirector.raspbian.org/raspbian/ jessie/main libldb1 armhf 2:1.1.17-2+deb8u1 [89.9 kB]       
Get:43 http://mirrordirector.raspbian.org/raspbian/ jessie/main claws-mail armhf 3.11.1-3+deb8u1 [1,182 kB]     
Get:44 http://mirrordirector.raspbian.org/raspbian/ jessie/main libnspr4 armhf 2:4.10.7-1+deb8u1 [95.2 kB]      
Get:45 http://mirrordirector.raspbian.org/raspbian/ jessie/main libwbclient0 armhf 2:4.1.17+dfsg-2+deb8u1 [111 kB]
Get:46 http://mirrordirector.raspbian.org/raspbian/ jessie/main samba-libs armhf 2:4.1.17+dfsg-2+deb8u1 [3,628 kB]
Get:47 http://mirrordirector.raspbian.org/raspbian/ jessie/main git-core all 1:2.1.4-2.1+deb8u1 [1,486 B]               
Get:48 http://mirrordirector.raspbian.org/raspbian/ jessie/main openssh-sftp-server armhf 1:6.7p1-5+deb8u1 [33.1 kB]     
Get:49 http://mirrordirector.raspbian.org/raspbian/ jessie/main openssh-server armhf 1:6.7p1-5+deb8u1 [313 kB]           
Get:50 http://mirrordirector.raspbian.org/raspbian/ jessie/main openssh-client armhf 1:6.7p1-5+deb8u1 [621 kB]           
Get:51 http://mirrordirector.raspbian.org/raspbian/ jessie/main ssh all 1:6.7p1-5+deb8u1 [120 kB]                        
Get:52 http://mirrordirector.raspbian.org/raspbian/ jessie/main isc-dhcp-client armhf 4.3.1-6+deb8u2 [228 kB]            
Get:53 http://mirrordirector.raspbian.org/raspbian/ jessie/main isc-dhcp-common armhf 4.3.1-6+deb8u2 [193 kB]            
Get:54 http://mirrordirector.raspbian.org/raspbian/ jessie/main bind9-host armhf 1:9.9.5.dfsg-9+deb8u5 [65.1 kB]         
Get:55 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisc95 armhf 1:9.9.5.dfsg-9+deb8u5 [149 kB]            
Get:56 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccc90 armhf 1:9.9.5.dfsg-9+deb8u5 [33.9 kB]         
Get:57 http://mirrordirector.raspbian.org/raspbian/ jessie/main libisccfg90 armhf 1:9.9.5.dfsg-9+deb8u5 [49.8 kB]        
Get:58 http://mirrordirector.raspbian.org/raspbian/ jessie/main libbind9-90 armhf 1:9.9.5.dfsg-9+deb8u5 [40.7 kB]        
Get:59 http://mirrordirector.raspbian.org/raspbian/ jessie/main liblwres90 armhf 1:9.9.5.dfsg-9+deb8u5 [47.3 kB]         
Get:60 http://archive.raspberrypi.org/debian/ jessie/main python-rpi.gpio armhf 0.6.1-1 [23.1 kB]                        
Get:61 http://mirrordirector.raspbian.org/raspbian/ jessie/main claws-mail-i18n all 3.11.1-3+deb8u1 [1,329 kB]           
Get:62 http://archive.raspberrypi.org/debian/ jessie/main python3-rpi.gpio armhf 0.6.1-1 [23.0 kB]                       
Get:63 http://archive.raspberrypi.org/debian/ jessie/main rc-gui armhf 0.4-1 [21.6 kB]                                   
Get:64 http://archive.raspberrypi.org/debian/ jessie/main wiringpi armhf 2.31 [41.0 kB]                                  
Get:65 http://archive.raspberrypi.org/debian/ jessie/main sonic-pi armhf 1:2.9.0-1 [47.7 MB]                             
Get:66 http://mirrordirector.raspbian.org/raspbian/ jessie/main dpkg-dev all 1.17.26 [1,545 kB]                          
Get:67 http://mirrordirector.raspbian.org/raspbian/ jessie/main libdpkg-perl all 1.17.26 [1,072 kB]                      
Get:68 http://mirrordirector.raspbian.org/raspbian/ jessie/main gir1.2-gdkpixbuf-2.0 armhf 2.31.1-2+deb8u4 [16.7 kB]     
Get:69 http://mirrordirector.raspbian.org/raspbian/ jessie/main git-man all 1:2.1.4-2.1+deb8u1 [1,267 kB]                
Get:70 http://mirrordirector.raspbian.org/raspbian/ jessie/main git armhf 1:2.1.4-2.1+deb8u1 [2,727 kB]                  
Get:71 http://mirrordirector.raspbian.org/raspbian/ jessie/main sudo armhf 1.8.10p3-1+deb8u3 [830 kB]                    
Fetched 94.6 MB in 50s (1,861 kB/s)                                                                                      
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../dpkg_1.17.26_armhf.deb ...
Unpacking dpkg (1.17.26) over (1.17.25) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up dpkg (1.17.26) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../perl_5.20.2-3+deb8u2_armhf.deb ...
Unpacking perl (5.20.2-3+deb8u2) over (5.20.2-3+deb8u1) ...
Preparing to unpack .../perl-base_5.20.2-3+deb8u2_armhf.deb ...
Unpacking perl-base (5.20.2-3+deb8u2) over (5.20.2-3+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up perl-base (5.20.2-3+deb8u2) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../perl-modules_5.20.2-3+deb8u2_all.deb ...
Unpacking perl-modules (5.20.2-3+deb8u2) over (5.20.2-3+deb8u1) ...
Preparing to unpack .../libapt-pkg4.12_1.0.9.8.2_armhf.deb ...
Unpacking libapt-pkg4.12:armhf (1.0.9.8.2) over (1.0.9.8.1) ...
Setting up libapt-pkg4.12:armhf (1.0.9.8.2) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../apt_1.0.9.8.2_armhf.deb ...
Unpacking apt (1.0.9.8.2) over (1.0.9.8.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up apt (1.0.9.8.2) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../libpcre3_2%3a8.35-3.3+deb8u2_armhf.deb ...
Unpacking libpcre3:armhf (2:8.35-3.3+deb8u2) over (2:8.35-3.3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpcre3:armhf (2:8.35-3.3+deb8u2) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../libpam0g_1.1.8-3.1+deb8u1_armhf.deb ...
Unpacking libpam0g:armhf (1.1.8-3.1+deb8u1) over (1.1.8-3.1) ...
Setting up libpam0g:armhf (1.1.8-3.1+deb8u1) ...
Processing triggers for libc-bin (2.19-18+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../libpam-modules-bin_1.1.8-3.1+deb8u1_armhf.deb ...
Unpacking libpam-modules-bin (1.1.8-3.1+deb8u1) over (1.1.8-3.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpam-modules-bin (1.1.8-3.1+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../libpam-modules_1.1.8-3.1+deb8u1_armhf.deb ...
Unpacking libpam-modules:armhf (1.1.8-3.1+deb8u1) over (1.1.8-3.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpam-modules:armhf (1.1.8-3.1+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../libapt-inst1.5_1.0.9.8.2_armhf.deb ...
Unpacking libapt-inst1.5:armhf (1.0.9.8.2) over (1.0.9.8.1) ...
Preparing to unpack .../libssl1.0.0_1.0.1k-3+deb8u2_armhf.deb ...
Unpacking libssl1.0.0:armhf (1.0.1k-3+deb8u2) over (1.0.1k-3+deb8u1) ...
Preparing to unpack .../file_1%3a5.22+15-2+deb8u1_armhf.deb ...
Unpacking file (1:5.22+15-2+deb8u1) over (1:5.22+15-2) ...
Preparing to unpack .../libmagic1_1%3a5.22+15-2+deb8u1_armhf.deb ...
Unpacking libmagic1:armhf (1:5.22+15-2+deb8u1) over (1:5.22+15-2) ...
Preparing to unpack .../libxml2_2.9.1+dfsg1-5+deb8u1_armhf.deb ...
Unpacking libxml2:armhf (2.9.1+dfsg1-5+deb8u1) over (2.9.1+dfsg1-5) ...
Preparing to unpack .../libpng12-dev_1.2.50-2+deb8u2_armhf.deb ...
Unpacking libpng12-dev:armhf (1.2.50-2+deb8u2) over (1.2.50-2+deb8u1) ...
Preparing to unpack .../libpng12-0_1.2.50-2+deb8u2_armhf.deb ...
Unpacking libpng12-0:armhf (1.2.50-2+deb8u2) over (1.2.50-2+deb8u1) ...
Preparing to unpack .../libcupsfilters1_1.0.61-5+deb8u3_armhf.deb ...
Unpacking libcupsfilters1:armhf (1.0.61-5+deb8u3) over (1.0.61-5+deb8u1) ...
Preparing to unpack .../libisc-export95_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libisc-export95 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libdns-export100_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libdns-export100 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../fuse_2.9.3-15+deb8u2_armhf.deb ...
Unpacking fuse (2.9.3-15+deb8u2) over (2.9.3-15+deb8u1) ...
Preparing to unpack .../libfuse2_2.9.3-15+deb8u2_armhf.deb ...
Unpacking libfuse2:armhf (2.9.3-15+deb8u2) over (2.9.3-15+deb8u1) ...
Preparing to unpack .../libgdk-pixbuf2.0-0_2.31.1-2+deb8u4_armhf.deb ...
Unpacking libgdk-pixbuf2.0-0:armhf (2.31.1-2+deb8u4) over (2.31.1-2+deb8u3) ...
Preparing to unpack .../libgdk-pixbuf2.0-common_2.31.1-2+deb8u4_all.deb ...
Unpacking libgdk-pixbuf2.0-common (2.31.1-2+deb8u4) over (2.31.1-2+deb8u3) ...
Preparing to unpack .../libisccfg-export90_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libisccfg-export90 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libirs-export91_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libirs-export91 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libwebkitgtk-3.0-common_1%3a2.4.1-1rpi53rpi1g_all.deb ...
Unpacking libwebkitgtk-3.0-common (1:2.4.1-1rpi53rpi1g) over (1:2.4.1-1rpi52rpi1g) ...
Preparing to unpack .../libwebkitgtk-3.0-0_1%3a2.4.1-1rpi53rpi1g_armhf.deb …
Unpacking libwebkitgtk-3.0-0:armhf (1:2.4.1-1rpi53rpi1g) over (1:2.4.1-1rpi52rpi1g) ...
Preparing to unpack .../libjavascriptcoregtk-3.0-0_1%3a2.4.1-1rpi53rpi1g_armhf.deb ...
Unpacking libjavascriptcoregtk-3.0-0:armhf (1:2.4.1-1rpi53rpi1g) over (1:2.4.1-1rpi52rpi1g) ...
Preparing to unpack .../libldb1_2%3a1.1.17-2+deb8u1_armhf.deb ...
Unpacking libldb1:armhf (2:1.1.17-2+deb8u1) over (2:1.1.17-2) ...
Preparing to unpack .../libnspr4_2%3a4.10.7-1+deb8u1_armhf.deb ...
Unpacking libnspr4:armhf (2:4.10.7-1+deb8u1) over (2:4.10.7-1) ...
Preparing to unpack .../libwbclient0_2%3a4.1.17+dfsg-2+deb8u1_armhf.deb ...
Unpacking libwbclient0:armhf (2:4.1.17+dfsg-2+deb8u1) over (2:4.1.17+dfsg-2) ...
Preparing to unpack .../libsmbclient_2%3a4.1.17+dfsg-2+deb8u1_armhf.deb ...
Unpacking libsmbclient:armhf (2:4.1.17+dfsg-2+deb8u1) over (2:4.1.17+dfsg-2) ...
Preparing to unpack .../samba-libs_2%3a4.1.17+dfsg-2+deb8u1_armhf.deb ...
Unpacking samba-libs:armhf (2:4.1.17+dfsg-2+deb8u1) over (2:4.1.17+dfsg-2) ...
Preparing to unpack .../libssh-4_0.6.3-4+deb8u1_armhf.deb ...
Unpacking libssh-4:armhf (0.6.3-4+deb8u1) over (0.6.3-4) ...
Preparing to unpack .../samba-common_2%3a4.1.17+dfsg-2+deb8u1_all.deb ...
Unpacking samba-common (2:4.1.17+dfsg-2+deb8u1) over (2:4.1.17+dfsg-2) ...
Preparing to unpack .../openssh-sftp-server_1%3a6.7p1-5+deb8u1_armhf.deb ...
Unpacking openssh-sftp-server (1:6.7p1-5+deb8u1) over (1:6.7p1-5) ...
Preparing to unpack .../libpam-runtime_1.1.8-3.1+deb8u1_all.deb ...
Unpacking libpam-runtime (1.1.8-3.1+deb8u1) over (1.1.8-3.1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up libpam-runtime (1.1.8-3.1+deb8u1) ...
(Reading database ... 123535 files and directories currently installed.)
Preparing to unpack .../openssh-server_1%3a6.7p1-5+deb8u1_armhf.deb ...
Unpacking openssh-server (1:6.7p1-5+deb8u1) over (1:6.7p1-5) ...
Preparing to unpack .../openssh-client_1%3a6.7p1-5+deb8u1_armhf.deb ...
Unpacking openssh-client (1:6.7p1-5+deb8u1) over (1:6.7p1-5) ...
Preparing to unpack .../ssh_1%3a6.7p1-5+deb8u1_all.deb ...
Unpacking ssh (1:6.7p1-5+deb8u1) over (1:6.7p1-5) ...
Preparing to unpack .../tzdata_2015g-0+deb8u1_all.deb ...
Unpacking tzdata (2015g-0+deb8u1) over (2015f-0+deb8u1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u2) ...
Setting up tzdata (2015g-0+deb8u1) ...

Current default time zone: 'Etc/UTC'
Local time is now:      Sun Jan 24 06:11:10 UTC 2016.
Universal Time is now:  Sun Jan 24 06:11:10 UTC 2016.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

(Reading database ... 123538 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.0.9.8.2_armhf.deb ...
Unpacking apt-utils (1.0.9.8.2) over (1.0.9.8.1) ...
Preparing to unpack .../isc-dhcp-client_4.3.1-6+deb8u2_armhf.deb ...
Unpacking isc-dhcp-client (4.3.1-6+deb8u2) over (4.3.1-6) ...
Preparing to unpack .../isc-dhcp-common_4.3.1-6+deb8u2_armhf.deb ...
Unpacking isc-dhcp-common (4.3.1-6+deb8u2) over (4.3.1-6) ...
Preparing to unpack .../bind9-host_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking bind9-host (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libisc95_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libisc95 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libdns100_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libdns100 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libisccc90_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libisccc90 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libisccfg90_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libisccfg90 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../libbind9-90_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking libbind9-90 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../liblwres90_1%3a9.9.5.dfsg-9+deb8u5_armhf.deb ...
Unpacking liblwres90 (1:9.9.5.dfsg-9+deb8u5) over (1:9.9.5.dfsg-9+deb8u3) ...
Preparing to unpack .../openssl_1.0.1k-3+deb8u2_armhf.deb ...
Unpacking openssl (1.0.1k-3+deb8u2) over (1.0.1k-3+deb8u1) ...
Preparing to unpack .../ca-certificates_20141019+deb8u1_all.deb ...
Unpacking ca-certificates (20141019+deb8u1) over (20141019) ...
Preparing to unpack .../claws-mail_3.11.1-3+deb8u1_armhf.deb ...
Unpacking claws-mail (3.11.1-3+deb8u1) over (3.11.1-3) ...
Preparing to unpack .../claws-mail-i18n_3.11.1-3+deb8u1_all.deb ...
Unpacking claws-mail-i18n (3.11.1-3+deb8u1) over (3.11.1-3) ...
Preparing to unpack .../dpkg-dev_1.17.26_all.deb ...
Unpacking dpkg-dev (1.17.26) over (1.17.25) ...
Preparing to unpack .../libdpkg-perl_1.17.26_all.deb ...
Unpacking libdpkg-perl (1.17.26) over (1.17.25) ...
Preparing to unpack .../gir1.2-gdkpixbuf-2.0_2.31.1-2+deb8u4_armhf.deb ...
Unpacking gir1.2-gdkpixbuf-2.0 (2.31.1-2+deb8u4) over (2.31.1-2+deb8u3) ...
Preparing to unpack .../git-man_1%3a2.1.4-2.1+deb8u1_all.deb ...
Unpacking git-man (1:2.1.4-2.1+deb8u1) over (1:2.1.4-2.1) ...
Preparing to unpack .../git_1%3a2.1.4-2.1+deb8u1_armhf.deb ...
Unpacking git (1:2.1.4-2.1+deb8u1) over (1:2.1.4-2.1) ...
Preparing to unpack .../git-core_1%3a2.1.4-2.1+deb8u1_all.deb ...
Unpacking git-core (1:2.1.4-2.1+deb8u1) over (1:2.1.4-2.1) ...
Preparing to unpack .../lxpanel_0.7.2-1+rpi4_armhf.deb ...
Unpacking lxpanel (0.7.2-1+rpi4) over (0.7.2-1+rpi3) ...
Preparing to unpack .../lxpanel-data_0.7.2-1+rpi4_all.deb ...
Unpacking lxpanel-data (0.7.2-1+rpi4) over (0.7.2-1+rpi3) ...
Preparing to unpack .../nodered_0.12.5_armhf.deb ...
Unpacking nodered (0.12.5) over (0.12.1) ...
Preparing to unpack .../python-rpi.gpio_0.6.1-1_armhf.deb ...
Unpacking python-rpi.gpio (0.6.1-1) over (0.6.0a3-1) ...
Preparing to unpack .../python3-rpi.gpio_0.6.1-1_armhf.deb ...
Unpacking python3-rpi.gpio (0.6.1-1) over (0.6.0a3-1) ...
Preparing to unpack .../rc-gui_0.4-1_armhf.deb ...
Unpacking rc-gui (0.4-1) over (0.3-2) ...
Preparing to unpack .../sudo_1.8.10p3-1+deb8u3_armhf.deb ...
Unpacking sudo (1.8.10p3-1+deb8u3) over (1.8.10p3-1+deb8u2) ...
Preparing to unpack .../wiringpi_2.31_armhf.deb ...
Unpacking wiringpi (2.31) over (2.24) ...
Preparing to unpack .../sonic-pi_1%3a2.9.0-1_armhf.deb ...
Unpacking sonic-pi (1:2.9.0-1) over (1:2.7.0-1) ...

The packages should have all been brought up to date.

[Clock Image, Courtesy time-clocks-uk.blogspot.com ]

What time is it?

The hardware does not contain a real-time clock, so it must be connected to a network to sync time. By default, time is enabled with Raspbian after reboot.

pi@raspberrypi:~ $ date
Sun 31 Jan 04:33:59 UTC 2016

The default time servers are below:

pi@raspberrypi:~ $ grep ^server /etc/ntp.conf
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst

These values can be set to a local time server, through a full screen character editor, such as "vi".

If the user does not live in GMT, a more reasonable timezone can be selected via a menu.

root@raspberrypi:/home/pi# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
 1) Africa
 2) Americas
 3) Antarctica
 4) Arctic Ocean
 5) Asia
 6) Atlantic Ocean
 7) Australia
 8) Europe
 9) Indian Ocean
10) Pacific Ocean
11) coord - I want to use geographical coordinates.
12) TZ - I want to specify the time zone using the Posix TZ format.
#? 2
Please select a country whose clocks agree with yours.
 1) Anguilla     28) Haiti
 2) Antigua & Barbuda     29) Honduras
 3) Argentina     30) Jamaica
 4) Aruba     31) Martinique
 5) Bahamas     32) Mexico
 6) Barbados     33) Montserrat
 7) Belize     34) Nicaragua
 8) Bolivia     35) Panama
 9) Brazil     36) Paraguay
10) Canada     37) Peru
11) Caribbean Netherlands    38) Puerto Rico
12) Cayman Islands     39) St Barthelemy
13) Chile     40) St Kitts & Nevis
14) Colombia     41) St Lucia
15) Costa Rica     42) St Maarten (Dutch part)
16) Cuba     43) St Martin (French part)
17) Curacao     44) St Pierre & Miquelon
18) Dominica     45) St Vincent
19) Dominican Republic     46) Suriname
20) Ecuador     47) Trinidad & Tobago
21) El Salvador     48) Turks & Caicos Is
22) French Guiana     49) United States
23) Greenland     50) Uruguay
24) Grenada     51) Venezuela
25) Guadeloupe     52) Virgin Islands (UK)
26) Guatemala     53) Virgin Islands (US)
27) Guyana
#? 49
Please select one of the following time zone regions.
 1) Eastern Time
 2) Eastern Time - Michigan - most locations
 3) Eastern Time - Kentucky - Louisville area
 4) Eastern Time - Kentucky - Wayne County
 5) Eastern Time - Indiana - most locations
 6) Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
 7) Eastern Time - Indiana - Pulaski County
 8) Eastern Time - Indiana - Crawford County
 9) Eastern Time - Indiana - Pike County
10) Eastern Time - Indiana - Switzerland County
11) Central Time
12) Central Time - Indiana - Perry County
13) Central Time - Indiana - Starke County
14) Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
15) Central Time - North Dakota - Oliver County
16) Central Time - North Dakota - Morton County (except Mandan area)
17) Central Time - North Dakota - Mercer County
18) Mountain Time
19) Mountain Time - south Idaho & east Oregon
20) Mountain Standard Time - Arizona (except Navajo)
21) Pacific Time
22) Pacific Standard Time - Annette Island, Alaska
23) Alaska Time
24) Alaska Time - Alaska panhandle
25) Alaska Time - southeast Alaska panhandle
26) Alaska Time - Alaska panhandle neck
27) Alaska Time - west Alaska
28) Aleutian Islands
29) Hawaii
#? 1

The following information has been given:

United States
Eastern Time

Therefore TZ='America/New_York' will be used.
Local time is now: Sat Jan 30 23:50:59 EST 2016.
Universal Time is now: Sun Jan 31 04:50:59 UTC 2016.
Is the above information OK?
1) Yes
2) No
#? 1

You can make this change permanent for yourself by appending the line
TZ='America/New_York'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
America/New_York

If this is annoying all users, it can be added to the system's global profile.

root@raspberrypi:/home/pi# echo "TZ='America/New_York'; export TZ" >>/etc/profile
root@raspberrypi:/home/pi# tail /etc/profile

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi
TZ='America/New_York'; export TZ

Note, at the end of the global profile, the timezone is now set for all users.

Logging out and logging in will show the new timezone.
root@raspberrypi:/home/pi# exit
exit

pi@raspberrypi:~ $ exit
logout
Connection to raspberrypi closed.

macosx/user$ ssh pi@raspberrypi
pi@raspberrypi's password: 

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jan 31 04:23:36 2016 from unknown001cb3b2a5ec

pi@raspberrypi:~ $ date
Sat 30 Jan 23:58:51 EST 2016

The system time should be reasonably reliable and accurate for a user on a network.

Shutdown

Before powering down the unit, ensure the cache has been written to the SD Card before shutdown.
pi@raspberrypi:~ $ sudo bash
root@raspberrypi:/home/pi# cd / ; sync ; init 0
Connection to raspberrypi closed by remote host.
Connection to raspberrypi closed.

Once blinking activity has ended, the micro USB Power Cable can be safely removed.

What about Network Management?

There are many tools available on the Raspberry Pi for basic Network Management. A UNIX operating system would be more secure & stable prior embarking on mission critical work, but we have to work with what we have. Before using the platform, the platform should have username, password, and embedded system name changed. Such items will exist in future articles. 









1 comment:

  1. Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.

    seo company in india

    ReplyDelete