Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi for Secret Agents

You're reading from   Raspberry Pi for Secret Agents Turn your Raspberry Pi into your very own secret agent toolbox with this set of exciting projects! 

Arrow left icon
Product type Paperback
Published in Apr 2013
Publisher Packt
ISBN-13 9781849695787
Length 152 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Stefan Sjogelid Stefan Sjogelid
Author Profile Icon Stefan Sjogelid
Stefan Sjogelid
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Raspberry Pi for Secret Agents
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Up to No Good FREE CHAPTER 2. Audio Antics 3. Webcam and Video Wizardry 4. Wi-Fi Pranks – Exploring your Network 5. Taking your Pi Off-road Index

Booting up and configuring Raspbian


All right, you've been patient long enough; it's time we take your Pi out for a spin! For this first voyage, it is recommended that you go easy on the peripherals until we have properly configured the Pi and verified a basic stable operation. Connect a USB keyboard, a monitor or TV, and a Wi-Fi dongle or an Ethernet cable plugged into your home router. Finally, insert your SD card and attach the power cable.

Within seconds you should see text scroll by on your display. Those are status messages from the booting Linux kernel.

Raspi-config application running on first boot

The output will come to a halt in a minute and you'll be presented with a menu-type application called Raspi-config. Use your arrow keys to navigate and press the Enter key to select menu options.

  • expand_rootfs: This important option will resize the filesystem to fit the storage capacity of your SD card. You'll want to do this once, or you'll soon run out of disk space! The filesystem will be resized the next time you boot the Pi.

  • overscan: If you see thick black borders around the blue background on your monitor, select this option and disable to make them go away the next time you boot the Pi.

  • configure_keyboard: Select this option to reconfigure your keyboard. Usually there is no need to do this unless some keys on your keyboard are not working properly.

  • change_pass: Select this option to change the password for the default user pi. This is strongly recommended. Just in case you forget, the default password is raspberry.

  • change_locale: This option allows you to add non-English languages to the system. You can also select what language the applications should display by default.

  • change_timezone: It's important that you set the correct time zone, because any scheduling we do in the later chapters depends on this. It's also nice to have the correct time in logfiles.

  • memory_split: This option lets you change how much of your Pi's memory the Graphics Processing Unit (GPU) is allowed to use. To play HD movies or output fancy graphics, the GPU needs 64–128 MB of the RAM. Since we'll use the Pi mostly for recording, you can leave this at the default 64 MB of RAM.

  • overclock: This option allows you to add some turbo boost to the Pi. Only experiment with overclocking once you have established that your system runs stable at default speed. Also note that while overclocking will not void the warranty of the Pi, it could reduce its lifetime.

  • ssh: Select this option to enable or disable the Secure Shell service. SSH is a very important part of our setup and allows us to login remotely to the Pi from another computer. It is active and enabled by default, so leave this option alone for now.

  • boot_behaviour: This option allows you to change whether the graphical desktop environment should be started automatically each time you boot the Pi. Since we will mostly work on the command line in this book, it's recommended that you leave this option as is.

  • update: This option will try to upgrade the Raspi-config application itself to the latest version. You can leave this option alone for now as we will make sure all the software is up-to-date later in this chapter.

Once you're happy with the configuration, select Finish and Yes to reboot the Pi. After the Linux kernel boots again, your filesystem will be resized. This can take quite a while depending on the size of your SD card—please be patient and don't disturb the little guy.

At the raspberrypi login prompt, enter pi as the user name and the password you chose.

Basic commands to explore your Pi

Now that you're logged in, let's have a look at a handful, out of the several hundred possible commands, that you can type at the command line. When a command is run prepended with sudo it'll start with the super user or root privileges. That's the equivalent of the Administrator user in the Windows world.

Command

Description

sudo raspi-config

Starts Raspi-config, which lets you reconfigure your system.

sudo reboot

Reboots the Pi.

sudo shutdown -h now

Prepares the Pi to be powered off. Always type this before pulling the plug!

sudo su

Become the root user. Just be careful not to erase anything by mistake!

df / -h

Displays the amount of disk space available on your SD card.

free -h

Displays memory usage information.

date

Displays the current time.

exit

Log out of your current shell or SSH session.

You have been reading a chapter from
Raspberry Pi for Secret Agents
Published in: Apr 2013
Publisher: Packt
ISBN-13: 9781849695787
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime