Navigating
To list the files in the working directory, use the ls command.
ls
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_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
More System Information
cat /proc/cpuinfo // Processor info cat /proc/version // Linux version vcgencmd measure_temp // CPU temperature
Networking
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@192.168.1.52:Desktop
to copy another file from your rpi home directory to your laptop home directory type:
scp pi@192.168.1.52:testsines.pd ~
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@192.168.1.52:
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