Appendix A. Raspberry Pi Linux Quick Reference

Table A-1 shows some useful and common Linux commands. Table A-2 shows the directories you’ll be working in much of the time.

Table A-1. Some Linux commands
CommandMeaning

pwd

Prints your working directory

ls

Lists files in working directory

cd Desktop

Changes directory to the Desktop directory immediately under your current directory

cd ~/Desktop

Changes directory to the Desktop directory immediately under your home directory

cd ~

Changes to your home directory

nano foo.txt

Edits the text file foo.txt. Use Control-X, then type y followed by Enter or Return to save the file.

passwd

Change your password (asks for the old one first, but doesn’t echo what you type to the screen)

startx

Launch the graphical desktop from ...

Get Make: Sensors now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.