Useful Raspberry Pi Commands

"sudo all the things!"

On this page

Reboot / Shut down

Reboot:

sudo reboot

Shut Down:

sudo halt

Internet

See status of ethernet & wifi adapters:

ifconfig

See your Pi's IP address:

hostname -I

Update Your Pi

Update package information:

sudo apt-get update

Fetch new versions of installed packages:

sudo apt-get upgrade

Same as "sudo apt-get upgrade" plus resolves dependencies:

sudo apt-get dist-upgrade

Update firmware:

sudo rpi-update

Various

Clear the console:

clear

Check available disk space:

df -h

List files in the current folder (detailed):

ls -l

(USB) Audio

Check audio setup:

amixer

Enable usb audio:

sudo nano /etc/modprobe.d/alsa-base.conf

Comment out the line with "options snd-usb-audio index=-2", save, and reboot:

sudo reboot

Test audio:

aplay /usr/share/scratch/Media/Sounds/Vocals/Singer1.wav

Change audio levels:

alsamixer

Back

Back to Guides