Raspberry Pi Commands: Using Linux

You've imaged your SD card and booted your Raspberry Pi, which is now running the Raspbian operating system, which has been updated and customized to make your Raspberry Pi more efficient.

You might not know it, but Raspbian is a Linux distribution, despite the Windows-style icon-driven interface. Raspberry Pi can run a variety of operating systems, the great majority of which are Linux-based.

This isn't an underhanded attempt to get folks to choose Linux! Linux may be installed on a wide variety of devices. Rather, due of their open source roots and adaptability, the Raspberry Pi Foundation relies on Linux operating systems. While you may use Linux without using the command line, the command line is where the true power resides.

Do you want complete control over your Raspberry Pi running Raspbian? To begin, open LX Terminal or boot to the command prompt.

5 Crucial Update Commands for the Raspberry Pi

We wouldn't expect you to go right into utilising the command line without first learning how to use it. It is, in essence, a technique of telling the computer to do activities without the need of a mouse.

When you log in to the terminal, look for the pi@raspberrypi $ prompt. When this is shown, you can input commands.

Check 𝐅𝐢𝐫𝐬𝐭-𝐄𝐯𝐞𝐫 𝐆𝐒𝐌 𝐁𝐨𝐚𝐫𝐝 𝐁𝐚𝐬𝐞𝐝 𝐨𝐧 𝐏𝐢𝐜𝐨 𝐏𝐢𝐜𝐨 𝟐𝐆 𝐄𝐱𝐩𝐚𝐧𝐬𝐢𝐨𝐧 Launching on 𝟐𝟑𝐫𝐝 𝐉𝐮𝐥𝐲, 𝟐𝟎𝟐𝟏

Updating your Raspberry Pi should probably be the first command you learn from the command line. If you're using Raspbian, updating and upgrading the Pi's sources and operating system is as simple as running three or four commands:

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt-get dist-upgrade
  • sudo rpi-update

Combine these into a single chained command to save time:

  • sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo rpi-update

5 Command Line Basics for Raspberry Pi

Switching folders and reading their contents is simple with a mouse-driven GUI. Text-based commands, on the other hand, may be preferred for their versatility.

  • The command pwd displays the current directory (print working directory).
  • The command ls displays a list of the directory's contents.
  • The command cd is used to swap directories. For example, cd edward will take you to the "Edward" child directory, whereas cd.. will take you back to the parent directory.
  • mkdir newdir The directory label "newdir" is used to establish a new directory. You may also use mkdir -p /home/edward/newdir1/newdir2 to create a series of new directories, but only with the -p option.
  • If your earlier instructions have cluttered things up, clear will show a clean fresh screen.

These command-line fundamentals are simple to learn. Because certain files and directories are invisible to the mouse-driven file manager, being able to browse via the command line is important.

PiRelay 8 | Relay Expansion Board For Raspberry Pi - Kickstarter

10 Raspberry Pi Hardware Info Commands

You can quickly obtain hardware information on a Windows PC or Mac by browsing in System Information or About This Mac. Enter the following to learn more about your Raspberry Pi's hardware:

  • cat /proc/cpuinfo

Quick Guide for Raspberry Pi Users: Raspberry Pi Terminal Commands

This will provide information on the CPU on the device. When you see "BCM2708" on a chip, for example, it means it was made by Broadcom.

Use these proc directory commands to find out more about your hardware.

  • The command cat /proc/meminfo provides information about the RAM on the Raspberry Pi.
  • The...
Read more »