Skip to content
Technology News Information & Jobs

Technology News Information & Jobs

Ubuntu Tutorials, Ubuntu How To , Linux Tips, Tech Jobs

  • Work with US
  • Search Jobs
  • Post a Job
  • Contact Us
  • Ubuntu
    • Ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Themes
  • Linux
  • Laptops
  • Tutorials
  • Job Dashboard
  • Toggle search form
Amazing Useful Raspberry Pi Commands Cheat Sheet

Amazing Useful Raspberry Pi Commands Cheat Sheet [2023]

Posted on October 31, 2020January 29, 2023 By admin No Comments on Amazing Useful Raspberry Pi Commands Cheat Sheet [2023]

Amazing Useful Raspberry Pi Commands Cheat Sheet [2023]

Let’s have a look at some of the useful Raspberry Pi commands cheat sheets.

Useful Raspberry Pi Commands Cheat Sheet [2023]

cat [name]Show the contents of the file [name]
cd ..Change to the parent directory
cd [path]Move to the directory at [path]
cd /Change to the root directory
cd ~Change to your home directory – usually “/home/”
chmod [who][+,-,=][permissions] [name]Change the permissions for a file
chmod 777 [name]Allow all users to read, write and execute the file [name]
chmod u+x [name]Allow the user to execute [name]
cp -r [from] [to]Copy all files and subdirectories from source [from] to destination [to]
cp [from] [to]Copy a file from source [from] to destination [to]
findSearch for files and their contents
grep ‘string’ [name]Search inside one or more files for occurrences of ‘string’
head [name]Return all occurrences of ‘string’ within file [name]
lsList the contents of the current directory
ls -aList all files including hidden files
ls -lList the contents of the current directory with more file information
ls [path]List the contents of the directory found at [path]
man [command]Open the manual/help page for [command]
man manOpen the manual/help page for the ‘man’ command (helpception)
mkdir [name]Create a directory called [name] in the current working directory
mv -r [from] [to]Move all files and directories from source [from] to destination [to]
mv [from] [to]Move a file from source [from] to destination [to]
pwdShow the name of the current working directory
python/python3 –versionShows you what version of Python you currently have installed
rm -r *Remove all files and directories from the current working directory
rm [name]Remove the specified file
rm *Remove all files from the current working directory
rmdir [name]Remove the empty directory [name] from the current working directory
sudo [command]Superuser do. Execute [command] with elevated privileges (Allows you to do things you usually wouldn’t have access to)
sudo apt-get ​install [package]Install a package
sudo apt-get updateUpdate the list of packages
sudo apt-get upgradeUpgrade the installed packages – must be run after Sudo apt-get update
sudo ​chown pi:root [name]Change the owner of the file [name] to user ‘pi’ and set the group to ‘root’
​sudo raspi-configLaunch the Raspberry Pi configuration menu
sudo rebootSafely restart your Pi
sudo shutdown -h nowSafely shutdown your Pi immediately
sudo suPlaces you in the root directory with root user access – be careful with this!
tail [name]Show the end of file [name]
tar -cvzf [name] [path]Create compressed file [name] from the contents of [path]
tar -xvzf [name]Extract the contents of the compressed file [name]
wget [uri]Download the file found at [uri] on the internet
import RPi.GPIO as GPIOImport the RPi.GPIO module into the python sketch
GPIO.setmode(GPIO.BCM)Use Broadcom pin numbers (GPIO 14, GPIO 15 etc)
GPIO.setmode(GPIO.BOARD)Use board pin numbers (4,5, 8 etc)
GPIO.getmode()Returns current pin numbering mode (BCM, BOARD, or None)
GPIO.setup([pin number], GPIO.IN)Set up the pin at [pin number] to be an input
GPIO.setup([pin number], GPIO.IN, pull_up_down=GPIO.PUD_DOWN)Set up the pin at [pin number] to be an input with internal pull down resistance
GPIO.setup([pin number], GPIO.IN, pull_up_down=GPIO.PUD_UP)Set up the pin at [pin number] to be an input with internal pull up resistance
GPIO.setup([pin number], GPIO.OUT)Set up the pin at [pin number] to be an output
GPIO.setup([pin number], GPIO.OUT, initial=1)Set up the pin at [pin number] to be output with the initial value ‘1’
GPIO.output([pin number], 1)Set [pin number]’s value to 1. Note that 1, GPIO.HIGH and True are the same thing
GPIO.output([pin number], 0)Set [pin number]’s value to 0. Note that 0, GPIO.LOW and False are the same thing
i = GPIO.input([pin number])Set the variable I to the value of [pin number]
if GPIO.input([pin number]):Use the value of [pin number] as a boolean in the code
GPIO.cleanup()Reset all GPIO pins (good practice to call before leaving any program)
GPIO.VERSIONReturns current RPi.GPIO version
from gpiozero import LEDImport the LED section of the gpiozero library
led = LED(17)Assign the ‘led’ variable to an LED on pin GPIO 17
led.on()Turn on the LED stored in the ‘led’ variable
led.off()Turn off the LED stored in the ‘led’ variable
led.toggle()Toggle the LED stored in the ‘led’ variable (if it’s off, turn it on and vice versa)
from gpiozero import MotorImport the Motor section of the gpiozero library
motor = Motor(17, 18)Assign the variable ‘motor’ to a Motor object containing the forward and backward drive pin numbers
motor.forward()Activate the forward pin of the variable ‘motor’
motor.backward()Activate the backward pin of the variable ‘motor’
motor.reverse()Reverse the current motor direction
motor.stop()Stop the motor
from gpiozero import BuzzerImport the Buzzer section of the gpiozero library
bz = Buzzer(3)Assign the variable bz to a Buzzer on pin GPIO3
bz.on()Turn the buzzer on
bz.off()Turn the buzzer off
bz.toggle()Toggle the buzzer’s state (if it’s off, turn it on and vice versa)
from gpiozero import ServoImport the Servo section of the gpiozero library
servo = Servo(17)Assign the ‘servo’ variable to a Servo on GPIO 17
servo.min()Move the servo to its minimum value
servo.mid()Move the servo to its middle-value
servo.max()Move the servo to its maximum value
servo.value = 0.5Move the servo to a set numerical point (min = -1, max = 1)
raspistillCommand to take a still image with an attached camera, modify with arguments below
–width, -wSet image width
–height, -hSet image height
–quality, -qSet JPEG quality <0 to 100> (75 is most common)
–raw, -rInserts raw Bayer data from the camera into the JPEG metadata
–output, -oOutput filename (required for saving)
–latest, -lAdd the latest frame to the filename
–verbose, -vVerbose debugging information during run
–timeout, -tSet a time to wait before capturing an image.
–encoding, -eEncoding to use for output file – jpg, gif, bmp, or png
raspividCommand to take a video using attached camera, modify with arguments below
–width, -wSet image width (between 64px – 1920px)
–height, -hSet image height (between 64px – 1080px)
–bitrate, -bSet bitrate in bits per second (i.e 15 Mbits/s = 15000000)
–output, -oOutput filename (required for saving)
–verbose, -vVerbose debugging information during run
–timeout, -tSet a time to wait before capturing the video
–framerate, -fpsSpecify the frames per second for recording
READ More Relevant Stuff:  5 Ways To Count The Number Of Lines In A File In Linux

