Linux for Makers, 1st Edition

Book description

Linux is a powerful open-source operating system that has been around for many years and is widely used for running servers and websites. But most students and Makers encounter it for the first time when they are working on projects with their Raspberry Pi or similar single-board computers (SBCs) such as BeagleBone Black or Intel Galileo. Linux for Makers is the first book that explains the Linux operating system specifically for Makers, as opposed to programmers and administrators. By gaining a deeper understanding of Linux, Makers can add another useful tool to their kit that will help them build their projects more easily.

Written with the Maker in mind, this book will focus mostly on Rasbian running on the Raspberry Pi as it is the most prolific in the ecosystem today. However most of the topics covered will apply broadly to other Linux distributions and will be called out when they may differ. Many times users cut and paste from a website tutorial into the Linux command line without understanding what they are actually doing only to be frustrated when they want to modify or tweak something to suit their needs. Also, many Makers shy away from using the Raspberry Pi or similar board because they feel Linux is too foreign and they think using a command line will be more difficult than using a GUI. This book aims to overcome those fears and provide a foundation for further learning and exploration. To that end, this book will focus on the basic principles that a Maker would need to know as opposed to other resources that go into detail that is not particularly relevant to building projects.

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Conventions Used in This Book
    2. O’Reilly Safari
    3. How to Contact Us
    4. Acknowledgments
  2. 1. Getting Started
    1. Choosing and Downloading a Disk Image
    2. Uncompressing the Disk Image
      1. Windows
      2. MacOS
      3. Linux
    3. Writing the Disk Image to the SD Card
    4. Windows
      1. MacOS
      2. Linux
    5. Booting the Raspberry Pi for the First Time
      1. Expanding the Filesystem
      2. Changing the Localization Options
      3. Changing the Default Password
    6. Why This Matters for Makers
  3. 2. Linux Principles
    1. The Linux Desktop
    2. The Terminal or Console
    3. The Shell in a Nutshell
      1. Try It for Yourself
    4. Filesystems and Structures
      1. Try It for Yourself
    5. Users and Groups
    6. Permissions and sudo
      1. Try It for Yourself
      2. Try It for Yourself
    7. Services
      1. Try It for Yourself
    8. Processes
      1. Try It for Yourself
    9. Why This Matters for Makers
  4. 3. Using the Desktop
    1. When to Use the Desktop?
    2. When Not to Use the Desktop?
    3. Understanding the Layout
    4. Connecting to the Network
    5. Changing the Look and Feel
      1. Changing the Panel Location
      2. Changing the Background Image
      3. Changing the Shortcuts in the Application Launch Bar
      4. Creating a Desktop Shortcut
    6. Why This Matters for Makers
  5. 4. Command-Line Basics
    1. Understanding the Prompt
      1. Try It for Yourself
    2. Orienting Yourself in the Filesystem
      1. Where Am I?: pwd
      2. Changing the Working Directory: cd
      3. Printing Out the Contents of a Directory: ls
      4. Creating New Files and Directories: mkdir and touch
      5. Moving and Deleting Files: cp, mv, and rm
      6. Try It for Yourself
    3. Get Help with a Command: help, man, and info
      1. Try It for Yourself
    4. Eliminate Some Typing
      1. Auto-Complete a Command: Tab
      2. Search for a Previous Command: Up, Ctrl-R
      3. Try It for Yourself
    5. Connecting to the Network via the Command Line
      1. The Interfaces File
      2. Wired Ethernet
      3. Static IP Address
      4. WiFi
      5. More Secure WiFi with Multiple Networks
    6. Installing Software: apt
      1. Using apt-get update
      2. Using apt-get upgrade
      3. Using apt-cache
      4. Using apt-get install
      5. apt-get remove
      6. apt-get dist-upgrade
      7. Fixing Conflicts
      8. Try It for Yourself
    7. Rebooting and Shutting Down
    8. Why This Matters for Makers
  6. 5. Headless Operation
    1. Turning Off the Desktop
    2. Finding Your System on the Network
      1. Raspberry Pi
      2. Router
      3. Android/iPhone
    3. Command-Line Access: ssh
      1. Windows
      2. MacOS
      3. Linux
      4. Android/iPhone
    4. Remote Desktops: vnc
      1. Setting Up the Raspberry Pi
      2. Windows
      3. MacOS
      4. Linux
      5. Android/iPhone
    5. Transferring Files: scp, sftp
      1. Windows
      2. MacOS
      3. Linux
      4. From the Command Line: MacOS and Linux
    6. Why This Matters for Makers
  7. 6. Tips and Tricks
    1. Changing Your Hostname
    2. Starting a Script on Bootup: rc.local
      1. Try It for Yourself
    3. Aliases
      1. Try It for Yourself
      2. Checking Disk and File Space Usage: df, du
    4. Performance Monitoring: top
      1. Try It for Yourself
    5. Killing a Process: Ctrl-C, ps, kill
    6. Stop, Background, and Foreground Jobs: Ctrl-Z, &, fg
      1. Try It for Yourself
    7. Finding USB Devices: lsusb
    8. Logging the Output of a Script: >, >>
    9. Searching the Output of a Command: grep
      1. Monitoring a Log File: tail
    10. Adding a User: adduser, addgroup
      1. Changing File Ownership and Permissions: chown, chmod
    11. Running More Than One Command at the Same Time: &&, ||
    12. Opening Another Console Session
    13. Dealing with Long Commands
    14. Scheduling Jobs: cron
    15. Why This Matters for Makers
  8. 7. Controlling the Physical World
    1. GPIO
      1. I²C and SPI
      2. Talking to Arduino
    2. Why This Matters for Makers
  9. 8. Using Multimedia
    1. Choosing HDMI or Analog
    2. Playing Audio and Video Files
    3. Controlling the Volume
    4. Playing Media from a Script
    5. Why This Matters for Makers
  10. 9. Accessing Cloud Services
    1. Cloud Storage Services from the Command Line
    2. IFTTT
      1. Try It for Yourself
    3. Run a Dedicated Web Server
      1. Installation
      2. Configuration for Python
      3. Test It Out
    4. Roll Your Own
      1. Nimbus
      2. Tonido
    5. Why This Matters for Makers
  11. 10. Virtual Raspberry Pi
    1. Requirements
    2. Installation
    3. Usage
    4. Why This Matters for Makers
  12. A. Linux Background
    1. Brief History of the Original Maker Operating System
      1. Try It for Yourself
    2. Linus Torvalds
    3. The Linux Kernel
    4. Distributions
      1. Try It for Yourself
    5. How Open Source Software Works
    6. Single-Board Computers Versus Microcontrollers
    7. Why This Matters for Makers
  13. Index

Product information

  • Title: Linux for Makers, 1st Edition
  • Author(s): Aaron Newcomb
  • Release date: April 2017
  • Publisher(s): Make: Community
  • ISBN: 9781680451832