The New Method to Setup Raspberry Pi (2021 Update)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video we're going to walk you through how to set up your raspberry pi using the new method i saw a lot of guides out there that use noobs and really that's not used anymore noobs is for noobs don't use it we have raspberry pi os we have the updated steps and we're going to show you exactly how to do it from start to finish we're also going to get into some follow-up steps like how to connect to wi-fi how to connect over ssh putty remote desktop vnc so you're going to know exactly how to get your raspberry pi up and running anyways let's get started okay so the first thing we're going to want to do is download raspberry pi imager from the raspberry pi website and this software lets us flash the operating system to our micro sd storage card okay so we need to get the raspberry pi operating system onto our sd card so the software that we want to use is called raspberry pi imager and we're going to get that from raspberrypi.org so let's take a look over there and then we're going to click on software basically what you're going to see here is if we go to all download options so these are the actual raspberry pi operating systems and we're going to want that but we also need a way to get the os onto the sd card we need a flasher and so we're going to use raspberry pi imager and this is going to bundle everything together so let's go ahead and download raspberry pi imager for our system i'm going to download for mac os okay so now we should have raspberry pi imager looks like we do i'm gonna load it up if you like this video go ahead and click that like button so we can get it out to a wider audience thank you okay so this is going to let us flash the operating system to our sd card okay and since we're looking to flash our sd card we're going to go ahead and pull it out of our raspberry pi slot here and just so you know i'm using a sandisk 32 gigabyte micro sd card so we do need to connect it to our computer so that we can get the opera the raspberry pi operating system on this card so you can use one of these guys which is a sd card to usb converter or you can use a micro sd to sd converter and since my mac has a native sd card reader i'm just going to go ahead and use this so i'm going to throw it in there and then i'm going to insert it into my computer here quick note here if your micro sd card is over 32 gigabytes then you may need to format it to the fat32 file system type and that's pretty easy to do both microsoft and mac have native formatting solutions that you can use to do that but if your sd card is smaller than that you shouldn't need to worry about that now that we have our sd connected to our computer let's just double check that it is showing up okay so now that the sd card is connected to my computer i'm just going to look in a finder window to see what drives i have um currently attached and it looks like it is showing up as boot which looks fine to me so let's go ahead and flash the raspberry pi operating system to that drive so we're going to select the operating system we want i'm going to do the out of the box raspberry pi os 32 bit and then we're going to select our storage make sure you're selecting the right storage here because uh if you select the wrong drive you're going to overwrite everything so this is my one terabyte samsung do not want to select that this is my 32 gigabyte micro sd and that's the target drive so we're gonna go ahead and click right okay looks like we're all set that probably took about four minutes so we're gonna come back over to finder here okay it looks like it ejected the drive proactively for us so we can go ahead and pull the drive out of the computer okay so the next step here is we just want to power on our raspberry pi right here so i've connected it via usbc let me just connect this guy into our power strip here okay um all right so the raspberry pi is down here and then uh for this tutorial we're going to use a keyboard and mouse so i will connect those as well mind you we have another tutorial that shows you how to do this whole thing headless without any peripheral devices so go check that out if that um [Music] makes sense for what you're trying to do okay so just plugging in my keyboard and mouse and actually i forgot a pretty critical piece here we want to connect this to um the monitor so ah let's see here okay so we have this thing right here um i think this is a mini hdmi cable but someone yelled at me at the last video because i think i called it a micro so i don't know it's an hdmi cable it's small it's either mini or micro um okay so let's throw it in here [Music] sorry i just need a third hand right now okay so um the hdmi cable is plugged in and that just leads to a standard true full-size hdmi i'm just gonna power on my uh tv here and this should actually just show up right off the bat okay so now everything is plugged in and i'm going to just toggle the switch here and now we can see some activity showing up and then if we look at our monitor here [Music] should show the operating system booting bingo bingo bingo bingo okay so the monitor set up we enabled our raspberry pi there's that very pleasant audible message about installing a screen reader i believe that'll go away when we finish the configuration here so let's just step through i'm gonna mute that for everyone's sanity um okay so united states and we do want to go through this process because there are some quirks that will not work properly if we don't have these selected so i'm just going to select my location and walk through this okay it's prompting us to change the password we should probably do that [Music] looking good and then this is uh optimizing the screen dimensions and then wi-fi it will pick up the networks within close proximity should be able to find hours in connect i name my networks after star wars characters don't ask me why so i had [Music] i had provided the credentials to my network previously otherwise you would just be prompted to provide the password and then we should do a software update because there's been patches and so forth and that will probably take a while okay so the raspberry pi is restarting and now you can see that the border issue is fixed and the dimensions are properly aligned so we're going to do some more configuration here i'm going to open the terminal and run raspi config we're going to first elevate ourselves to root by doing sudo su hyphen and then we'll run raspberry pi hyphen config i'll zoom in for you so razpi could not determine the default user what user should the settings apply to so pi is the default user if you wanted to change the user you would have to do that at the linux level you can't do it through this configuration screen here but if you just follow the generic steps for creating a new user through a linux operating system that will work and then a couple other things we want to enable remote desktop so we go to interface options then we go to vnc and then we enable vnc and that's nice to have because we won't always have a hard wired monitor sometimes we want to remotely connect headless and then additionally for interfacing options we want to enable ssh so that we can access through the command line interface if we so choose we should also make sure that the raspberry pi is updated but we already did that during the initial setup so we should be good there okay so this setup should be all set now it will be more secure more accessible and then for some of these settings to take effect we're going to have to reboot so i'm going to go ahead and do that okay looks like we're back up and running so you know in effect we have a you know small 35 dollar desktop computer that has a decent amount of performance capabilities i mean it has decent amount of ram okay cpu it's it's good for browsing you know obviously not enough for any sort of heavy-duty processing like machine learning or video editing but adequate for a good range of tasks okay now i'm going to show you how to connect to your raspberry pi remotely through ssh and remote desktop this is a really useful capability to have in your tool kit as you interface with your raspberry pi device so now we need to validate that our raspberry pi is in fact connected to our local network so i actually just logged into my router's home page here the admin portal and uh most routers offer this capability where they will list connected devices just so you can kind of audit that um the devices that are connected to your network are the expected devices okay and then when i list the connected devices i see raspberry pi here that is the default host name you can change that if you need i might also see the ip address so this is what i would expect and it's connected to my g network because i have a dual band router and as i mentioned it will not connect to 5g so make sure you keep that in mind so another way to validate that it's on the network if you can't find your router login page is to pull open a terminal okay so i'm just going to open a terminal here expand this guy we should be able to ping the hostname so i'm going to do ping raspberry pi you can see it is responding to uh ping traffic i i see mp traffic so i'm going to do control c to terminate that um quick caveat if you're on a windows machine a windows 10 machine you're not going to have a linux terminal to do with like the ssh and the ping and and that sort of thing so what you're going to want to do is download the linux subsystem if you're on a windows computer you want to download the linux subsystem and once you do that and have it enabled i think you can use like the windows store to download ubuntu or one of the linux operating systems it's actually a really great feature of windows 10 which is you can run a linux container and that linux container will give you a linux terminal which is similar to the unix terminal that i'm running here on my mac and when you have that ready you can do exactly what we're doing here with ping ssh and that sort of thing okay so we're going to show you a couple other ways to connect remotely to your raspberry pi so first we're going to want to connect over ssh we can go ahead and do that right now so i'm just going to do ssh the default username on raspberry pi is pi and then we need to supply the hostname so we're going to do pi at raspberry pi and then it's going to ask us only on the first connection if we want to use the rsa fingerprint we're just going to select yes okay so i have fingerprints from previous connections and it's saying that there's a discrepancy here i'm going to just proceed through that it's prompting me for a password so out of the box the password is raspberry okay and now i'm connected if i do ls just to list um everything so so so raspberry pi os is a debian linux variant so essentially it's just a linux operating system so things will look pretty standard another thing you can do is if you want to save the connection you can do shell new remote connection just select ssh do plus provide the host name in this case it's pi refactored and then user and then yeah that's it so the command is ssh pi pi refactored and we can just test it out here and that looks good okay so now we have a saved connection it's kind of like putty so if you're on windows you could download putty and you can save the connection as well and i just wanted to prove you can do that on mac as well so next if you want a full gui desktop experience with your raspberry pi you can use remote desktop and connect using the vnc protocol okay so to be able to view our raspberry pi's actual gui and desktop we're gonna have to use a vnc client okay so i'm gonna download realvnc and just make sure you're getting the viewer software looks like it works on all platforms so should be able to use this for windows as well okay so i'm going to put the address in here which is using the ip address that we found this is a local terminal if i do dig [Music] i'm sorry the new the no the new host name is pi refactored all right so i believe this is going to be my ip address let's try this okay and then we might have to adjust our local max settings so that we can actually control and screen share properly all right so i'm just giving vnc okay and now you can see we're controlling um our actual raspberry pi okay so right here on the left we have the vnc remote desktop connection where i can actually interface with the gui on on the right we have the ssh connection and what i want to show you is um how the two correlate so like if i navigate to the desktop and that's the um directory being shown here i can create a file right touch test dot txt and you can see it shows up on the desktop see these are just two different ways to interface with the operating system there's the gui and then there's the cli the command line utility and then real quick if you're on windows you another option is to use remote desktop it's a native application that should be able to connect to vnc servers okay and then to wrap this all up let's just do one quick little fun project which is to host a website on our raspberry pi so the easiest way to do this in my mind is to choose a server software i like nginx so i'm going to do apt get install nginx it's asking me to elevate to root so i'm going to go ahead and do that and then i'm going to retype that command and i'm going to install nginx so this downloads the nginx server software and it also should stand up a website that we can visit when we hit the ip address of our raspberry pi okay let's just validate that the website is serving up traffic on localhost so we're just going to do curl localhost okay this is the out of the box nginx website so in theory let's open a new local terminal let's grab the ip address of our raspberry pi so i'm going to do oops i change the hostname to pi refactored so this is my ip address so from here if i do curl on the ip address i get my website so this is making me think if i um open a new incognito window incognito window and go to this ip address boom we're hosting a website from our raspberry pi and just to confirm that that we are in fact hosting that website um i'm going to go to the html directory so i'm going to install a text editor because i want to be able to edit text i'm going to use vim so app get install vim and i'm going to use vim and i'm going to remove the h1 element and add a new h1 element okay and i'm gonna go ahead and save that now when we go back to our website boom and i just want to make a quick plug for all the other really interesting projects that you can do with raspberry pi you can buy add-ons and extensions and modules that can do all sorts of things gps and robotic arms and things like that so there's a whole lot of things that you can do with raspberry pi and i'd urge you to take a look at some of that as always if you're interested in learning about the latest and greatest around emerging tech ai iot google cloud platform go ahead and subscribe to this channel as i am releasing content around those topics on the regular anyways thank you for listening
Info
Channel: Refactored
Views: 39,513
Rating: undefined out of 5
Keywords: 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, arduino, 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, etcher.io, raspberry pi 3, raspberry pi 3 model b+, raspberry pi 3 setup, diy, how to
Id: jRKgEXiMtns
Channel Id: undefined
Length: 21min 14sec (1274 seconds)
Published: Fri Sep 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.