Compiled From: Make Use Of.

Linux Tags:raspberry, Raspberry Pi, Raspberry Pi cheat sheet, Raspberry Pi command

Post navigation

Previous Post: Install Squid Proxy on Ubuntu 20.04
Next Post: Linux Kernel 5.8 Reaches End of Life, Better Upgrade To Latest Version

Related Posts

How To Install NotepadQQ On Linux How To Install NotepadQQ On Linux [Updated] How To Ubuntu
How To Upgrade To Linux Mint 20.2 | Easy Method How To Upgrade To Linux Mint 20.2 | Easy Method Linux
Mozilla Firefox 76.0 For Ubuntu 20.04 LTS Firefox 76 Released With Security Enhancement Linux
Top Free Linux Cloud Servers In 2023 Top Free Linux Cloud Servers In 2023 Linux
Best FREE cPanel Alternatives For 2023 Best FREE cPanel Alternatives For 2023 Linux
Linux Kernel 5.13 Released Linux Kernel 5.13 Released Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Enable Hibernate in Ubuntu 22.04 LTS May 20, 2024
  • Popular Ubuntu Games: Top 5 Games To Play March 17, 2024
  • WordPress | Your site doesn’t include support for the “generateblocks/container” block GenerateBlocks Plugin February 11, 2024
  • Ubuntu Autoremove Command Debian Autoremove Command February 10, 2024
  • How To Mount Windows 11 Shares on Debian Linux December 7, 2023
  • Anonymous Browsing 101: A Deep Dive Into Residential Proxies November 20, 2023
  • How To Correctly Install Uninstall Linux Ubuntu Nvidia Drivers Fast October 31, 2023
  • Ethical Web Design: The Dos and Don’ts October 28, 2023
  • Understanding the Role of Security Operations Center October 25, 2023
  • The Positive Effects of AI Tools and Online Services on Students Successful Essay-Writing Skills October 3, 2023
  • Linux Wget Examples September 27, 2023

