RasPi commands and recommended installs

Some of my most used commands

Some of the most used commands are for updating and upgrading the system firmware of your Raspberry Pi;

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

sudo apt-get autoremove (use to remove old packages)

sudo rpi-update (use only if you want bleeding edge updates)

Sudo apt-get remove then the name

sudo apt-get autoremove(checks to see if things can be removed that are no longer needed)

If you need to be a super user you use this;
(If you enter the desktop it will be different if you are in super user mode)
sudo su

To return from super user; laso to exit from MySQL database settings

exit

Root user password;
sudo passwd

sudo su to be a Super USER at root

use root passwd;
su - (enter the password you set above)

To start the Graphical User interface (GUI)(X)

startx

To install from the commandline;

sudo apt-get install <name>

example;

sudo apt-get install synaptic This will install Synaptic Package Manager.

check the temperature:

/opt/vc/bin/vcgencmd measure_temp

Check the MHz loaded and unloaded:

/opt/vc/bin/vcgencmd measure_clock arm

Check MAC address:

cat /sys/class/net/eth0/address

Memory Usage:

free -m

Start or stop services: examples;
sudo /etc/init.d/mysql stop|restart
sudo /etc/init.d/apache2 restart|stop

Shutdown the RasPi;
sudo halt -h
or
sudo shutdown -h now

Recommended packages to install:

sudo apt-get install xrdp (allows use of Remote DesktopĀ  connections)

sudo apt-get install usbmount (mounts USB devices in the command line automatically)

Leave a Reply