Command Line

From Daves Wiki
Jump to navigation Jump to search

Here are some helpful commands to remember when working with the command line on your Raspberry Pi:

Raspberry Pi Specific

  • To update/upgrade Raspberry Pi:
    sudo apt-get update && sudo apt-get upgrade
  • To shutdown:
    sudo shutdown -h now 
  • Get the CPU Temperature
    vcgencmd measure_temp

PHP on a Pi

Use the following command to get the PHP Error Log on a Raspberry Pi:

cat /var/log/apache2/error.log

Connect to a Raspberry Pi

  • To SSH from Mac terminal:
    ssh raspberrypi.local -l pi 

Linux Generic

  • Get disk space:
    df -h 
  • Remove a non empty directory use the recursive action
    rm -r dirname

Back to Raspberry Pi