Essentials_Bash_v1.pdf

(2292 KB) Pobierz
ESSENTIALS
CONQUER
Raspberr P
Richard Smedley
COMMAND
E
TH
LINE
TERMINAL GUIDE
Written by
TAKE US
ANYWHERE
with a Newsstand
subscription
(limited time offer)
45%
SAVE
FREE:
ALL 30 LEGACY ISSUES NOW INCLUDED!
Fro jus
or
Magazine
£2.29 £19.99
rolling subscription
full year subscription
Available now
Download the app – it’s free!
Get all 31 legacy issues free
Instant downloads every month
Fast rendering performance
Live links & interactivity
for smartphones & tablets
WELCOME TO
CONQUER THE
COMMAND LINE
creating an easy route into computer use
for many non-technical users. For complex tasks,
though, the interface can become a limitation:
blocking off choices, and leaving a circuitous route
even for only moderately complicated jobs.
(Re-)Enter the command line: the blinking cursor
that many thought had faded away some time in
the 1990s. For getting instructions from user to
computer - in a clear, quick and unambiguous form
- the command line is often the best way. It never
disappeared on Unix systems, and now, thanks to
Raspbian on the Raspberry Pi, a new generation
are discovering the power of the command line
to simplify complex tasks, or instantly carry
out simple ones.
If you’re not comfortable when faced with the
$ prompt, then don’t panic! We’ll quickly make
you feel at home, and able to find your way around
the terminal on the Pi, or any other GNU/Linux
computer: getting things done, and unlocking the
power of the command line.
S
ometimes only words will do. Graphic user
interfaces (GUIs) were a great advance,
FIND US ONLINE
raspberrypi.org/magpi
EDITORIAL
GET IN TOUCH
magpi@raspberrypi.org
DESIGN
Managing Editor:
Russell Barnes
russell@raspberrypi.org
Technical Editor:
David Whale
Sub Editors:
Laura Clay, Phil King, Lorna Lynch
Critical Media:
criticalmedia.co.uk
Head of Design:
Dougal Matthews
Designers:
Lee Allen, Mike Kay
Illustrator:
Sam Alder
DISTRIBUTION
Seymour Distribution Ltd
2 East Poultry Ave,
London
EC1A 9PT |
+44 (0)207 429 4000
In print, this product is made using paper
sourced from sustainable forests and
the printer operates an environmental
[
management system which has been
Chapter One
]
assessed as conforming to ISO 14001.
SUBSCRIPTIONS
Select Publisher Services Ltd
PO Box 6337
Bournemouth
BH1 9EH |
+44 (0)1202 586 848
The MagPi magazine is published by Raspberry Pi (Trading) Ltd., Mount Pleasant House, Cambridge,
CB3 0RN. The publisher, editor and contributors accept no responsibility in respect of any omissions
or errors relating to goods, products or services referred to or advertised in the magazine. Except
where otherwise noted, content in this magazine is licensed under a Creative Commons Attribution-
NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0). ISSN: 2051-9982.
3
[ CONQUER THE COMMAND LINE ]
ESSENTIALS
CONTENTS
05
[
CHAPTER ONE
]
DON’T PANIC
Take a look around
and discover things
[
RICHARD
SMEDLEY
]
10
[
CHAPTER TWO
]
READ/WRITE TEXT
Get working on files
25
[
CHAPTER FIVE
]
CUSTOMISE
THE COMMAND LINE
Make Raspbian a little more personal
15
[
CHAPTER THREE
]
PERMISSION TO INSTALL
Raspbian’s system for installing
and updating
30
[
CHAPTER SIX
]
CONNECTING DISKS
Tackle the management
of removable storage
20
[
CHAPTER FOUR
]
MANIPULATING TEXT
Connect together multiple
simple commands
35
[
CHAPTER SEVEN
]
PREDICTABLE NETWORKING
Give the Pi a permanent network
address of its own
40
[
CHAPTER EIGHT
]
COMMAND LINE PI
No need to turn it off and on again:
just kill the process!
45
[
CHAPTER NINE
]
REMOTE PI
Accessing the Pi from remote PCs
and devices with Secure Shell
50
[
CHAPTER TEN
]
DOWNLOADING & INSTALLING
Downloading and unpacking software,
and creating new Raspbian SD cards
Since soldering
together his first
computer - a ZX81
kit - and gaining
an amateur
radio licence as
GW6PCB, Richard
has fallen in
and out of love
with technology.
Swapping the
ZX81 for a guitar,
and dropping ham
radio for organic
horticulture,
he eventually
returned to the
command line,
beginning with a
computer to run
his own business,
and progressing
to running all the
computers of
an international
sustainability
institution. Now
he writes about
Free Software and
teaches edible
landscaping.
[
Don’t Panic
]
[
Contents
4
ESSENTIALS
ESSENTIALS
ONE
]
DON’T PANIC
[
CHAPTER
In the first chapter, we take a look around and discover
that things aren’t as strange as they might appear…
5
[
Chapter One
]
Zgłoś jeśli naruszono regulamin