Command Line Reference


To list the files in the working directory, use the ls command.


To change directories (cd) from the working directory

cd "directory name"

File Managment

The rm command removes (deletes) files and directories.

rm "file name"
rm -r "file directory"

System Information

To output information about operating system:

cat /etc/os-release

This results in the following output on my Raspberry Pi

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION="8 (jessie)"

More System Information

cat /proc/cpuinfo // Processor info
cat /proc/version // Linux version
vcgencmd measure_temp // CPU temperature


ifconfig wlan0

copy files to & from rpi

one way is to use scp (secure copy) in your laptop terminal.
to copy a file from your laptop desktop to rpi desktop directory type:
scp ~/Desktop/myfile.pd pi@

to copy another file from your rpi home directory to your laptop home directory type:
scp pi@ ~

to copy a whole folder add the recursive flag -r. for example to move a folder from your laptop documents folder to your rpi home directory type:

scp -r ~/Documents/soundfiles pi@

Other Useful Commands

ls              #list files
df -h           #disk free
free -h         #ram memory
top             #cpu usage (quit with 'q')
lsusb           #list usb devices
aplay -l        #list available soundcards
exit            #leave ssh
sudo halt -p    #turn off - wait for 10 blinks
sudo reboot     #restart
sudo pkill pd   #force quit on some program
ls /dev/tty*    #see if /dev/ttyUSB0 is there
lsusb           #to display a list of attached devices