Check out these 15 Useful Commands Every Raspberry Pi User Should Know, from makeuseof.
The Raspberry Pi: Yes, It’s Linux
You’ve imaged your SD card and booted your Raspberry Pi. You’re probably using the Raspbian operating system and updated and configured it so that it meets your requirements. What you may not have realised is that despite the Windows-style icon-driven desktop, Raspbian is a Linux distribution. Several operating systems are available for Raspberry Pi, the vast majority of which are Linux.
Rather than an attempt to get people using Linux by stealth, the Raspberry Pi relies on these operating systems because of their open source origins and versatility.
(And because it’s rather good.)
Now, you can probably use a Linux operating system with a graphical user interface without using the command line, but this is where most of the real power lies.
Raspberry Pi Command Line Basics
We wouldn’t expect you to start using the command line without knowing how it works. Essentially, it is a method for instructing the computer to perform tasks. It’s really not all that different from pointing and clicking, only you’re expected to use text.
With a mouse-driven GUI, you can easily switch directories and read their contents. In the command line, you can check which directory you’re viewing by entering pwd (print working directory). Use ls to list the contents of the directory, and change directory by entering cd. For instance, cd edward will switch to a directory called “Edward”, while cd.. will always return focus to the parent directory. New directories are possible with mkdir newdir, where “newdir” is the directory label. You can also create a succession of new directories with mkdir –p /home/edward/newdir1/newdir2, where both newdir1 and newdir2 are created, but this will only work with the –p switch.
These are basics of all command line interfaces, and can be easily picked up. What you really need are useful commands.
Display Hardware Information
On a Windows PC or Mac you can easily find hardware information by looking in System or About This Mac. To find out about your Raspberry Pi’s hardware, enter the following:
This will output information about the device’s processor. For instance, where you see BCM2708, this indicates that the chip was manufactured by Broadcom.
Various other hardware information can be found by running commands under the proc directory.
cat /proc/meminfo displays details about the Raspberry Pi’s memory
cat /proc/partitions reveals the size and number of partitions on your SD card or HDD
cat /proc/version shows you which version of the Pi you are using.
All of these details can be used to assess what your Raspberry Pi might be capable of. Further information can be acquired using the vcgencmd series of commands, which can reveal things like CPU temperature (vcgencmd measure_temp). This can prove vital if you’re concerned about airflow…
Each Tuesday is EducationTuesday here at Adafruit! Be sure to check out our posts about educators and all things STEM. Adafruit supports our educators and loves to spread the good word about educational STEM innovations!
Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.
Join us every Wednesday night at 8pm ET for Ask an Engineer!
Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground” – Adafruit’s Apps!
Maker Business — Adafruit interviews Dan Rasure, Managing Partner TechShop 2.0
Wearables — Simulate tattoos
Electronics — Heatsinks aren’t enough!
Biohacking — Getting More from Home DNA Testing
No comments yet.
Sorry, the comment form is closed at this time.