So you've just bought a new Raspberry Pi, maybe the Raspberry Pi 4 or the Raspberry Pi 400, and taken it out of the box. What should I do now? The Raspberry Pi must first be set up before you can do any of the many things you can do with your little computer, from turning it into a web server to a vintage arcade. Please note that the setup procedure is entirely different if this is a Raspberry Pi Pico microcontroller; for more information, visit our article on How to Setup a Raspberry Pi Pico.
If you purchased your Pi as a kit, you most likely received everything you needed right away, but if you have the board, you will need the following:
- USB power adapter like the official Raspberry Pi 4 power supply.
- microSD card (at least 8GB, but preferably 16 or 32GB).
- USB card reader, unless one is built into your PC.
And unless you plan to make a headless install on the Raspberry Pi and use it through a remote desktop or SSH (controlling it from a PC), you will require.
- Mouse
- Keyboard
- HDMI cables
- Monitor or TV
Keep in mind that, depending on the Raspberry Pi you are using, a different HDMI cable is required. Due to the twin tiny HDMI out ports on the Raspberry Pi 4B and Pi 400, micro HDMI to HDMI cables or adapters are needed. The Raspberry Pi Zero, Zero W, and Zero 2 W need mini HDMI to HDMI cables to connect to a display. All other Raspberry Pi models, including the 3 B, have conventional HDMI ports and may be connected to your monitor or TV using HDMI male-to-male cables.
Setup Your Raspberry Pi's Power
Without a way to switch it on, a Raspberry Pi cannot be set up. The Raspberry Pi 4 B and Raspberry Pi 400 (which is a 4 B inside a keyboard) are powered by a USB Type-C port, which requires a charger that can output 5 volts and 3 amps. Unless they feature USB Power Delivery capability, most USB Type-C phone chargers lack the necessary amps to complete the task; however, USB-C laptop chargers should all function. It should be noted that Pi 4 versions produced in 2019 or the beginning of 2020 have a bug that prevents them from charging over high-speed data cables that support USB 3.x 5 or 10 Gbps Gbps connections. This is unlikely to be a problem, however.
The other Raspberry Pi models, such as the Raspberry Pi 3 B and the Pi Zero, Zero W, and Zero 2 W, get their power through a micro USB port, so you can provide it with energy by plugging it into one of the many third-party chargers or even one of your computer's USB ports. The Raspberry Pi 3 requires a power source of 5 volts and 2.5 amps, which is also more than enough to power any peripherals you connect to its USB ports. Nevertheless, you can get by with far less power (the Pi Zero W operates well off of the USB port on my laptop).
There are several power supplies designed specifically for Raspberry Pis, including the official Raspberry Pi 4 power supply and the CanaKit 5V 2.5A power supply for previous Raspberry Pi models.
The default way to turn on the Pi is to plug it in since it lacks a built-in power switch. Power supplies with on/off switches are also available. To prevent data loss, use the shutdown option in your operating system (OS) before unplugging or switching it off.
An OS on a microSD Card
There are over a dozen different operating systems for the Raspberry Pi, and there's even a way to run Windows 11 on the Pi 4. But, Raspberry Pi OS, a special version of Debian Linux optimized for the Pi, is the ideal platform for most use cases, so that's what we'll show you how to set up.
The Raspberry Pi has no internal storage and relies on a microSD memory card that you supply. Be sure you obtain a card with at least 8GB of storage space, ideally 32GB or more, and class 10 speed (see our list of the best Raspberry Pi microSD cards). It practically goes without saying, but you'll need a card reader to write the operating system to it from your PC.
Headless Install for Raspberry Pi?
You don't need to give the Pi its own screen and keyboard if you merely want to explore with it or use it to control physical devices like lights, motors, and sensors. If you follow our separate instructions for doing a headless install on the Raspberry Pi, you may control the device from the desktop of your PC or Mac using VNC or SSH remote access software.
Downloading and Installing Raspberry Pi OS
The boot disc you will need to setup your Raspberry Pi may be made using the steps below after you have all the necessary parts. On a PC running Windows, Mac, or Linux, these steps ought to work (we tried this on Windows, but it should be the same on all three).
- Insert a microSD card or reader into your computer.
- Download and install the official Raspberry Pi imager. This app, which is compatible with Windows, macOS, and Linux, will download and install the most recent Raspberry Pi OS. There are other ways to do this, such as downloading a Raspberry Pi OS image file and then using a third-party app to “burn” it, but the imager makes it simpler.
- Click Choose OS.
- Select Raspberry Pi OS (32-bit) from the OS menu (there are other choices, but for most uses, 32-bit is the best).
- Pick the SD card you're using by selecting Choose Storage.
- Click the settings button or hit CTRL + SHIFT + X to enter settings.
- Fill up the following settings fields, then click Save. To get your Raspberry Pi setup and online as soon as you boot it, all of these fields are technically optional but strongly recommended. The initial boot will prompt you to establish a username and password if you don't do so here.
- Set hostname: the name of your Pi. It could be “raspberry pi” or anything you like.
- Enable SSH: Allow SSH connections to the Pi. Recommended.
- Use password authentication or a public key: as the method of logging in via SSH.
- Set your username and password: Pick the username and password you'll use for the Pi.
- Configure wireless LAN: set the SSID and password of the Wi-Fi network.
- Wireless LAN country: If you're setting up Wi-Fi, you must choose this.
- Set locale settings: Configure the keyboard layout and time zone (probably chosen correctly by default).
- Click Write. The app will now take a few minutes to download the OS and write to your card.
Booting Your Raspberry Pi for the First Time
It's time for the moment of truth when you've finished writing the Raspberry Pi OS to a microSD card.
- Insert the microSD card into the Raspberry Pi.
- Connect the Raspberry Pi to a monitor, keyboard, and mouse.
- Connect an Ethernet cable if you plan to use wired Internet.
- Plug the Pi in to turn it on.
If you created a username and password using the Raspberry Pi Imager settings, you may enter the desktop environment straight away; otherwise, a setup wizard will appear.
Using the Raspberry Pi First-Time Setup Wizard
The desktop will appear on the first boot if you set a username and password in the Raspberry Pi Imager settings before writing the microSD card. On the initial boot, a setup wizard will urge you to establish a username and password and input all the network details. If that occurs, follow these steps to complete setting up your Raspberry Pi.
- Click Next on the dialog box.
- Click Next after selecting your language and country. The default choices could already be correct.
- Enter the username and password you wish to use for your primary login. Click Next.
- Toggle If the borders of the desktop are cut off, turn “Reduce the size of the desktop” on. Alternatively, just click Next.
- If you are connecting over Wi-Fi, select the appropriate Wi-Fi network app on the screen. You may skip this if you don't have Wi-Fi or are using Ethernet.
- Enter your Wi-Fi password (unless you were using Ethernet and skipped it).
- When prompted to update the program, click Next. This may take many minutes and will only work if you are connected to the Internet. Click Skip if you are not currently connected to the Internet.
- Click Restart.
By selecting Options -> Raspberry Pi Configuration and clicking on the Pi icon in the upper left corner of the screen, you can see the region and password settings, as well as many other choices if you wish to modify them later. The Wi-Fi or network icon on the taskbar may be used to set up Wi-Fi by clicking on it.
Changing Your Screen Resolution on Raspberry Pi
Make sure your screen resolution matches the capabilities of your monitor if you don't have enough desktop real estate. Even if you are using a headless Pi and connecting to it through VNC, you should still aim for a screen resolution of at least 720p.
To change the Raspberry Pi resolution:
- Choose Preferences -> Screen Configuration to access the screen configuration menu by clicking on the Pi icon.
- Select your resolution from the resolution menu by right-clicking on the HDMI box.
- Click the Check box. The screen resolution will be updated.
- Click Yes to reboot.
What Do I Do Now?
There is a tonne of different things you can do with your Raspberry Pi now that you've set it up. Turning your Raspberry Pi into a vintage arcade machine, using it as a web server, or using it as the brain for a robot, security system, or customized IoT device are some of the more common uses.
Here are some tutorials to get you started.