New Method to Setup Raspberry Pi 4 64-Bit (Headless, Remote Desktop, or Peripheral Devices)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is how to set up a Raspberry Pi 4 model B using all the latest and greatest tools we'll also cover the different connection options so whether you have a keyboard Monitor and mouse or instead intend to go headless from the terminal or even want to connect remotely over remote desktop we got you covered and at the end I'll explain whether I think Raspberry Pi's are ultimately worth it and show you some cool projects I built out like a license plate detection system and how I even managed to earn money mining Monero cryptocurrency on my Raspberry Pi now this approach is focused on the Raspberry Pi 4 model B but it should work for older and adjacent models as well such as the pi 3 or Pi zero so for those coming in cold a Raspberry Pi is a single board computer about the size of a credit card what's amazing about it is it only costs 35 dollars it's often touted as an accessible entry point for children to learn about programming but is often used by hobbyists to build out smart appliances for residential or commercial purposes most people have no idea but in 2018 Raspberry Pi became the third best-selling computer of all time now the market is crashing Supply chains are in shambles raspberry pies are more elusive than a McRib sandwich right now which has even led to the rise of the Raspberry Pi black markets where the going rate is 400 percent the retail price okay technically it's not a black market but it still feels like price gouging but if you're watching this then that means you got your hands on a Raspberry Pi hopefully without having to sell a limb and this video is going to give you the most up-to-date method that I know of to set up your Raspberry Pi let's get started and this is the anatomy of the Raspberry Pi 4 so you can see all the different ports and connection options available to you okay so the first thing we want to do is take our micro SD card out of our Raspberry Pi I'm using a 32 gigabyte card here now we need to be able to connect this to our computer somehow and there are different modes by which we can do that this is a micro to SD adapter this is a micro to USB adapter and this is a micro to USBC adapter so pick your poison I'm going to use the micro to SD and then what I'm going to do is throw this right into my computer because my computer has a native SD card reader okay so now that the micro SD card is inserted into our computer I'm going to just pull open my finder window here and just verify that I can see it it should be called Boot and it should be a removable drive here so that looks good so the first thing we're going to want to do is download Raspberry Pi imager which is how we Flash the operating system to our micro SD card so I'm going to go to raspberry pi.com and then from here we're going to click software and then we're going to download the imager version for our operating system system I'm going to use Mac OS and then we're just going to install this real quick and then I'm just going to remove this because it's installed and now we want to choose our operating system so the Raspberry Pi 4 is a 64-bit CPU and 64-bit is going to perform better than 32-bit and fast in fact some operations are going to be up to 25 faster the problem is the 64-bit version of the operating system is not quote unquote stable yet so what you'll find is if you go ahead and download one of these 64-bit versions you might find that certain packages aren't missing you'll encounter more bugs and actually that was the case for me when I tried to use the Raspberry Pi camera I noticed that a lot of the packages weren't working on 64-bit so if you want to avoid those headaches then I would go ahead and just use the stable 32-bit version of the operating system for now in addition to that based on what you're trying to do you might find that you want to use a light version of the operating system so this is is Raspberry Pi light and as you can see it's 300 megabytes whereas the full Raspberry Pi is about 10 times larger but it's really not just the size of the operating system that is relevant to this consideration in fact I don't think that's even the main consideration when you're thinking about using full versus light the full version of Raspberry Pi is going to come with the graphical user interface it's going to come with all the bells and whistles whereas the light version is going to remove a lot of the non-critical components of the operating system and as a result you're going to have less memory and resources being used to support things like the graphical user interface so for instance when I made my video about mining Monero on my Raspberry Pi I wanted as much of the Raspberry Pi's power as I could get I wanted as much of the RAM and as much of the CPU as I could get so that I could max out my hash rate well that might be a good case to use Raspberry Pi light so that I could harness more of those resources the CPU and memory to increase my hash rate but for the the sake of this example we're just going to go ahead and use the standard 32-bit or if you're looking to be a black hat hacker you can download Linux Cali and use your own custom image okay and now we need to choose our drive and again be careful here because you're going to overwrite whatever drive you select but this is right this is my 32 gigabyte micro SD card so I'm going to go ahead and select that okay and you'll notice once we select our storage this guy comes up here and this is the advanced configuration module so if we click into this this is going to give us all the options that we need to pre-configure our Raspberry Pi on Mac in order to open it you want to use the hotkeys Ctrl shift X and it should be the same on Google and Linux just Google it if it's not working for you so the goal of this menu is to set up our Raspberry Pi so that it automatically connects to our Wi-Fi network in the case that we're doing a headless connection but even if you're not doing a headless connection I would it suggests setting this up so that we don't have to do it once our Raspberry Pi has started so right here this is going to be the default host name let's just go ahead and keep that you could customize this if you want to but I don't see any reason to we want to enable SSH and in order to do that it's going to ask us to set a password the default password is raspberry but let's go ahead and set our own password to keep things secure and the username is going to be Pi that's fine all right let's configure our Wi-Fi so we're going to select configure wireless LAN this is my network name and then I'm just going to supply the password here okay so the Wi-Fi connections are set the country code is set time zone is set and then we want eject media when it's finished basically once we install the operating system it's going to eject the drive so that we can pull it out of our computer without losing anything okay so this looks good to me I'm going to go ahead and click save okay that took about five minutes and you can see we're all set now and we can also see that the card has been ejected so we can go ahead and safely remove it from our computer okay so I'm just going to go ahead and remove this from my computer and we're going to pop out the micro SD card and then we're going to pop it into the Raspberry Pi okay and then I'm going to connect the USBC power source and I just flipped it on and now you can see the booting lights there so let's start with connecting remotely via SSH okay so I'm just going to pop open a terminal here and the first thing we want to do is just make sure that we are able to talk to the Raspberry Pi and we do that by running ping to the host name so those Raspberry Pi dot local and these responses here every couple seconds icmp just says that the device is on the network and that it's responding to icmp traffic so that's actually what we would expect so we should be able to just go ahead and establish a connection over SSH so the command for that is SSH username and the default username is pi at hostname or IP address but the host name is going to be easier raspberry pi.local alright so this is giving me an error because I have established prior connections and the fingerprints are not matching so the way we fix that is that we're going to go into the known host file and we're just going to clear it out so it spat out the location so I'm just going to do Vim which is how you edit a text file and I'm going to clear these guys out right those are old connections and then I'm going to run the same command SSH Pi raspberry pi.local and now it's saying we're good to go do we want to establish a new fingerprint answer is yes and it's going to ask the password that we set up in the pre-configuration menu okay and now I'm in my Raspberry Pi right so I can go to the root directory so one thing I like to do when I get into the terminal is I immediately do sudo Sue Dash and that's going to elevate me to a root user and root user just gives you the ability to do anything and I always want that ability so if I go to the home directory here right so I can go to home I can go to Pi so let's go ahead and connect over VNC now VNC is served by a process that runs on the Raspberry Pi that we need to turn on it's not enabled by default so I'm going to do razzpi hyphen fig and then we're going to do interface options and then right here VNC so we're going to do VNC would you like to enable the service yes okay it's saying it's enabled okay and then for remote desktop to work we also need to enable a couple other things we're going to go to raspy config and we're going to go to display options and we're going to select a resolution we'll do the highest okay and then we also want to set up desktop login so we're going to go to system options and then we're going to go to boot Auto login we're going to select uh desktop GUI here and it's going to require that we reboot so let's go ahead and do that okay it looks like it's up so let's go ahead and connect over SSH it's Elevate to root okay and then we are going to connect using VNC and so there are different VNC clients right as remote desktop there's TeamViewer and stuff like that I use VNC viewer because it is free so I'm going to openvnc viewer here and it's going to say enter a VNC server address oh I'm going to use the IP address to continue okay this is looking better and basically now you can interact with your device as if it were just a regular desktop computer right so one thing I would do is update the Raspberry Pi so let's just do install updates this can also be done from the command line using SSH all right so we just like installed all the packages yeah let's go ahead and reboot again we're going to lose our connection that's to be expected okay it looks like the Raspberry Pi is back up so let's connect over VNC again so I should be able to just double click this here and then throw my password in here and super quick I know we use the IP address to connect but you should also be able to use the host name so I'm going to do Raspberry Pi dot localhost names leverage local DNS which sometimes needs to like update and get propagated yeah it's giving me trouble with this so I think my local DNS needs to clear before this is going to work let's see if I can't flush my local DNS and see if that helps boom okay so yeah you can use the hostname or the IP address and then just to quickly show you that we are in fact connected to the same device over SSH so on the right you're seeing the desktop right so I'm going to navigate to the desktop here and what I can do is I can create a file right test one two three data Slayer right so you see the files right they show up on the right here and then I can go ahead and remove these and you can see it take effect there right we now have uh SSH over here and then we have VNC over here and then the final way to connect would be to just physically connect our device to like a monitor keyboard and mouse so I will go ahead and show you that real quick all right so now I just want to show you how to set this up with real peripheral devices I'm going to connect into this mini HDMI port here and then I'm going to connect this to my monitor I don't know if you know if you could do a hot connection like that you might have to reboot their Raspberry Pi so I'm going to reboot the raspberry over here and there it goes but anyways that's the easiest way to do this with just a real purple devices if you like this video then you're going to love my video showing how I created a license plate recognition system using a Raspberry Pi and a custom tensorflow deep learning model which you can check out right over here anyways thanks for watching
Info
Channel: Data Slayer
Views: 36,057
Rating: undefined out of 5
Keywords: Data Slayer, pi 4, canakit, how to setup raspberry pi, how to setup raspberry pi 4, raspberry pi 4 tutorial, noobs, raspbian, raspberry pi, etcher raspberry pi, raspberry pi 3 b+, arduino vs raspberry pi, arm cpu, small computer, raspberry pi tutorial, raspberrypi.local, raspberry pi 3 setup on mac, mac os on raspberry pi 3, install raspbian on micro sd card, etcher, install raspbian, raspberry pi 3, raspberry pi 3 setup, diy, how to, raspberry pi os, 64-bit, raspberry pi os lite
Id: aG3hmzW03cs
Channel Id: undefined
Length: 12min 55sec (775 seconds)
Published: Tue Oct 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.