Login Register



Print Friendly, PDF & Email
Print Friendly, PDF & Email
(Reading time: 4 - 7 minutes)

Setting Up Your New Raspi

Now that you have your new Raspberry Pi computer this article will show how to get it set up and operational.

  1. If you did not get a micro-SD card when you ordered your Raspberry Pi computer you will need to:

    1. Get a blank micro-SD card. He Minimum recommended is 8 GB.

    2. Download the operating system of your choice from https://www.raspberrypi.org/downloads/raspbian/ to your desktop or laptop. Here you will have a choice of 3 versions of the Raspian operating system. These are Linux versions based on the Debian operating system. They are all available as a Torrent download or as a ZIP download. The versions available as of the date of this are:

      1. NOOBS

        This is known as: “New Out Of the Box Software” and consists of Raspian and well as several other operating systems. I have looked at it and would recommend not using it and instead use one of the below options.

      2. Buster Full

        This version contains over 35,000 additional applications that will increase your productivity while using your Raspberry Pi. The size of this file is 2530 MB.

      3. Buster Desktop

        This version contains fewer applications and the file 1136 MB. The application included provide for a general purpose computer system.

      4. Buster Lite

        The smallest of the files weighs in at only 434 MB. This version is designed to be used in the Headless Mode such as for a web server or an embedded system.

      5. Third Party Operating System Images

        Located at https://www.raspberrypi.org/downloads/ are 11 other operating systems that can be installed on your Raspberry Pi.

    3. Download and install Balena Etcher to your desktop or laptop. This is an application that will allow you to easily burn/copy the above software you have downloaded to your micro-SD card. The above link will tell you everything you need to know about the program and how to install and use it. By using this program you will NOT need to unzip the file before installing it on the card or memory stick. If you will be using your computer in the headless mode, before you remove it from your main computer create a empty file in the “/boot” directory called ssh. Just plain ssh without any extension or anything else.

    4. Once you have the software copied to the micro-SD card insert it in your Raspberry Pi computer. Then plug the PSU to the computer and the transformer to the electrical outlet.

    5. If using either option 2 or 3 at the top left will be a raspberry icon. Click on it and it will give you a menu list of options.

      1. On the “Localisation tab” you should set all 4 of the items for your local area. Today I discovered a problem with my Raspi is that if you live in any country other than the UK, you should NOT change the password first if you use special characters such as “#” or “!” in your password. You should first change “Location/Keyboard” from the Raspberry Pi Configuration or sudo raspi-config if in the terminal mode, to your current location and then change your password. The reason for this is that the default keyboard is set to a UK location and some of the keys are different on the UK keyboard from keyboards from other countries. I found this out the hard way as I changed my password and then the keyboard location and was NOT able to log in again as I use some special characters in my password. For information on how to do this see: Chapter 14.

      2. The next item you should select is “Change Password” and enter your own secure password.

      3. Another item you will see is “Boot”. This will allow you to select where you want it to boot to when it is turned on. It will be either “Desktop” or CLI which means “Command Line Interface”, or to the terminal. This option will only be available if you install Buster-Full or Buster-Desktop. Buster-Lite does not have a “Desktop” to start, only a CLI.

      4. On the “Interfaces tab” I generally select “SSH Enabled” so I can connect with my laptop to the Raspi. This is required if you plan to use your Raspi in the headless mode. If you have a camera attached to the Raspi you could also check the enabled button for that.

      5. You can go back to this menu option at any time in the future if you need to change any of the items.

      6. You might want to check out the other options presented on the menu. After you have made your changes it will ask if you want to reboot. In order for your changes to take effect it will require you to reboot so just select “Yes”.

    6. Also on the top line menu will be a small black box with a “>_” in it and if you mouse over it it should show the word “Terminal”. Click on this and it will open a terminal screen or more than one screen. I close all of the extra ones by clicking on the X in the upper right corner. You should then enter “sudo apt update”. It may ask for your password, if so enter it. It will then display a number of lines of text, which will scroll by too fast to be read so don’t worry about them. It will then show either a number of applications to be upgraded or say “All applications are up to date.”, which means you are good to go. If it shows a number to be upgraded enter “sudo apt upgrade -y”. It will then do the upgrade. If it is the first time this is done there will probably be a lot to upgrade so it will take awhile. These commands should be run on a regular basis as there are generally new upgrades being published. You can then close the terminal window and do whatever you need to do.

  2. As an additional security option you should perform the following in a terminal window

    1. Enter sudo add new user name. You will then be asked for a password. You should then enter sudo adduser new user name sudo. This will add the new user to the sudoers group so they can perform root actions. Then log out and log back in again as the new user. Then enter sudo visudo. The first time you run this command it will ask which editor you want to use. I generally choose “nano”. Scroll to the end of the file and enter new user name ALL=(ALL) NOPASSWD: ALL Press CTL_X, Y and ENTER to close and save the file. When you enter a sudo command it will no longer ask for your password. This is optional as it will lessen security but will increase productivity.

      You should now delete the PI user with the following command: sudo userdel -r pi as this improves security if the bad guys try to log in as pi and it is no longer there.

