Command Line Cheat Sheet - FAR-Lab/Developing-and-Designing-Interactive-Devices GitHub Wiki

Cat - prints out what is in a file. cat example.js

Nano - opens any program/text file and then allows you to edit the file. nano example.js Look at the bottom of the screen to see the commands to control the editor. (^) means control. Example: ^X means control+X which will exit the text editor.

Python - execute python programs. python example.py

Node - similar to the python command, BUT it executes javascript programs INSTEAD. node example.js

sudo raspi-config - check on VNC and other settings

ifconfig to see your IP address (127.0.0.1 is localhost)

sudo reboot turn off and on pi

sudo apt install realvnc-vnc-server realvnc-vnc-viewer - installing vnc

ssh pi@.._._ - enter your ip address of your pi here

bluetoothctl enters the bluetooth scanning

paired-devices check bluetooth devices currently connected

ctrl d quits bluetoothctl

pwd - print working directory, tells us where on the computer we are ls - list the things in the current directory. cd - change directory. This lets you move to another folder on your machine. mkdir - make directory. You can create directories with this command cp - copy a file. You can copy from one place to any other place mv - move a file, also used to rename a file rm - delete a file. To delete a folder you need the recursive flag rm -r [folder] nano - this is a text editor (there are many) that will let you edit files in terminal.

arp -a - gives ip addresses on the network

curl - is a command line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP or FILE)

The chmod -(change mode) command protects files and directories from unauthorized access in the filesystem by setting access permissions.

wget - downloads a file on a webpage