Categories

  • Android
  • Apple
  • Blogs
  • Debian
  • Fix
  • Gadgets
  • Game
  • Google
  • How To Ubuntu
  • Internet
  • Laptops
  • Linux
  • Linux Commands
  • Linux Game
  • Linux Mint
  • News
  • Operating Systems
  • Security
  • Technology
  • Themes
  • Tools
  • Tutorials
  • Ubuntu
  • ubuntu 18.04
  • Ubuntu 20.04
  • Ubuntu 22.04
  • Windows 11
  • Wordpress
  • Search Jobs
  • Post a Job
  • Job Dashboard
  • Contact Us
  • About US
  • Cookie Policy
  • Terms and Conditions
  • Privacy Policy
  • Sitemap
  • Write For US

Tags

android apps centos ChatGPT command Commands Debian deepin Desktop docker Fedora fix game games Gaming gnome google kernel linux linux commands linux kernel Linux laptops Linux Mint Linux themes minecraft NVIDIA Python Raspberry Pi sysadmin themes ubuntu ubuntu 18.04 Ubuntu 18.04 LTS Ubuntu 20.04 ubuntu 20.04 lts Ubuntu 22.04 LTS Ubuntu games Ubuntu kernel ubuntu themes ubuntu tutorial VirtualBox Windows Windows 11 Wine WSL
itsubuntu.com is an Equal Opportunity Employer. For Advertisement, Jobs, Guest posts, and any other thoughts, email us at [email protected]
  • Prepared Foods Order Writer (Deli / Culinary – Buyer / Inventory Replenishment) – Full Time

    • Thayne, WY
    • Whole Foods Market
    • Full Time
  • Sr. Risk and Controls Compliance Policy Writer (on-site Phoenix, Chicago, San Fran)

    • San Francisco, CA
    • INSPYR Solutions
    • Full Time
  • Artificial Intelligence & Gen AI Engineer – Tampa, Hybrid

    • Tampa, FL
    • Citigroup Inc
    • Full Time
  • Sr. Technical Documentation Specialist – REMOTE

    • Atlanta, GA
    • HHS Technology Group, Inc.
    • Full Time
  • TECHNOLOGY VICE PRESIDENT, ARTIFICIAL INTELLIGENCE & MACHINE LEARNING AND DATA

    • Falls Church, VA
    • NLP PEOPLE
    • Full Time
  • Architectural Drafter

    • Sarasota, FL
    • Start To Finish Drafting
    • Full Time
  • Senior or Principal Data Scientist – Technical AI Ethicist

    • Seattle, WA (Remote)
    • salesforce.com, inc.
    • Full Time
  • Artificial Intelligence (AI) Data Scientist

    • Fairfax, VA
    • General Dynamics Information Technology
    • Full Time

Copyright © 2025 Technology News Information & Jobs.

Powered by PressBook Grid Blogs theme