Raspberry Pi: Starting to understand.

Source: Internet
Author: User
Tags raspi

Vamei Source: Http://www.cnblogs.com/vamei prohibited any form of reprint.

The Raspberry Pi is an ultra-small computer with a credit card size, developed by the Raspberry Pi Foundation of the Rotten Country (UK). Thanks to its ultra-small size, Raspberry Pi has been popular worldwide since its release in 2012. Although the Raspberry Pi is small, it is a fully functional computer. After you connect the monitor, mouse, and keyboard, you can use the Raspberry Pi as you would with a typical desktop. For Raspberry Pi, there is also a built-in WiFi and Bluetooth wireless support that makes it easier to connect wirelessly. In many of the hardware innovation projects, you can see the Raspberry Pi figure. In a series of articles, I will describe the basic uses of the Raspberry Pi.

Interface Introduction

is a Raspberry Pi 3. As you can see, it provides a rich interface.

On the far right, the Raspberry Pi provides 4 USB ports and one Ethernet port. The lower side, in addition to the power connector, the HDMI output and audio port connected to the monitor, also has an outlet for connecting the dedicated camera. It is important to note that the Raspberry Pi will only output to the HDMI port when the display device is checked at boot time, so the monitor must be connected to the HDMI interface before booting. On the left, there is a display of the line port. Given the wide use of HDMI, the outlet is not very high. Below the left is a Micro SD card socket. This SD card replaces the hard drive in the normal computer. The upper side of the Raspberry Pi also has a row of pins that form the Universal Programming Interface (GPIO). Gpio can be used for the underlying connection with many original hardware peripherals.

system Installation and startup

The Raspberry Pi is just hardware, and we need software to get the Raspberry Pi to run. The most basic software on the Raspberry Pi is its operating system. Raspberry Pi uses a Linux system. Because the Raspberry Pi uses a micro SD card as its storage space, the operating system is also installed on this SD card. The Raspberry Pi website provides a Raspbian image file that can be used to insert the SD card into the Raspberry Pi just by burning the image file onto the SD card. Raspbian inherits from a version of Linux--debian, so most aspects are similar to the Debian version of Linux.

Operating interface of the Raspbian system

We need a computer to burn the SD card. If your computer is a UNIX system, such as Linux and Mac OSX, we can use ready-made tools to create an operating system for Raspberry Pi. After inserting the SD card into the card slot of the computer, we first need to find the path of the SD card mount.

If you are under Mac OSX, enter the following command to list all the storage devices that are mounted:

Diskutil List

Locate the device that corresponds to the SD card size, and note its path, such as/DEV/DISK3. If it is a Linux system, then you can use the following command to find the path:

sudo fdisk-l

The image file can then be written to the SD card using the common DD tool under the UNIX system:

sudo DD if=/dev/disk3 of=./raspian.dmg

Under Windows, there are ready-made graphical software to complete the above image-burning work, such as the Win32diskimager recommended by the Raspberry Pi website. The entire operation is simpler than the UNIX system and is not mentioned here.

Once the write is complete, insert the SD card into the Raspberry Pi slot and connect the Raspberry Pi power source to the screen to see the Raspberry Pi splash screen.

After the boot is complete, you can enter into the Rapbian's graphical desktop. The default user name is pi, no password. You can set the password for the PI user in the terminal:

sudo passwd Pi

Common initialization Settings

1) Expand the file system

The first Raspbian image is only 4 G. This means that your Raspberry Pi will only use 4G of space on the SD card. If the SD card is 16G in size, then it wastes 12G of space. To do this, we can extend the Raspbian file system to the entire SD card. You can enter the Raspberry Pi's graphical settings page settings. In Terminal input:

sudo raspi-config

Then work in a graphical page:

Alternatively, you can use a full line of commands instead of a graphical operation to extend the Raspbian to the entire SD card:

sudo raspi-config--expand-rootfs

2) Set locale

When you open a terminal, the terminal may remind you that the locale is not set. On the Settings page, select Locale under the "I1 Change locale" page of "5 internationalisation Options". If you do not use a graphical interface, you can also manually set it by modifying/etc/default/locale. Append to the end of the file:

LANG=EN_GB. UTF-8LC_ALL=EN_GB. UTF-8LANGUAGE=EN_GB. UTF-8

3) Keyboard layout

After you have attached a keyboard to the Raspberry Pi, you may find that the keyboard and input characters do not correspond. This time you need to change the keyboard layout to American layout. On the Settings page, select under "5 Internationalisation Options", "I3 Change Keyboard Layout" page.

The keyboard layout can also be modified manually by editing the configuration file. In file ... Find the line in the Xkblayout, modified to:

Xkblayout= "US"

4) Update firmware

There are a lot of hardware on the Raspberry Pi, such as WiFi adapter, Bluetooth adapter and so on. These hardware are supported by specific firmware. Sometimes the Raspberry Pi is installed with older firmware, which may cause some problems. To do this, you can update the firmware from the command line:

sudo rpi-update

software upgrade and installation

The Debian system has its own software distribution mechanism. You can find the software you need from the software server (software source) and download the installation. Most of the operations can be done by using the Apt-get command on the command line. Raspbian the same mechanism.

Update the software source to get the latest software list:

sudo apt-get update

To upgrade installed software:

sudo apt-get upgrade

Install the software, such as MySQL:

sudo install MySQL

This article describes the basic boot settings for the Raspberry Pi, and summarizes some of the minor problems with initialization. Hopefully, this will help you get started on your Raspberry Pi journey more smoothly.

Welcome to the article "riding the Penguin picking raspberries" series

Raspberry Pi: Starting to understand.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.