字幕列表 影片播放 列印英文字幕 Hi guys! In these tutorials I'll be talking about Linux programming and the Raspberry-Pi. For those of you who don't know, the Raspberry-Pi is a £15 computer with the goal of teaching children programming. The idea of these tutorials is to help new-comers to get to grips with the basics of Linux. Once the Raspberry-Pi is released in December, I'll move onto how to get it up and running and the various ways you can use it. In the first tutorial, I will assume you are using Windows and will show you how to set-up a virtual machine running Debian Linux. From here we'll set-up an environment similar to the Raspberry-Pi so you can find your way around. Okay, so the first thing you will need to do is download “Virtual Box” which, basically lets you install an operating system on your computer, inside the Operating System you already have. So, we'll go to “virtualbox.org”. Okay, from here, you basically need to go to the downloads section... “Virtual Box for Windows Hosts” and click on “x86/amd64” and then just save this file wherever you want to. I'm saving mine in the tutorial folder for this... in a downloads folder. Okay... This is going to take a few minutes so while this is downloading we can head over and download Debian... So, we go to “www.debian.org” and go [to] “Network Install”... Smaller CDs and choose “i386”... and then save that file in the same place. The reason why were are choosing the “smaller CDs” is basically... Linux is a very modular Operating System so, instead, you can download a tiny CD image and then only install the packages you need from the Internet. Okay... so both of them have downloaded now... So the first thing you need to do is install “Virtual Box”. I would just leave this all as it is... Just the defaults. Short-cut on the desktop... Okay, so what this is saying is... Basically it installs an extra network adaptor because your virtual machines need to connect to the Internet or in this case it does anyway. So, proceed with the installation now? Yes. Install... “Would you like to install this device software?” This is the USB drivers, so basically, you can use it for testing hardware... So, for example, if you wanted to use a web-cam and test your web-cam with Linux then you could directly pass it through to Linux... And this is the network drivers as-well. Alright, so we want to start “Virtual Box”. Right then... So... We want to go “new virtual machine” and then let's call it “Raspberry Pi”. Operating System... Choose “Linux” and then “Debian”. Click “next”. RAM, I'm going to give mine 256 “meg” of RAM because I want the “Model B” Raspberry Pi... And then, “create a new Hard Disk”... “8 gig” will be fine... “Virtual Box Disk Image” is fine... “Dynamically Allocated”... Yeah, you wanna pick this because if you choose “Fixed Size” then the Virtual Hard Drive will always take up 8 “gig” even though that space isn't needed. Where we going to save this... Yeah that can be saved in there... So this has made a new folder called “Virtual Box VMs” in “My Documents” and then a new folder called “Raspberry Pi” and the Hard Drive will be called “Raspberry Pi.vbi”... “Create”... Yep... Okay, so now we have created a our new “Virtual Machine”... we need to load up the “Debian CD”... So “Double-Click” on “Storage” and then go to the “CD Drive”... It says “empty” and click on this icon here and then go “choose a Virtual CD/DVD Disk file” and choose the Debian image that you saved where the “Virtual Box” install was before. Okay... Right and then we can go ahead and run our “Virtual Machine”. Right... Okay... All this is saying is when you click inside the Virtual Machine that any keys you press on your keyboard will go straight to the Virtual Machine until you press “Right CTRL”. So where it says the “Host Key is currently defined as Right CTRL”, when you press that, then you can use your keyboard to control the normal Operating System again. Okay... Yeah, that's fine... Okay... so we've got the Debian installer. Yep, that's fine... Okay... so, then we go “Install”... I'll just [erm] close these messages off... Okay... So... Choose a language... I'm assuming “English” so press “Enter” to choose that. Use the arrows to navigate the menu and then click “United Kingdom” by pressing enter. “British English”... Okay... So this is just loading components from the CD... And then detecting the network hardware... And there we go! It's [erm] your Virtual Machine is on the network... So... “Please enter the hostname”... So that's “raspberrypi”.... Oops, spelled that wrong... “raspberrypi”... Okay... “Enter”. “Domain name”... I'm just going to put “home.org”. This is isn't really important. “Choose a mirror”... Yep, so this is just asking where it should get the packages from. So “United Kingdom” is the closest for me... And then any of these is fine. “Proxy Information”... If you use a proxy, then you'll have to put in the settings for that here. Right... Okay... “Root Password”... “Root” in Linux or Unix systems is the equivalent of “administrator” for Windows. So... Give it a strong password... And then you have to re-enter to verify. And then, the idea with Linux is you only switch to the root user when you are doing administrative tasks. So, the new user... So, you're supposed to make a standard user as-well... So [my name is] “Liam Fraser”... And the user-name will be “liam” and the password will be... Whatever I want it to be... Okay... “Partitioning”... It's easier for now if we just choose “Use Entire Disk”... And the installer will set that up automatically.... Just press “enter” on this... “All files in one partition {recommended for new users}”... That's fine... “Finish partitioning and write changes to disk”... Yeah... So, if you'll just wait while this is happening... It's just installing the “base system” and then you can pick extra packages to go on-top after this... Yeah, this might take a few minutes... Okay, so now the base install is finished... We've got this pop-up about “popularity contest” and that's basically saying it's going to submit the packages that you've installed to Debian. It's up to you to if you want to choose this but I'm just going to do “no” for now... Okay... As this says... “At the moment, only the core of this system is installed. To tune the system to your needs, you can choose to install one or more of the following predefined collections of software.”... What I'm actually going to do is un-check all of them... So you un-check them by pressing “space-bar”. Basically, this is going to install the most minimal system possible. So we can then put on what packages we need on the top... With the Raspberry-Pi it's going to be quite a minimum system install anyway because of the RAM and the limited processing power... So... Okay, this... Basically... “GRUB” is a “boot loader” so, it's the first thing that loads up when you turn the computer on... or in this case, the “Virtual Machine” and it lets you choose what Operating System you want and [ahem] you just click “yes” to this... It's basically checking to see if you had any other Operating Systems installed that you are not going to over-write anything. Okay, so, the installation is completed. So it's time to boot into your new system. “Make sure to remove the […] media”... Okay... So, the CD Drive is now empty... So it must have been ejected automatically, so then you can click on “continue”... And the machine will restart. Okay, so here we go... Debian Linux... The first “boot”... This is going to look a lot different to Windows, if that's what you usually use... And it's just something that you'd have to get used to... It seems daunting at the start but once you get used to it, it's fine. It's a lot more efficient than Windows as-well in some cases... So... “login screen”... I'm going to “log-in” as “liam”... The user I made before... And then type my password in... For security reasons on Linux, the password characters don't actually show up, so even though I've typed my password in, nothing appears and if you press “enter”... There we go... Now we are in a “Linux terminal”. Okay, the first thing that I am going to show you how to do is install a “desktop environment”. So the first thing that you will need to do to do that is change to “root” because to do any “administrative” tasks you need to change to “root”. So... To do that, you have to type in “su” which stands for “substitute user”... “su”, substitute user... And then type “root” and press enter... And then it will ask for the “root” password that you specified when you done the installation. Press “enter”... And now you are “logged-in” as “root”. The “package management system” in Debian is called “apt-get” and to use this you just type “apt-get install” and then we are going to install a “desktop environment” called “lxde” and as-well as that, you need to install the “graphics drivers”, which are called “x11” and to get them you need to type in “xorg” and then press “enter”. So, after that's installed, the next thing to do is install the “x server” drivers by going “apt-get install xserver-xorg-video-all” and pressing “enter”. And then just click “yes” on this... And now we have installed everything we need, we can “log-out” of “root” by typing in “exit” which will return to the previous user you were “logged-in” as... And then to start the “desktop environment”, you type “startx” and then press “enter”. And then, if you just wait a second... There you have it! We've got “lxde”! Okay, so, now you're in “lxde”... You've got a good opportunity to have a look around and find out if everything works... To “shut down” or “restart” the “Virtual Machine” just click this power button here and choose “shut-down” or “reboot”. I'm just going to reboot at the moment... Because you've installed a “desktop environment” now, the default option will be to start a “log-in manager” called “Gnome Display Manager”, you'll see that after the system restarts... While the system is loading I'd just like to take the opportunity to say thanks for watching this tutorial and if you found it helpful, please subscribe and let me know in the comments what the next tutorial should be on. Okay, as you can see here, it says “starting Gnome Display Manager”... and then... There you have it... When it loads... Yep, there you go... So, I would type in “liam” and type in my password... Press “enter”... And then you're back into “lxde”... I'll try and get the next tutorial up for next week so that it's like a weekly series...Thanks for watching and I'll see you next time... Cheers!
B1 中級 樹莓派教程1 - Debian Linux簡介 (Raspberry Pi Tutorial 1 - An Introduction to Debian Linux) 46 7 Sea Monster 發佈於 2021 年 01 月 14 日 更多分享 分享 收藏 回報 影片單字