The purpose of this article is to provide quick help to beginners on Raspberry Pi.
This post is a collection of answers to questions you will inevitably ask if you start on Raspberry Pi.
The best way to get started on Raspberry Pi is to follow a simple plan: hardware, software, projects.
Choosing the best hardware in each scenario is a first challenge, but the real thing is to master the software part, which involves the use of Linux (with a specific interface and commands). Unlimited project ideas are possible once this is understood.
Obviously, each section has many steps, as we will see in this article. But starting in the wrong order will mess up your progress.
Feel free to use the content menu below to go directly to the tip you are interested in.
By the way, if you are new to Raspberry Pi and want a step-by-step guide on how to do anything with it, feel free to check my e-book “Master your Raspberry Pi in 30 days”. It’s a 30-day challenge in which you’ll learn one new skill each day by practicing along the way. You’ll save time, money and start to enjoy any new project you want to try.
Before the first start, you need to plug the power cable to the mini USB port (or USB-C on Pi 4).
If possible, also plug an HDMI cable to your screen or TV and a keyboard.
Visit my recommended products page for a good Bluetooth keyboard.
If you get some heatsinks with your kit, they are not mandatory, but you can install them following this tutorial.
If it was not provided with your kit, you need to create a new SD card with Raspberry Pi OS on it (see next paragraph).
You need a micro SD card like in some phones or cameras.
If you don’t have one, I also recommend one on this page.
Once you have both hardware and the SD card ready, start the Raspberry Pi by clicking the power switch (there is no button on the Raspberry Pi directly, it starts as soon as it’s powered).
Install Raspberry Pi OS
If you are new on Raspberry Pi, Raspberry Pi OS is a Linux distribution optimized for Raspberry Pi (ex Raspbian).
You need to create an SD card with Raspberry Pi OS on it, and then start the device.
You can follow this guide to install Raspberry Pi OS (Raspbian) for the first time.
There are two versions of Raspberry Pi OS:
- Lite: without GUI, for embedded systems or to save power or disk space.
- Desktop: with GUI, to use it as a classic computer.
If you are new in Linux or Raspberry Pi, I recommend installing Raspberry Pi OS with Desktop.
Get a command line
For the tips below, I’ll only explain how to do it with commands so that everyone can follow them.
If you have the Desktop version, you can use the Terminal app to enter the following commands.
You can find it in the taskbar or in the main menu, under “Accessories”.
Most of the time there is an equivalent for the Desktop version, to do this with a graphical tool.
If you don’t want to use commands, look in the main menu to see if you can find something to do the same.
Often you can do this in the Main menu > Preferences> Raspberry Pi configuration tool.
On the first boot, the Lite version will ask you for a login and password.
Here is the default Raspberry Pi OS user:
- Login: pi
- Password: raspberry
On the Desktop version, the welcome wizard will ask you to change this password, so you don’t need this.
Be careful the keyboard layout is US (QWERTY) by default on the Lite version.
I’ll explain in the next paragraph how to change it, but for the first login you’ll have to adapt (for example, enter rqspberry if you have an AZERTY keyboard).
Change the keyboard layout
On the Lite version, the first boot is made in QWERTY mode.
If you have another keyboard layout, you can change it using raspi-config:
Then go to Localization and change the keyboard layout.
You can also change custom options for your keyboard (regions layouts or specific keys).
Raspi-config is a great tool to manage a lot of system options.
Feel free to check the tool in detail before looking for a complicated command.
On the Desktop version, I’ve never had issues with the keyboard because you can configure it directly in the welcome wizard.
But if you have a problem, you can also use raspi-config in a terminal
More details in this post.
Change the password
If you want to change the pi password you can use this command:
This command will ask you for the current and new password.
If everything is correct, the password will change immediately (your current session will stay active).
Don’t enable any remote connection tools (like SSH or VNC) if you haven’t changed the default password. This is a major security issue.
Connect to the network
If you have a DHCP server on your network (generally your Internet box), it will be easy.
As soon as you connect the Ethernet cable, you’ll get an IP address and be connected.
But if you don’t have a DHCP, or if you need to set a static IP, then you have to edit the /etc/dhcpd.conf file:
sudo nano /etc/dhcpd.conf
You’ll find all the information to set a static IP on the Raspberry Pi in my Raspberry Pi OS installation guide.
I also explain how to set up a Wi-Fi connection from a terminal.
If you are on the Desktop version, you can use the graphical tool to configure this. It will be much simpler.
Click on the network icon in the top navigation bar and you’ll get all you need to configure the network connection, with cable or wireless.
Find your IP address
For your first remote connection to your fresh installed Raspberry Pi, you’ll need to find his IP address.
If you have a screen on it, you can use ifconfig to display it:
This command will show you the current IP address.
The first IP (eth0) is for the ethernet cable and the second (wlan0) corresponds to the Wi-Fi connection.
If you are on another computer, you can read this article on how to find the Raspberry Pi IP address.
I explain how to scan the network to find your current IP address.
Change the date/time
To check your current date and time you can use this command:
This command will display the date, the time and the timezone.
If you need to change it, you can use raspi-config to do this:
Go to Localisation Options => Change Timezone.
Then select your Geographic area and your nearest City to set the correct timezone.
Get the root privileges
Debian, and so Raspberry Pi OS, tries to prevent the users from using the root account.
If you have enough privileges (pi has), you can use sudo instead.
Every command you add after the sudo prefix will run with root privileges.
pi@raspberrypi:~ $ whoami
pi@raspberrypi:~ $ sudo whoami
This command will be useful to manage system files or services.
Every time you don’t have access to something, you need to use sudo to unlock it.
Here are some examples:
sudo service ssh start
sudo nano /etc/dhcpd.conf
If you have many commands to run as root, it’s always possible to switch to a root session with this command:
Another tip for sudo is to use sudo !! to run the last command with sudo (if you forgot it):
You can find more details in this tutorial if you are interested.
SSH is disabled by default for security reasons.
If you need it you have to start it with this command:
sudo service ssh start
But as you’ll quickly see, you have to do this after each reboot.
The service doesn’t start automatically.
To start it on each boot, you have to use these two commands:
sudo update-rc.d ssh defaults
sudo update-rc.d ssh enable
On the next boot, SSH will start automatically.
More details about this in this post.
Update the Raspberry Pi
To get the latest version of each installed package, you will need to update your system regularly and after a new install.
First, you need to get the last version of the packages list:
sudo apt-get update
Then upgrade all packages to the last version:
sudo apt-get upgrade
You can also look for a distribution upgrade:
sudo apt-get dist-upgrade
Install a new software
To install new software, you need to know the exact package name
The best way to do this is to use the search tool from apt:
sudo apt-cache search
Here is an example:
sudo apt-cache search myadmin
adminer - Web-based database administration tool
phpmyadmin - MySQL web administration tool
Then you can install your package with:
sudo apt-get install phpmyadmin
Edit files with nano
Nano is a great tool to edit files in the terminal.
Vim which is another good editor, but only nano is installed by default on Raspberry Pi OS.
To edit a file, you need to use nano with the file name in the parameter.
Here are some examples:
sudo nano /etc/dhcpd.conf
Unlike vim, once in the editor you can directly write and edit the text.
There is a list of actions you can do to help with editing.
All are listed at the bottom of the screen.
- CTRL+O: Save the file
- CTRL+X: Exit nano
If you want to know all the shortcuts and commands for Nano, I have a complete blog post about it here.
Stop or restart properly
Most likely, you have already found that it’s possible to turn off the Raspberry Pi by pressing the power button or unplugging the cable :).
But it’s better to do it properly with these two commands.
To stop the Raspberry Pi immediately use:
sudo shutdown -h now
If you use this to stop the Raspberry Pi, you’ll need to press the power button twice for the next start.
And to restart the Raspberry Pi:
Run and schedule a script
If you start creating scripts or using advanced software, you may want to schedule something to start at a specific time.
For this, there is a tool called “cron” on Linux.
You can schedule commands in your user environment by using crontab.
To display all planned crons:
To edit the crontab list:
This command will open the crontab with nano (you can choose another editor the first time).
For each new script you schedule, you have to add a line following this syntax:
A B C D E /home/pi/myscript.sh
The first five columns define the time you want to start the script, following these rules:
- A: Minutes (0-60)
- B: Hour (0-23)
- C: Day of the month (1-31)
- D: Month (1-12)
- E: Day of the week (0-7), 0 and 7 are Sunday, 3 is Wednesday, 6 is Saturday
And the last column is the command to run at this specific time.
If you need to run your script as root, you can use sudo to open the crontab:
sudo crontab -e
Well, if you want to remove some packages from your system, you have to use apt-get to uninstall them.
As for the installation, you need to know the exact package name to remove it.
To search for a package, use this command:
sudo apt-cache search <string>
You can also display all your installed packages with this command:
sudo dpkg -l
Feel free to use grep to filter the output:
sudo dpkg -l | grep
Then, to uninstall the package, enter this command:
sudo apt-get remove <package>
If this is not enough, you can check this article on how to uninstall programs.
There are some other tips to free space at the end.
Backups are an important thing to think about when you start doing a lot of work on your Raspberry Pi.
There are several ways to do this.
- Backup only the critical files (configuration, MySQL database, …).
- Clone the entire SD card.
- Backup the whole system while running.
You’ll find all the information in my backup guide for Raspberry Pi.
Raspberry Pi is often associated with retro gaming, but rarely explains how to do it.
So if you bought your first Raspberry Pi, you might be looking into how to play games with Raspberry Pi OS.
Well, there are some small games in Raspberry Pi OS, but I don’t think that’s what you want.
To play classic games from old game consoles, you need to install the Retropie distribution.
It’s an entire operating system, dedicated to retro gaming.
You can download it from the official website.
And then you’ll find some information about downloading games on this post.
I also have many other posts on the topic, use the search engine to find them :).
If your SD card is full, you may need to free up space.
To see your current disk usage, use df:
This will display something like this:
On the first line, you can see I have 15G on the main partition.
I’m using 1.2G so 9%.
If you are above 80%, this paragraph will help you find and remove unnecessary files.
To get the biggest files on the SD card, I often use this kind of command:
du -ak | sort -nr | head -50
This command will display the 50 biggest files or directories in the / partition.
If you want to focus on a specific folder, change the first line.
Then check if every file in the list is needed for you, if not you can remove it.
Another easy way to gain space is to remove wolfram and LibreOffice if you don’t use them:
sudo apt-get remove – purge wolfram-engine libreoffice*
This command will free about 1G in a fresh Raspberry Pi OS Desktop installation.
You can find more details on how to do this in this post (like how to do the same thing on Desktop).
If you are worried about the temperature of the Raspberry Pi, there is a way to check it.
This command will give you the current temperature of your CPU in real-time:
You have to keep it under 85 °C if possible.
If you exceed this threshold, Raspberry Pi OS will start to run slower.
If you have issues with your Raspberry Pi temperature, consider adding heatsinks or even a fan to keep it low (+an extra tip to display the temperature as an icon on desktop on the same link).
Create a new user
When you install Raspberry Pi OS, a new user is created for you: pi.
But if you want a more personal account, you can create a new one.
To do this, enter this command:
Replace <login> with the name you want for your new user.
This will ask you the password and other optional information.
If you’re going to allow the new user to use sudo, you have to enable it with:
This will open the sudo configuration file.
Scroll down to the line for the pi user and duplicate it.
Something like that:
ALL=(ALL) NOPASSWD: ALL
Then you are ok. The new user has the same rights as pi.
If you want more details about this process, check this post.
You may want to disable the Wi-Fi if you are now plugged by cable.
I already noticed network issues when both Ethernet and wireless connections are enabled.
So, if you’re going to disable the Wi-Fi temporarily you can disable the interface like this:
The interface will come up at the next boot, or you could force it with this command:
But this won’t work if you want to disable it permanently.
To completely disable the Wi-Fi follow these steps:
- Edit the boot configuration file:
sudo nano /boot/config.txt
- Add this line at the end of the file:
- Save and exit (CTRL+O, Enter, CTRL+X).
Until you remove this line in the configuration file and reboot the Raspberry Pi, your Wi-Fi will never come up again.
You’ll find 7 ways to disable Wi-Fi in this post.
The Raspberry Pi doesn’t come with an integrated camera, but you can buy and install one easily (see my recommended products page about this).
However, there is one tip to know: the camera port is not enabled by default.
You have to enable it using the raspi-config tool:
Then go to:
- Interfacing options.
- Confirm that you want to enable the camera interface.
Then you’re ready to go.
You can test the camera with raspistill:
raspistill -o image.jpg
This command will create an image file in the current directory with the camera view.
You’ll find a lot more information to start with the camera in this page.
Mount USB drive
On Raspberry Pi OS Lite you need to mount USB drive yourself, it isn’t automatic.
Follow these steps to mount your USB drive:
- Plug the USB drive in the Raspberry Pi.
- Create a folder in /media to use it later to access the drive:
sudo mkdir /media/usbkey
- Change rights to allow pi to access it later:
sudo chmod 777 /media/usbkey
- List the connected drives to get the UUID:
sudo blkidNote the UUID and the file format. You’ll need this later.
- Edit the fstab file to prepare the mount:
sudo nano /etc/fstab
- Paste this line at the end of the file:
UUID=B17B-299B /media/usbkey vfat defaults,nofail 0 0
Don’t forget to replace UUID and file format to fit your USB drive values.
- Save and exit (CTRL+O, Enter, CTRL+X).
- Mount the drive:
sudo mount /media/usbkey/
- Check that you can see files on it:
It should be ok now.
This procedure will automatically mount this key at each boot if you’ve plugged it before.
If you plugged it after the boot, you’d need to use the mount command.
More details on how to format and mount USB keys by clicking on the link.
A great feature on the Raspberry Pi is the GPIO pins you’ll find on the main board:
These pins have many purposes, like adding hats to your Raspberry Pi.
It’s something similar to the PCI slots on a computer.
But every pin has his role and configuration, and you need to comply with it.
The best thing you can do is to read my basic tutorial on how to start with them.
Unlock the secrets of your Raspberry Pi
As you can see, even the things that seems pretty basic at first glance might take a long time when you are new to Raspberry Pi and Linux. So, trying bigger projects might be frustrating.
My goal on this website is to help you as much as possible, and if you need a boost in your learning, make sure to check my Raspberry Pi boot camp.
It’s a course for anyone who is just starting or want to start, to quickly overcome the first questions and have fun along the way.
The last tip I’ll give you is to follow my articles on RaspberryTips.com.
As the name suggests, the purpose of this site is to help you in all areas when using your Raspberry Pi.
You’ll find how to guides for configuration, commands, software and hardware stuff.
I try to explain all these things step-by-step to make it understandable – even for beginners.
I hope this will help you.
Feel free to use the search engine in the sidebar to find the answer you are looking for.
Here’s the end of these 27 tips to help you to move forward with your Raspberry Pi.
I hope it was helpful and that you have found answers to your questions on this page.
If you need more details or have another problem, feel free to ask it in the comments below.