Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
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
Learning Raspbian

You're reading from   Learning Raspbian Get up and running with Raspbian and make the most out of your Raspberry Pi

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784392192
Length 154 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
William Harrington William Harrington
Author Profile Icon William Harrington
William Harrington
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. The Raspberry Pi and Raspbian 2. Getting Started with Raspbian FREE CHAPTER 3. Starting Raspbian 4. An Introduction to the Raspbian Desktop 5. Installing Software on Raspbian 6. The Console 7. Other Linux Distributions Based on Raspbian A. References Index

Basic scripting


All the commands that you have seen so far are just single commands. The bash has the ability to execute multiple commands together in one go. Commands can be stored in a file called a shell script.

A shell script has its execute attribute set. It can then be run by simply changing into the directory that the script is in and typing its name.

These shell scripts can be run as normal program a on your Raspberry Pi.

Rebooting and shutting down your Raspberry Pi

You can reboot and shut down your Raspberry Pi using the built-in commands. To reboot your Raspberry Pi, all you need to do is run the reboot command.

Rebooting your Raspberry Pi

Sometimes, you will want to shut down your Raspberry Pi completely. To do this, you can use the shutdown command.

The shutdown command takes two different parameters: the first parameter is the type of shutdown that you want to do, and the second parameter is the time at which you want to do the shutdown.

Parameter

Description

-r

This reboots...

lock icon The rest of the chapter is locked
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 €18.99/month. Cancel anytime