Summary

You should now have your Raspi up and running with a lot to learn about it and how it can help you with your daily computer tasks. One thing to remember is the Raspi has a limited amount of memory and the processor is not as fast as your laptop or desktop computers. This means it could crash more often if you have a lot of windows open and any action will take longer due to the slower speed. Supposedly the model 4 has eliminated some of these problems.

Print Friendly, PDF & Email
(Reading time: 2 - 3 minutes)

Using Your Raspi in Headless Mode

What it means to be in Headless Mode.

This means the Raspi is NOT connected to a keyboard,monitor, or mouse.

How can you use the Raspi if you are not connected to it?

The way this works is that you connect from another computer, either a desk top or a laptop through Secure Shell or SSH. During the initial setup you should have selected the SSH option from the raspi-configure window and turned it on.

What if you do NOT have a monitor or keyboard?

Luckily you can still set up SSH using your laptop or desktop computer system. The way you will do this is as follows:

  1. After you have installed the operating system on the new SD-card and it is still in your other computer open a file manager of your choice and look for a directory called “boot”. Do a “cd” to change to that directory. Once in that directory create an empty file using the command “touch ssh”. Now insert this card into your Raspi and power it up by connecting the power supply. Because that “ssh” file exists your Raspi will now have SSH enabled and you can access it from your other computer provided you know the Raspi’s IP address.

  2. There are several ways you can discover the Raspi’s address:

    1. Make sure that your Raspi is connected to the same network as your other computer. If you other computer is running Linux (as it should be) just enter the following command from a terminal “nmap -sn 192.168.1.0/24 (or 192.168.0.0/24 depending on how your router is configured)”. You may have to use “sudo” in front of the above command. When I ran the command with the sudo it showed the ip addresses and the words (Raspberry Pi Foundation) for 3 of my Raspis.

    2. You can also try the command “ping raspi” or “ping raspberrypi”. However neither of these commands worked on my systems, maybe because I had already changed the names of my Raspis.

Now from a terminal on your other computer enter the command “ssh This email address is being protected from spambots. You need JavaScript enabled to view it. or whatever the ip address what that you found in the above steps. It will now ask for your Raspi password. Enter it and do whatever you need to do on the Raspi.

Print Friendly, PDF & Email
(Reading time: 4 - 7 minutes)
Popular

Setting Up Your New Raspi

Now that you have your new Raspberry Pi computer this article will show how to get it set up and operational.

  1. If you did not get a micro-SD card when you ordered your Raspberry Pi computer you will need to:

    1. Get a blank micro-SD card. He Minimum recommended is 8 GB.

    2. Download the operating system of your choice from https://www.raspberrypi.org/downloads/raspbian/ to your desktop or laptop. Here you will have a choice of 3 versions of the Raspian operating system. These are Linux versions based on the Debian operating system. They are all available as a Torrent download or as a ZIP download. The versions available as of the date of this are:

      1. NOOBS

        This is known as: “New Out Of the Box Software” and consists of Raspian and well as several other operating systems. I have looked at it and would recommend not using it and instead use one of the below options.

      2. Buster Full

        This version contains over 35,000 additional applications that will increase your productivity while using your Raspberry Pi. The size of this file is 2530 MB.

      3. Buster Desktop

        This version contains fewer applications and the file 1136 MB. The application included provide for a general purpose computer system.

      4. Buster Lite

        The smallest of the files weighs in at only 434 MB. This version is designed to be used in the Headless Mode such as for a web server or an embedded system.

      5. Third Party Operating System Images

        Located at https://www.raspberrypi.org/downloads/ are 11 other operating systems that can be installed on your Raspberry Pi.

    3. Download and install Balena Etcher to your desktop or laptop. This is an application that will allow you to easily burn/copy the above software you have downloaded to your micro-SD card. The above link will tell you everything you need to know about the program and how to install and use it. By using this program you will NOT need to unzip the file before installing it on the card or memory stick. If you will be using your computer in the headless mode, before you remove it from your main computer create a empty file in the “/boot” directory called ssh. Just plain ssh without any extension or anything else.

    4. Once you have the software copied to the micro-SD card insert it in your Raspberry Pi computer. Then plug the PSU to the computer and the transformer to the electrical outlet.

    5. If using either option 2 or 3 at the top left will be a raspberry icon. Click on it and it will give you a menu list of options.

      1. On the “Localisation tab” you should set all 4 of the items for your local area. Today I discovered a problem with my Raspi is that if you live in any country other than the UK, you should NOT change the password first if you use special characters such as “#” or “!” in your password. You should first change “Location/Keyboard” from the Raspberry Pi Configuration or sudo raspi-config if in the terminal mode, to your current location and then change your password. The reason for this is that the default keyboard is set to a UK location and some of the keys are different on the UK keyboard from keyboards from other countries. I found this out the hard way as I changed my password and then the keyboard location and was NOT able to log in again as I use some special characters in my password. For information on how to do this see: Chapter 14.

      2. The next item you should select is “Change Password” and enter your own secure password.

      3. Another item you will see is “Boot”. This will allow you to select where you want it to boot to when it is turned on. It will be either “Desktop” or CLI which means “Command Line Interface”, or to the terminal. This option will only be available if you install Buster-Full or Buster-Desktop. Buster-Lite does not have a “Desktop” to start, only a CLI.

      4. On the “Interfaces tab” I generally select “SSH Enabled” so I can connect with my laptop to the Raspi. This is required if you plan to use your Raspi in the headless mode. If you have a camera attached to the Raspi you could also check the enabled button for that.

      5. You can go back to this menu option at any time in the future if you need to change any of the items.

      6. You might want to check out the other options presented on the menu. After you have made your changes it will ask if you want to reboot. In order for your changes to take effect it will require you to reboot so just select “Yes”.

    6. Also on the top line menu will be a small black box with a “>_” in it and if you mouse over it it should show the word “Terminal”. Click on this and it will open a terminal screen or more than one screen. I close all of the extra ones by clicking on the X in the upper right corner. You should then enter “sudo apt update”. It may ask for your password, if so enter it. It will then display a number of lines of text, which will scroll by too fast to be read so don’t worry about them. It will then show either a number of applications to be upgraded or say “All applications are up to date.”, which means you are good to go. If it shows a number to be upgraded enter “sudo apt upgrade -y”. It will then do the upgrade. If it is the first time this is done there will probably be a lot to upgrade so it will take awhile. These commands should be run on a regular basis as there are generally new upgrades being published. You can then close the terminal window and do whatever you need to do.

  2. As an additional security option you should perform the following in a terminal window

    1. Enter sudo add new user name. You will then be asked for a password. You should then enter sudo adduser new user name sudo. This will add the new user to the sudoers group so they can perform root actions. Then log out and log back in again as the new user. Then enter sudo visudo. The first time you run this command it will ask which editor you want to use. I generally choose “nano”. Scroll to the end of the file and enter new user name ALL=(ALL) NOPASSWD: ALL Press CTL_X, Y and ENTER to close and save the file. When you enter a sudo command it will no longer ask for your password. This is optional as it will lessen security but will increase productivity.

      You should now delete the PI user with the following command: sudo userdel -r pi as this improves security if the bad guys try to log in as pi and it is no longer there.

