Skip to main content

How to Set Up a Raspberry Pi for the First Time

Raspberry Pi 4B
(Image credit: Future)

So you've just gotten a new Raspberry Pi, perhaps even the Raspberry Pi 4, and taken it out of the box. Now what? There are a million things you can do with your mini computer, but first you need to get it up and running.

If you bought your Pi as part of a kit, you probably got everything you need right in the box, but if you just have the board, you'll need the following:

  • A power source
  • A microSD card (at least 8GB)

And, unless you plan to do a headless install or the Raspberry Pi and use it via remote desktop or SSH (controlling it from a PC), you will need.

  • A keyboard (wired or wireless)
  • A mouse or other pointing device (could be built into the keyboard)
  • A monitor or TV to connect to (via HDMI)
  • HDMI cables

Note that the HDMI cable you need varies based on the Raspberry Pi you are using. Raspberry Pi 4 B has dual, micro HDMI out ports so it requires micro HDMI to HDMI cables or adapters. The Raspberry Pi Zero / Zero W have mini HDMI and therefore need mini HDMI to HDMI cables to connect to a display. All other Raspberry Pi models, including the 3 B, have standard HDMI ports and can use HDMI male to male cables to attach to your monitor or TV.

Powering Your Pi

The Raspberry Pi 4 B is powered via a USB Type-C port, which requires a charger that can output 5 volts and 3 amps. Most USB Type-C phone chargers don't have enough amps to get the job done, unless they have USB PD capability, but USB-C laptop chargers should all work. While it's unlikely to be a problem, note that Pi 4 models that were manufactured in 2019 or early 2020 have a bug which prevents them from charging over high-speed data cables that support USB 3.x 5 or 10 Gbps connections.

All other Raspberry Pi models, including the Raspberry Pi 3 B and Pi Zero / Zero W, get power via a micro USB port, which means that you can give it juice by connecting it to just about any of the many different third-party chargers or even by attaching it to one of your computer's USB ports. While you can get away with giving the board a lot less electricity (the Pi Zero W runs perfectly off of my laptop's USB port), the optimal power source for a Raspberry Pi 3 should have 5 volts and 2.5 amps, which also provides plenty of power for any peripherals you attach to its USB ports.

There are a number of power supplies that are made specifically for Raspberry Pis, including  this Canakit model for older Raspberry Pis and this Vilros model for the Pi 4. Some third-party chargers come with on/off switches, but you shouldn't use them to power down. The Pi doesn't have a built-in power switch, so the default way to turn it on is to plug it in. However, to avoid data loss, you'll want to use the shutdown feature in your operating system (OS) before unplugging or switching it off.

An OS on a microSD Card

There are more than a dozen different OSes for Raspberry Pi, and there's even a way to run full Windows 10 on the Pi 3B. However, Raspbian, a special version of Debian Linux that's optimized for the Pi, is the best platform for most use cases.

The Raspberry Pi has no internal storage, but instead boots off of a a microSD memory card that you provide. Be sure to get a card that's at least 8GB, preferably 16GB or higher, and has class 10 speed. It almost goes without saying, but you'll need some kind of card reader to write the OS to it from your PC.

Headless Install?

If you just want to experiment with the Pi or use it to control physical objects like lights, motors and sensors, you don't need to give it its own screen and keyboard. Follow our separate instructions for doing a headless install on the Raspberry Pi, and you can control the device from the desktop of your PC or Mac, using VNC or SSH remote access software.

Downloading and Installing Raspbian

Once you have all the components you need, use the following steps to set up your Raspberry Pi using a Windows, Mac or Linux-based PC (we tried this on Windows, but it should be the same on all three).

1.  Insert a microSD card / reader into your computer.  

2.  Download and install the official Raspberry Pi Imager. Available for Windows, macOS or Linux, this app will both download and install the latest version of Raspbian, the official Raspberry Pi OS. There are other ways to do this, namely by downloading a Raspbian image file and then using a third-party app to “burn it,” but the Imager makes it easier. Note that, on Windows 10, the Raspberry Pi Imager gets flagged as dangerous by Windows Smart Screen. 

3.  Click Choose OS and select Raspbian from the OS menu (there are other choices, but for most uses, Raspbian is the best). 

Raspberry Pi Imager

Click Choose OS in Raspberry Pi Imager (Image credit: Raspberry Pi Imager)

Raspberry Pi Imager

Choose your OS. (Image credit: Future)

 4. Click Choose SD card and pick the one you’re using. 

Raspberry Pi Imager

(Image credit: Tom's Hardware)

5. Click Write. The app will now take a few minutes to download the OS and write to your card.  

Raspberry Pi Imager

(Image credit: Tom's Hardware)

Configuring Raspbian

If you are prompted for a username and password, the default username is "pi", and the password is "raspberry". If you're concerned about security, you'll want to change these. On first boot, you will probably be given a "Welcome to the Raspberry Pi" dialog box, which takes you through the process of choosing important settings.

1. Click Next on the dialog box and then select your country, language and keyboard type.

2. Change your default password on the next screen or leave it blank for it remain as "raspberry."

3. Select the appropriate Wi-Fi network on the screen after, provided that you are connecting via Wi-Fi. If you don't have Wi-Fi or are using Ethernet, you can skip this.

4. Click Next when prompted to Update Software. This will only work when you are connected to the Internet, and it can take several minutes. If you are not connected to the Internet, click Skip.

5. Click Done or Reboot (if prompted to reboot).

If you are not shown a "Welcome to Raspberry Pi" dialog box or you wish to change these settings later, you can find the region and password settings, along with many other options, by clicking on the Pi icon in the upper left corner of the screen and navigating to Preferences -> Raspberry Pi Configuration. You can configure Wi-Fi by clicking on the Wi-Fi / network icon on the taskbar.

Changing Your Screen Resolution on Raspberry Pi

If you don't have enough desktop real estate, you may want to change your screen resolution to ensure that it matches what your display is capable of. If you are using a headless Pi and accessing it via VNC, you still probably want at least a 720p screen.

To change the Raspberry Pi resolution:

1. Open the configuration menu by clicking on the Pi icon then selecting Preferences -> Raspberry Pi Configuration.

2. Click the Set Resolution button on the System tab.

3. Select your new resolution, and click Ok.

4. Click Yes to reboot.

What Do I Do Now?

There are so many different things you can do with a Raspberry Pi. Some popular uses include making your Raspberry Pi into a retro arcade machine, using your Raspberry Pi as a web server or using it as the brain for a robot, security system or custom iOT device.  

Here are some tutorials to get you started: