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
What are the most important tips to know when you are a beginner? The first question beginners may have:
How to enable SSH: sudo service ssh start
How to update your system: sudo apt-get update && sudo apt-get upgrade
How to set a static IP: edit /etc/dhcpd.conf
How to change the keyboard layout: sudo raspi-config
There are a lot more, as we’ll see in this post Feel free to use the content menu below to go directly to the tip you are interested in
Table of Contents
Get started
Hardware
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 See 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
Raspberry Pi Course Sale: 10% off today. Take it to the next level.
I'm here to help you getting started on Raspberry Pi, and learn all the skills you need in the correct order.
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 you one on this page
Once you have both hardware and SD card ready, you can 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
For all 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, first look in the main menu if you could find something to do the same Often you can do this in the Main menu > Preferences> Raspberry Pi configuration tool
Default password
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 (enter rqspberry for example 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 have to change it using raspi-config: sudo raspi-config
Then go to Localization and change the keyboard layout You can also change here some 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 it in detail before looking for a complicated command
On the Desktop version, I never had issues with the keyboard because you can configure it directly in the welcome wizard But if you have any 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: passwd
This command will ask you the current and the new password If everything is correct, the password will change immediately (your current session will stay active)
Don’t enable any remote connection tool (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: ifconfig
This command will show you the current IP address
The first IP (eth0) is for the ethernet cable, 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: date
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: sudo raspi-config
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 be run with root privileges
pi@raspberrypi:~ $ whoami pi pi@raspberrypi:~ $ sudo whoami root
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: sudo su
Another tip for sudo is to use sudo !! to run the last command with sudo (if you forgot it) sudo !!
You can find more details in this tutorial if you are interested
Enable SSH
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 it, you’ll need 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
After a new install and also regularly, you need to update your system, to get the last version of each installed package
Firstly 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 distribution upgrade sudo apt-get dist-upgrade
Install a new software
To install new software, you need to know the exact package name To do this the best way 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 You may also know vim which is another good editor, but on Raspberry Pi OS only nano is installed by default
To edit a file, you need to use nano with the file name in the parameter Here are some examples: nano nano test.txt nano /home/pi/Documents/file.txt 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 For example:
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: sudo reboot
Run and schedule a script
If you start creating scripts or using advanced software, you may need 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 crontab -l
To edit the crontab list crontab -e
This command will open the crontab with nano (you can choose another editor the first time)
For each new script to 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
Uninstall programs
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 one 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 could check this article on how to uninstall programs There are some other tips to free space at the end
Create backups
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, …)
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 in Raspberry Pi OS how to play games 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 game download on this post I also have many other posts on the topic, use the search engine to find them 🙂
Free space
If your SD card is full, you may need to free space
To see your current disk usage, use df df -h
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: cd / 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 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)
Check temperature
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: /opt/vc/bin/vcgencmd measure_temp
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: sudo adduser
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 like this: sudo visudo
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, check this post
Disable Wi-Fi
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: ifdown wlan0
The interface will come up at the next boot, or you could force it with this command: ifup wlan0
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 dtoverlay=pi3-disable-wifi
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
Use camera
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 about this: the camera port is not enabled by default You have to do it using the raspi-config tool: sudo raspi-config
Then go to :
Interfacing options
Camera
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’s not 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 blkid Note 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 ls /media/usbkey
It should be ok now
This procedure will automatically mount this key at each boot if you plugged it before If you plugged it after the boot, you’d need to use the mount command
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
Conclusion
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
I'm the lead author and owner of RaspberryTips.com.
My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials.
In real life, I'm a Linux system administrator with a web developer experience.
To start using Raspberry Pi, you will need many accessories to make it work properly. The screen is probably the most expensive accessory if you're starting from scratch.If you have an iPad at home,...
For most people, the Raspberry Pi operating system (whatever the one you use) will do this in the background, and it shouldn't be an issue.But in some cases, like if you are just getting started on...