Getting Started With Raspberry Pi, 4th Edition (Make).pdf

(26948 KB) Pobierz
Getting
Started with
Raspberry Pi
4th Edition
Getting to Know the Inexpensive
ARM-Powered Linux Computer
Matt Richardson, Shawn Wallace, and Wolfram Donat
Getting
Started with
Raspberry Pi
4TH EDITION
Getting to Know the
Inexpensive ARM-Powered
Linux Computer
Matt Richardson, Shawn Wallace,
and Wolfram Donat
Getting Started with Raspberry Pi, 4th Edition
by Matt Richardson, Shawn Wallace, and Wolfram Donat
Copyright
©
2021 Matt Richardson, Shawn Wallace, and Wolfram Donat
Printed in the USA
Published by Make Community, LLC
150 Todd Road, Suite 100, Santa Rosa, CA 95407
Make:
books may be purchased for educational, business, or sales promotional use.
Online editions are also available for most titles.
For more information, contact our corporate/institutional sales department:
800-998-9938
Publisher:
Dale Dougherty
Editor:
Patrick DiJusto, Michelle Lowman
Copy Editor:
Craig Couden
Interior Designer:
David Futato
Cover Designer:
Juliann Brown
Illustrator:
Rebecca Demarest
December 2012: First Edition
October 2014: Second Edition
July 2016: Third Edition
September 2021: Fourth Edition
Revision History for the Fourth Edition: 10/29/2021
See
www.oreilly.com/catalog/errata.csp?isbn=9781680456998
for release details.
Make:,
Maker Shed, and Maker Faire are registered trademarks of Make Community, LLC.
The Make: Community logo is a trademark of Make Community, LLC.
Getting Started
with Raspberry Pi
and related trade dress are trademarks of Make Community, LLC.
Many of the designations used by manufacturers and sellers to distinguish their products
are claimed as trademarks. Where those designations appear in this book, and Make
Community, LLC was aware of a trademark claim, the designations have been printed
in caps or initial caps. While the publisher and the authors have made good faith efforts
to ensure that the information and instructions contained in this work are accurate,
the publisher and the authors disclaim all responsibility for errors or omissions, including
without limitation responsibility for damages resulting from the use of or reliance
on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes are subject
to open source licenses or the intellectual property rights of others, it is your responsibility
to ensure that your use thereof complies with such licenses and/or rights.
978-1-680-45699-8
O’Reilly Online Learning
For more than 40 years,
www.oreilly.com
has provided technology and business training,
knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise
through books, articles, conferences, and our online learning platform. O’Reilly’s online
learning platform gives you on-demand access to live training courses, in-depth learning
paths, interactive coding environments, and a vast collection of text and video from
O’Reilly and 200+ other publishers. For more information, please visit
www.oreilly.com
How to Contact Us:
Please address comments and questions concerning this book to the publisher:
Make: Community
150 Todd Road, Suite 100, Santa Rosa, CA 95407
Make: Community is a growing, global association of makers who are shaping the future
of education and democratizing innovation. Through
Make:
magazine, and 200+ annual
Maker Faires,
Make:
books, and more, we share the know-how of makers and promote
the practice of making in schools, libraries and homes.
You can send comments and questions to us by email at
books@make.co.
To learn more about
Make:
visit us at
make.co.
Contents
What They’re Saying. .................................................................................................. vii
Preface. .......................................................................................................................... ix
1/Getting Up and Running ............................................................................................1
A Tour of the Boards ..........................................................................................................
2
The Proper Peripherals .....................................................................................................
8
The Case ..........................................................................................................................13
Choose Your Distribution ................................................................................................15
Flash the SD Card............................................................................................................15
For Advanced Users: Create Your Own Disk Image................................................16
Booting Up .......................................................................................................................17
Configuring Your Pi ..........................................................................................................17
Getting Online..................................................................................................................22
Shutting Down .................................................................................................................24
Running Headless ....................................................................................................24
Troubleshooting...............................................................................................................25
Going Further...................................................................................................................26
2/Getting Around Linux on the Raspberry Pi...........................................................27
Using the Command Line ...............................................................................................31
Files and the File system..........................................................................................32
More Linux Commands ..................................................................................................37
Processes ..................................................................................................................39
Sudo and Permissions .............................................................................................41
The Network .............................................................................................................43
/etc ...................................................................................................................................44
Setting the Date and Time ..............................................................................................44
Installing New Software ..................................................................................................45
Sound in Linux .................................................................................................................46
Upgrading Your Firmware ...............................................................................................46
Going Further...................................................................................................................47
iv Contents
Zgłoś jeśli naruszono regulamin