.Command Line General

Good Resources The Linux Command Line – free pdf book Get previously entered commands Use the up and down cursor keys. Issuing multiple commands in a single line If subsequent commands should only occur if the previous command succeeded use "&&": sudo ifdown eth0 && sudo ifup eth0 If subsequent commands should occur regardless of […]

Read More

Break

On the Raspberry Pi Command Line Break CTRL + Break Via SSH Terminal Programs CTRL + C

Read More

Detect RPi Hardware Version

Get Human Readable Hardware Details cat /proc/cpuinfo Get RPi Version Code Use the command: cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' The returned code can be looked up on the table at http://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/ , copied below:  

Read More

Help

Displaying a programs options Type this on the command line: program_name –help        

Read More

Installing

Fixing broken installs You can use the "–fix-missing" option to retry an install and look for items that we're previously missed due to errors sudo apt-get install somename –fix-missing  

Read More

Networking

More Networking Things Our Raspbian specific networking stuff is here: https://raspberry-projects.com/pi/category/pi-operating-systems/raspbian/network-settings IP Address ip addr Is A Specific Interface Connected ip link show wlan0 WiFi List discovered networks sudo iwlist wlan0 scan Is network connected ifconfig wlan0 If the inet addr field has an address beside it, the RPi has connected to the network.  Get connected […]

Read More

Processes

Show processes ps -ef List processes ps ax List processes To kill a running program If you need to kill your program running in the background you can use this sudo killall my_project.a

Read More

Root user privileges

After logging in as user pi, using this command give you root user privileges: sudo su Exiting root user mode Use the exit command: exit or su username: su pi sudo In GUI If you are developing programs which use the IO pin from the GUI you do not have to use "sudo startx" to […]

Read More

Shutdown

This is the best method sudo shutdown -h now This is an alternative (halt and shutdown are not the same thing so a halt command may not cause a complete power off shutdown, it depends on the system): sudo halt  

Read More