Summary

You should now have your Raspi up and running with a lot to learn about it and how it can help you with your daily computer tasks. One thing to remember is the Raspi has a limited amount of memory and the processor is not as fast as your laptop or desktop computers. This means it could crash more often if you have a lot of windows open and any action will take longer due to the slower speed. Supposedly the model 4 has eliminated some of these problems.

Print Friendly, PDF & Email
(Reading time: 2 - 3 minutes)
Popular

Change your location.

This article will show you how to change your location data in the new Raspi.

Using the Raspi configuration tool.

  1. Select option #4 Localisation Options from the main menu screen.

  2. Press the Tab Key” to select “OK” and then press the “Enter key” at the end of each step to proceed to the next step.

  3. Select option #I1 Change Local

    1. If not in the UK scroll down to the item that has a ”* en_GB.UTF-8 UTF-8” in it and press the space bar to remove the “*”.

    2. Scroll up or down to find your language and location. Mine is en for English and US for US and then UTF-8. I would then press the space bar to select this location.

    3. The next screen that pops up will ask you to select another option. I would select en_US.UTF-8 as I am the only user and speak that language. Read the statement at the top of the screen if more people will use your Raspi and they speak a different language.

    4. It will then take you back to the main menu.

  4. Repeat #1

    1. Select I2 Timezone

      1. Select your area from the list provided and press “Enter”

      2. Select your city or region from the list provided. Press the first letter of the city or region and it will take you to the part of the list that starts with that letter. Then scroll up or down to select the nearest city or region to where you are.

  5. Repeat #1 again.

    1. Select I3 Change Keyboard Layout.

    2. Select your keyboard from the list provided. If your exact keyboard is not shown, select one that is close to it. Mine is a “Rapoo” keyboard which is not on the list so I select “Dell 101-key PC and this works for me.

    3. The next screen to pop up lists a lot of English(UK) keyboards and at the bottom of the list there is “Other” which is what I choose as I do not have UK keyboard.

    4. The next screen lists many different languages and I select “English (US).

    5. Now it lists many different English (US) keyboards so I scroll to the top of the list where it says “English (US).

    6. It now lists “AltGr” keys. Read the statement at the top of the screen to see what this means. I select “No AltGr key”.

    7. Now comes something about a “Compose Key”. I select “No Compose Key”.

  6. Repeat #1 once again.

    1. Select I4 Change Wi-Fi Country.

    2. It will now give you a list of countries for you to check yours to set the country where the wi-fi will be used. It will show you the country you have selected and after selecting OK it will take you back to the main menu. This ends the setting of the localization settings. You should now change your password.