Linux for Absolute Beginners! | Joseph Delgadillo | Skillshare

Linux for Absolute Beginners!

Joseph Delgadillo, Best-Selling Instructor

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
86 Lessons (7h 22m)
    • 1. Introduction to Linux

    • 2. Linux Distributions Explained

    • 3. VirtualBox Installation and Setup

    • 4. Ubuntu Linux Installation in a Virtual Machine

    • 5. Ubuntu Linux Installation Continued

    • 6. First Bootup into Linux

    • 7. VirtualBox Guest Additions

    • 8. Ubuntu Desktop Customization

    • 9. Unity Tweak Tool

    • 10. Installing Linux Alongside Windows (Dual Boot)

    • 11. Dual Boot Setup Continued

    • 12. Introduction to the Linux Command Line Interface

    • 13. Navigating Directories with the ls Command

    • 14. Administrator Privileges in Terminal

    • 15. Using the Package Manager to Install New Applications

    • 16. Searching Through the Repositories to Find New Applications to Download

    • 17. Installing Packages Which are not Located in the Repositores

    • 18. Keeping Programs Updated via Terminal

    • 19. File Permissions and Ownership Explained

    • 20. File Permissions and Ownership Continued

    • 21. Creating New Files Using the Touch Command

    • 22. Creating New Directories and Moving Files

    • 23. Copying, Renaming and Removing Files

    • 24. The find Command and it's Practical Uses

    • 25. The find Command and it's Practical Uses Continued

    • 26. Find Command Final Thoughts

    • 27. Using the grep Command to find Information Within Files

    • 28. Using grep in Conjunction with the find Command

    • 29. How to Redirect the Output of a Command

    • 30. Using the top Command to View Applications in Real Time

    • 31. Viewing the Entire List of Open Processes and Closing Applications via Terminal

    • 32. Services Explained

    • 33. Configuring Services via Terminal

    • 34. Using crontabs to Schedule Tasks

    • 35. Crontab Practical Applications

    • 36. Choosing an Integrated Development Environment

    • 37. Eclipse Installation and Setup

    • 38. PyCharm Installation and Setup

    • 39. PyCharm Installation Problem Resolved

    • 40. GitHub Installation and how to Setup a Repository

    • 41. How to Push and Pull Information from our Repository

    • 42. How to Remove and Ignore Directories in our Repository

    • 43. How to Resolve Merge Conflicts

    • 44. How to Setup and Manage Branches

    • 45. Correction from Previous Lecture

    • 46. Getting started with Meteor

    • 47. Setting up our Meteor Project

    • 48. Setting up our Router and React Components

    • 49. Watch as our Meteor Project Begins to Take Form

    • 50. Getting into the Programming of our Meteor App

    • 51. Rendering our Blog Posts

    • 52. Putting the Finishing Touches on our Meteor App

    • 53. Apache 2, PHP 5 and MySQL Setup

    • 54. Server Configuration

    • 55. Linux Hosts File

    • 56. Deploying our Meteor App to our Apache 2 Server

    • 57. Setting up our MongoDB NoSQL Database

    • 58. Setting up our Virtual Host

    • 59. Using a Shell Script to set our Environment Variables

    • 60. Installing and Configuring phpMyAdmin

    • 61. Let's Take a Tour Around the phpMyAdmin Panel

    • 62. Creating a Basic Virtual Host

    • 63. Setting up a WordPress Installation on top of our Apache 2 Environment

    • 64. Before Using WordPress we need to Setup our Database

    • 65. Python Installation and Command Line Interface

    • 66. Python's Practical Applications

    • 67. Adding and Removing Users Through the Graphical User Interface

    • 68. Adding New Users Through Terminal

    • 69. How to Delete Users Through Terminal

    • 70. How to Change an Existing User's Password

    • 71. Adding Users to a Group

    • 72. Introduction to Networking

    • 73. How Does the Internet Work?

    • 74. What is a Local Area Network?

    • 75. Practical Networking Commands

    • 76. Practical Networking Commands Continued

    • 77. Using netstat to Track Detailed Network Statistics

    • 78. An In-depth Look at the Linux Hosts File

    • 79. Linux Hosts File Continued

    • 80. Using traceroute to Track the Servers a Request Passes Through

    • 81. Using Network Mapper (nmap) to Track Activity on Your Network

    • 82. Nmap Continued

    • 83. Using SSH to Access the Command Line of a Remote Host

    • 84. Using SFTP to Transfer Files to and from Machines

    • 85. Setting up an SSH Host on our Local Machine

    • 86. Using the man Command to Learn About the Programs on Your Machine

11 students are watching this class

About This Class

Would you like to get a job in the field of IT? Do you want to become a Linux system administrator but don’t know where to get started? In this course we will begin by covering the very basics of using the Linux  operating system and move on to the advanced system and networking skills necessary to become a Linux administrator! We will cover the following topics in this course:

  • Linux installation

  • Command line usage

  • Development tools including choosing an IDE

  • GitHub setup

  • Complete Meteor.js web project

  • LAMP stack setup and app deployment

  • User management

  • Network administration

Enroll now to receive 7.5+ hours of HD video tutorials!

If you are not convinced, here are a few of the glowing reviews this course has received.

"Course starts out with basic commands and works through more advanced commands as it progresses. The course then goes through add on software and applications following demonstrates basic usages of that application. It was easy to follow along on my personal install of Ubuntu by pausing/review the tutorial as needed. I suggest this method than just sitting and watching the course all the way through. This course is much easier than just reading books. Recommend to friends who just started out in Ubuntu."

"Great explanations. Great teacher."

"It's still early in the course but I've learned a lot. Great job so far."

Thank you for taking the time to read this and we hope to see you in the course!


1. Introduction to Linux: thanks for joining me today. Together, we're gonna take a journey through Lennox and give you the knowledge you need to be a power user. But first we must ask the question, What is the next? Well, confusingly it depends on who you ask. In order to get an idea of what Lennox is, we've got to go back in time of it. In the early eighties, Richard Stallman, then working in the AI lab at M. I t. Started the canoe project with the goal of creating an entirely free and open UNIX like operating system. This all started when the lab got a new printer, but the licenses restricted his ability to modify the code he had hacked earlier printers to Elektronik Li send messages to users who printed items when the printing was complete, as well as notifying other users when the printer was free to use. By the early nineties, there was almost enough good news software to create an entire operating system. However, there Colonel, the canoe heard, was not yet complete. Meanwhile, in the early nineties, Linus Torvalds set out on a hobby project to develop a UNIX like colonel known as Lennox and used a new software such as Good News C compiler to do it while a colonel on its own was useless. He ended up including new software with the colonel to release an operating system. Later, Richard Stallman Free Software Foundation sponsored the group Debian to release a good news slash Lennix distribution that was completely open for people to use and contribute. Teoh Debian over the years grew from a small group of free software foundation hackers to the enormous community that it is today. Due to its popularity, Debian has become the base of countless Lennox distributions because of how opened the software is. Anybody could read the source code, modify it and then redistributed, because this this is what we have now it's kind of a mess. There are so many Lennox distributions that a common problem for beginners is what Lennox distribution should I use. While there are a few districts out there that actually include its own software, one of the biggest problems in linen is how many Destro's there are, and the fact that a lot of them are the same distribution with new wallpapers and icons and everything else is the same move onto was started in the early two thousands and is owned and distributed by Can Ah, no. The base of a bunt is Debian and a bunch who has become so popular that it has in turn, been forked countless times. For King is a process in which the operating system is used as the base of a new distribution move on to include his own desktop environment called Unity. And it's recently started distributing phones running a version of Bundu. Canonical also contributes bug fixes and other contributions upstream, meaning that they send these changes back to Debian to include in future releases, while Debian releases new versions sporadically. DuPont, whose aim was to capture the stability of Debian but released new versions more frequently as such canonical releases two distributions a year, one in April and one in October. The naming convention of about two is year months, so the version will be working with was released in October of 2015 and it's called above to 15.10 every two years. In April, a long term support version is released, called lt Yes, which is officially supported for five years while releases in between LTs versions are supported for only nine months. The next LTs release will be in April of 2016. So to download about two, we're going to go to 12 dot com. And when the page loads, we're going to see ah in the top navigation that there's an option Issa's desktop. So just click on that, because that's the version of 12 we're going to be working with. And then when you get on the overview page, just click download about two big orange button in the main, uh, area, and on this page it's going to give us Ah few versions. So it's gonna prompt us to download the last LTs release, which was released in 2014 in April. If you're going to be running a bundu on a server, it makes sense to run long term support versions because you only need to install a new version like every five years can install more frequently because there's a new LTs version every two years, but with a non LTs version, there's only official support at bug fixes and what not for nine months. So we're gonna go with one of the nine month cycles here and download the latest stable released, which is about to 15.10. This was just released, maybe tax 50 days ago, and we're going to download 64 bit because that's the processor type were running. You can either click the download button downloaded directly in the browser, or you can click alternative downloads and torrents AT T view what type of other files you can download. Now, if you're running on a really super fast Internet connection, it doesn't really make a difference. The in browser download is probably going to download Justus quickly as a torrent. However, if you don't have uncredible Internet connection, a Torrent download is gonna make a lot of sense. It's gonna download a lot quicker than it would in the browser. No, I've already got my version downloaded. It took about 10 15 minutes, and just because I have really bad intern at the moment, the next thing we're going to do, we're not going to install about do directly onto our hard drive yet. That's an awful big commitment to make when you don't really, uh, when you're not really is familiar with the system, so what, we're gonna do is go to virtual box dot org's, and this is a piece of software that allows us to create virtualized machines, virtual machines or a virtual computer. If you wanna call it that. This allows us to create different virtual machines and set them up differently, as well as install different operating systems on each one. So when you get the virtual box dot org's, there's a gigantic button here that you cannot miss. Click on that and it's going to take you to the download page for virtual Box. Now it offers different packages dependent on different operating systems. This is gonna be for the host machine and put that in clearer terms. The computer that I'm on right now that we could see his running Windows 10 that is the host machine. So I need to download virtual Box five for Windows hosts. This link right here. Click that it's going to start the download now. I have already got mine downloaded, and we're gonna need these in the next few videos, so thanks for watching, and I'll see you guys soon 2. Linux Distributions Explained: Hey, guys, Thanks for joining me again before we actually get into the installation and use of a bun, two were first gonna talk about distributions and what exactly that means. So to explain what a distribution is, we're gonna load up this image here. And this image presented this way and in this slide show in the previous video is so large that it's entirely illegible. So we actually have to zoom in quite a bit here now. In the previous video, I mentioned Debian and how Debian was one of the first major Lennox distributions, along with slack wear, red hat and open sues. There. The four different types of Linux distributions and a type is categorized based on the package manager. Now, there are different clinics distributions that are not based on these four. Uh, for instance, Gentoo and Arch Lennox. However, we're not gonna focus on those at this time. Debian starts here in the early nineties, and as time goes on, it begins to get forked, which means that other people come along and use the source code base of Debian to create their own Lennox distribution. Now, if we look for a bundu, it's believe this brown line right here, We'll see how much forking of Avanti there's been a swell. So here's a bunch of and immediately we've got all sorts of fourth happening. Now there are two different types of a bun to derivatives and that is officially recognized and not officially recognized. So a few examples of officially recognised a bun. Two distributions are come unto going to studio and ah, Lubang do Zuba into. And basically, Coupon two is a Bantu with Katie E preinstalled instead of unity. So unity is the desktop environment off a bomb to and a desktop environment. We're gonna go more in depth into desktop environments in ah, future video. However, to give a little bit of an idea about what it is, we're going to just have a look at some images here. So this is unity. It's got a panel across the top of the screen with different indicators. Oclock, And this is a user menu that you can access user account system settings etcetera. On the left hand side. It's got another panel that acts as a doc, so opened applications and applications that you pin to the dock will appear here the top button here is to launch the dash, and now the abundant dash is incredible. I absolutely love it. While I don't like much anything else about him, undo the dash is really awesome. So you can actually search for files programs, etcetera. And you can even used the a bunch of dash to find things online. So it's actually a pretty neat concept now. Coban to has Katie E. Preinstalled, which is a different desktop environment. And so it's gonna look and act differently. Now this is Katie five. Plasma. They called it as top environment. Um, so Katie Plasma five. And obviously you can see the difference is it's got a window list here of open windows. It's got the indicators in time over here in the main menu right there, which looks like this now the command to and a bunch of studio and others are officially recognized derivatives of Mungiu. But Lennox meant is not. We go toe Lennox mit dot com. You'll see that they did in fact, develop their own desktop environment called cinnamon and cinnamon. That s top environment is absolutely beautiful. It's one of my favorites. If we look for yeah, Here we go. Should be able to just click on this. No. Oh, yes. There Were you. OK, So this is Lennox meant with the cinnamon desktop environment. It's similar to, ah, classic desktop environment and that it has a panel at the bottom with the main menu and a window list of open Windows Elementary. OS is right here. That's another one that I want to talk about. I've used elementary in the past and it is well, in very different ways. Is very beautiful, very fun to use it. The aesthetics alone are just absolutely mind blowing. They've got the cleanest interface that I've seen. This is a transparent panel at the top, within applications, menu, the clock and indicators. And it's gonna dock for open Windows. Now, aside from this, their own desktop environment, they've also created other software specifically for use with an elementary ls such as the panty in file manager. And that's one of my favorite file managers just because it does a lot of different things in a really neat way. Now, with a bunch of based distributions, installation is practically the same, with a few exceptions, so feel free to explore the different Lennox distributions. If you don't think you'll have problems following along when things look a bit different now, when I get a bunch of set up, I'm going to make some configurations and changes and show you guys sort of how to do that stuff. But feel free to, you know, Explorer, the vast ocean of Lennox distributions. So in the next video, we're actually going to be installing virtual box and do Bundu, and we're gonna be playing around with that a little bit and explaining the installation steps. So thanks for watching, and I'll see you guys again soon. 3. VirtualBox Installation and Setup: Hello, world. Thanks for joining me again today. We're gonna be installing virtual box and a bun to in virtual box. So the files that we've downloaded in the first video one of them is three actual virtual box Stahler. And then we also have the upon to I S O or disk image. So we're going to start by running virtual box installer as administrator. Now, the installation of this is pretty straightforward. It doesn't really require you to configure anything. So once it comes up, just hit next, next, next, yes, and then install. And once this installs, you'll see how we are able to create virtual machines or virtual computers that we can run on our host Windows operating system. And the virtual machines will have their own virtual disk image, which is basically like a hard drive so we can create that and you'll see what I mean in a moment. So once the installer finishes, we're gonna leave that checked because we want to start the virtual box immediately. So just hit finish and should start up here right there. So this is a virtual box. It's a very clean and simple interface. You've got a menu bar up here which will probably never touch. And then you've also got a toolbar with icons here. So to get started it, we're gonna hit new to create a new virtual machine, and I'm going to name it 12 The type is Lennox, and the version is going to be should default to a bun to 64 bit. Which eyes? Great, Because we've got a 64 bit disk image to is so click next and here we're gonna allotted a certain amount of our actual ram to use other virtual machine. You can set this to whatever you like. Typically, you don't want to go into this orange or pink feel because that's going to give you less ram on your host machines. So I typically like to set it to about half of my total ram, which is 40 96 megabytes, four gigabytes. Once you've got this set just hitting next and we're gonna create a virtual disk now, we're gonna be using the VD I or virtual box disk image format. So just hit next. Ah, the difference between dynamically allocated and fixed size is that in a moment we're going to be able to choose a target size for the virtual box disk image with a fixed size that's always going to be the same. So it's always if we set it to 20 gigabytes, that's always gonna consume exactly 20 gigabytes on our host. Hard drive as a file if we dynamically allocated. What that means is that we can set the target size to 20 gigabytes. But if there's only like five gigabytes of actual data on that virtual drive, it's only gonna consume that five gigabytes on our host. Dr. As a file so dynamically allocated is always what I use just seems better. So hit next. And here is where we are able to choose the target size of the hard drive. I'm gonna choose 20 gigabytes it create, and here is our virtual machine. Uh, we have on option to start it right now, which is gonna be useless because we haven't yet told it what type of installation media we want to use. So select the virtual box in the left hand menu and hit settings. But when the settings comes up, there's not much we need to really, uh, do here if we go to system. We need to make sure enable Io a pick on hardware clocking UTC time should be defaulted as well. If we go to the processor tab, we see that it's using one chlor of my quad core processor. Now we can increase this, but I find you get worse performance, the markers you use. So we're not gonna do that. Acceleration should always be enabled. If you have trouble with this, Um, and you're on Windows 10. You've actually got to do something else. So if I go into programs and features by right clicking on the start menu icon, then go to turn Windows features on or off. Now here's an interesting thing. Hyper Visor is a virtual ization technology that Windows includes by default. I'm not sure if it's, uh, pre configured to use. If it's checked, that means it is if it's unchecked, it means it's not, uh, so if you have trouble with setting up a virtual machine, basically, what you're gonna want to do is first of all, come in here and make sure this is disabled, so make sure it's unchecked. If it's checked, uncheck, it's gonna prompt you to restart once that's configured, you've got actually go into your bios, and you've got to enable virtual ization technology for your processor. So to boot into the BIOS, you're going to restart your computer normally. And as soon as it comes back on before you see the Windows logo or anything like that, you're going to repeatedly strike the key. It's normally F 10. Your mother board might have a different key that it uses to get in a bio. Sometimes it's F, too, so just try that. And once you get into the BIOS, follow these images and you should have no trouble at all. So back to the virtual box. If we go to display, we're going to see that the video memory is set really low at 12 megabytes. That's not going to really help much. So what we're gonna do is put that up all the way to the end, which is 128 megabytes. She give better performance, and we're gonna enable three D acceleration. Two D. Acceleration is only available on Windows guest machines, so that's relevant at this point. If we come down to the storage item, this is what we need to use to tell the virtual image. Teoh, load up our a bun to eso. So select the empty disk here and on the right hand side, you'll see this icon here. I've already pre selected it in a previous run. But what you're gonna do is click choose virtual optical disk file looks and then browse to where you see if the I s up selected hit open. Now, this tells the virtual machine that we want to use this I s o to boot off, offend to install the system. We don't really need to go through anything else, so just hit, okay? And now we can start the virtual machine. 4. Ubuntu Linux Installation in a Virtual Machine: it might take a little bit longer to load in a virtual machine Azaz, as opposed to actually booting the I S O image on your hard drive. That's a process will cover later. But for right now, we're going to stick with virtual box and it is a bit Laghi. So I apologize for that. So here is the loading screen. It's very minimalistic running in virtual box. It is quite a bit different, but again, we'll get into that. So just gonna wait for it to boot it. Ah, showing. Ah warning message there. That's not really important because it is going to load now. Once it does load the interface, we're going to see that we get scroll bars here. We could scroll up and down or left and right. We don't want that. That's gonna make it difficult to navigate the machine. That's what I'm gonna do is go to view, but a full screen mode now in full screen mode. If you want to exit, you've got this little menu down at the bottom that you can access. You can maximize that. You can entirely close it if you want to. We're just gonna let it. Load up the installation now when? When loading the installation, you can try it first. Or you can just install it straight to the disc or the virtual disk in this case. So I'm gonna click Install of Undue for the purpose of this video. I don't want the installation to take too long, so I'm not going toe download updates while installing, But I am going to install third party software. If you're using this on your personal machine and not a server, you're probably gonna want this because this allows you to play MP three MP four videos and a host of other file formats that it will recognize with proprietary third party software. So we're gonna continue so running in virtual box, it's gonna be safe to erase disk and install about. Do it does. It's not going to erase year entire hard drive. It's going to use the 20 gigabyte virtual hard drive that we have pre defined in previous steps. However, I want to show you ah, a little bit mawr about the partitioning that we're gonna be again diving into in a later video. But for right now, it's a good idea to have a bit of knowledge, so select something else and hit. Continue. And this is our virtual disk drive. It's called S D A. What we're gonna do is create a new partition table because we haven't it's It's a fresh, hard drive there, continue on that message and we've got 20 one 1000 megabytes free space. Now we're going to create a partition, which is going to serve as a swap area. Now, swap space is basically like extra ram. That's oh, I forgot to ah, resize that. Let me ah, change This year I'm gonna do We didn't start again. So this is our free space. Create a swap drive. So in the use as drop down select swap area, change this. Do you know five gigabytes that should be fine and hit. OK, so swap space serves as, ah, sort of extra random access memory that is not on the ram, but it's actually on the hard drive, so it's a bit slower than Ram, and it uses it for different reasons, and it's necessary. So on an actual installation, I like to set that to about 8 16 gigabytes, but we're working with limited space here so I'm going to make it five gigabytes. Now, once you get that created, you're going to see that the free space now down here and we've got 16 gigabytes left. So hit the plus sign down here. We're gonna use as ext four journal e file system. That's just the file system type. If you drop that down, you've got all sorts you can use the old fat 32 fat 16. Um, we're going to stick with this. This is the best option to choose when running Lennox. It's really fast. And the Mount point, we're gonna set that to a forward slash And what that is going to tell the installation is that we want to use this partition that we're creating right now the 16 gigabyte partition as the entire file system. So in Lennix, forward slash represents the route. Ah, And if I wanted to set this to my home partition, which is a specific partition for user files, I could actually type home, reduce that size and then use another partition for the route. We'll get more into that. Uh, this pretty flexible. So I'm just going to install everything to this partition and hit OK, the device for boot loader installation. Typically, we don't need to touch that at all. Above do is pretty smart with determining where to install the boot loader. Now we're installing this in legacy mode. Not yet. FYI, if you've ever heard of e f I. It's an awesome technology to use when dual booting multiple operating systems. But as for this demonstration were in virtual box when you've only got one, so it's going to install it in a legacy mode, and the boot loader is going to be written to the very first sector of this disk drive. So when you're ready to move forward and you've got something that looks similar to this install now, this is going to basically ask you, Are you sure you want to make these changes? Because everything is gonna be lost for any partitions that you're gonna format? Which are these two here? Yes, we want to do this 5. Ubuntu Linux Installation Continued: Ah, here. We're going to choose our time zone. You've got smart areas where you can pick. You'll see the actual location down here. What? You've chosen your time zone hit. Continue. We're gonna choose a keyboard layout for most of us. This should be fine. To use English, us for the keyboard. Leo, if you've got any of these alternative keyboard layouts, you're gonna wanna choose the correct one. Otherwise, keys may be mapped incorrectly. Um, I really can't help you with determining which one to use. You can actually type here to test. So if I want to make sure my my left key under the A is ah, back slash click that and it's not actually. That's, uh, weird. I never use that key any myself. I always use English us. Let me see if they've got English. Canada. You okay? French Canada. We're going to stick with this even though one key is is messed up, we've still got one to all the numbers. The letters. So that's the most important thing. Uh, so hit. Continue. Once you've chosen the correct keyboard layout based on your keyboard, and now we're going to set up our user the computer names could be anything you want. It's, Ah, way to identify your machine both in computer language. And if you're looking, for instance, on your router and you're trying to see what machines air connected, the computers name will be shown. So I'm gonna need this Megatron on. Choose your user name and your password, and you've got some extra options here. Log and automatically or require password to log in. This one's more secure. If you throw caution to the wind, you might want to select this option hit. Continue now we're presented with the little demonstration of what to expect With do. You can used these icons to scroll left and right. This demonstrates the software center where you can install and uninstall it. Manage software on your computer comes with rhythm. Bach's music player, which is Ah, great, I I've had no need to use anything else. So comes with some image software gimp. You can install it. It's not pre installed. This is basically like an open source alternative to photo shop, and it's got the video editor as well. Firefox's spring installed chromium you can install it can also install slash chromium is unopened source of version of Google Chrome. You can also install Google Chrome, and we're gonna be going through that in the next video, which is going to be a basic configuration. You've got Liber office preinstalled. One great alternative Toe Libre office is called WPS office, and I've actually had the pleasure to try that out recently. It doesn't use Theo d t format, so it's it's not gonna suit me. So I'm going to stick with Labour Office once we get this installed. Ah, here's ah, uh, image of how you can customize your machine. You can set background. Obviously, that's ah, feature you would expect with an operating system. You can also make other configurations, and we're going to get to that directly in the next video. And this is how to get support with a bundu. So 12 has a lot of great outlets for asking questions or reporting bugs. There are bugs. You'll probably not encounter any, or if you do, they'll be small. That really will affect you. Hopefully, uh, we we have some links here that we can go to once we reboot into the full operating system . This again is just against Dollar Community toe 12 dot com. They've got forums dot at monte dot com and also about two dot com slash the port. They've also got chat. I think it's free node eyes, the chat server. They've got their own channel on there, so we'll also look at that once we can reboot into the system. So for right now, I'm going to pause the screen cast and I will be back once the installation is done and we can have a look at the system itself. All right, so the installation has been a success, and at this point, we need to restart. Uh, So I'm going Teoh, and I'm also going to hover my mouse over this bar and select devices and uncheck this disc . I think we need a weight, actually. All right, so this should restart now and take us into the upon to system 6. First Bootup into Linux: Hey, guys. So the virtual machine actually locked up there on that warning message, so I had to use the window controls to actually close it. Hopefully, you guys don't have the same issue, but, ah, once we have that shut down, we want to make sure that it's not going to try to boot up using the same Ah, eso because we no longer need to install it. So we need to make sure that this is empty. Um, if this is checked, just click issued on check. It hit. Okay. And now we're going to start the machine, so it should be Ah, exactly the same as the previous boot process. It's going to show this screen, and then it should show the gun to loading screen. So I'm going to do the same thing. I'm gonna click view in the menu bar and go full screen mode. You can also click a combination of the right control key and AF in order to do this. So this is called light d m. It's the the log in screen manager for about. Do we see our user here in a password? So I'm gonna put in my password here and hit. Enter. There we go. So this isn't 12 and it's going to load up with ah Motile during your first launch that shows you keyboard shortcuts. Ah, the most notable thing here is that the super key air is ah, what the windows key is called. So on your keyboard, you've got a key in the lower left that has the windows icon on it. That is the super key. So thanks for joining me. And in the next video, we're gonna be going through a basic configuration of the system. 7. VirtualBox Guest Additions: Hello, world. This is Nick. Thanks for joining me again. I in this video we're going to be setting up won't do and performing some basic configurations for the system. First off, we need to install a virtual box component called guest additions. And this allows us to run the virtual machine more stable and with higher performance. So, as again in the previous videos, I'm going to full screen. And then once you've got this in the menu bar on the bottom, you're gonna select devices and insert guests, additions, seedy image. I've already inserted that, which is right here. As you can see, the performance here is quite horrible. So I'm going Teoh, run this click on properties. I'm gonna make sure that it's execute herbal. And it is now we do have to go into the terminal or command line for a moment. So this is going to be your first look at the terminal. We are going to cover quite a bit of the command line interface and Lennix and I believe the second or third module of this Siri's. It's quite big, and it can do quite a bit. So hit the super key. That's gonna bring up the dash. You can also click this icon on the top left to bring up the dash. Here we have different scopes. So, uh, the default home scope is gonna be loaded right now. I'm going to switch to applications in applications we're going to see installed recently used plug ins. So I'm going to select installed in here. We can actually look at the applications that are installed in the system right now. This is pretty inefficient. If you're trying to launch the application and know exactly which application you want a load, I'm gonna close the dash here, turn to the desktop, gonna hit the super he to bring up the dash again. And I'm just gonna start typing the application name, but I want to run. In this case, it's gonna be terminal, and you can see at this point once I get term written in there, the first result is terminal. That's what I want to launch. If the application you are looking for is the first in the list, you can just hit enter. They should launch that application now. There are shortcuts also in Lenox to launch terminal and one of them is to just click control Ault and t on your keyboard at the same time. That's gonna bring up terminal here. Now, what we need to do is open in the specific location. So within the file manager, I'm going to right, click and click open in terminal. Now here we can see this is the location that we're in. We're in V box additions right here. So what I'm going to do is run this program here. Must be run with it administrative privileges. Which means I need to add pseudo to the beginning of this command. And the great thing about Lennox is that for anything to actually modify the core of the system, install applications, remove them, You know, stuff like that. It requires administrative rights, and it's going to force you to enter your password. Now, this can get done frustrating sometimes. And so there are ways of rounded. We're gonna discuss that in the very near future. Ron files or files with dot ru n file extensions can be run directly from the terminal by just basically typing the name of the file Run. Now why? I put a period and a forward slash years to indicate to the terminal that the file that we want to run is in the current directory. So period forward slash in Lenox means current directory. And that would be this. This is the directory warrants. This tells it that the file is in this directory and the run extension automatically runs it. So we don't really need to, you know, issue. Ah Holton McMahon's ITT's pretty simple. As far as running files. Now it's adding kernel modules. So the Colonel, as we discovered in video one is called Lennox that is the colonel for coupon to Debian Fedora. You know, every Lennox distribution out there uses Lennox as the colonel. So the colonel's job is to translate between software and hardware. And so, in this instance, what we've got right now is the screen resolution is pretty terrible. I think it's 12 12 80 by 7 68 So it's Ah, very square, huh? Widescreen. So what we're gonna do by installing these modules this is going to allow us to configure the screen resolution to that that the hardware actually supports. And so that's why we need to install virtual box guest additions in order to get better performance. It's also very Laghi right now. And what we should see is that once we re boot after extolling these virtual box additions files, when we reboot, we should see a huge increase in performance, which is gonna be great. Seems like this is gonna take a little bit. So I'm gonna pause thieve video on. But I'll be back when this successfully installs. All right, people. So it is done. So what we're going to do as suggested on this line of the terminal right here we may want to restart so close this close This and this is painfully Laghi. It's not just, you know, bit Laghi. It's pretty painful. Eso in the user menu here, the cog icon. We're gonna go down to shut down and select Restart 8. Ubuntu Desktop Customization: So, as you can see, the first notable thing once restarting with guest traditions installed is that the resolution is now correct. That's running at 13 66 by 7 68 pixels, which is exactly what we wanted. Enter my password and tender, and now we're going to see if it's actually going to speed up and provide better performance for us. And that looks to be the case. We're gonna open the dash. It's a bit Laghi, but not too painful. That's good. Now we're actually going to get into the customization so that the dash here, the launcher on the left hand side, already has some items pinned to it. If you don't want something been, you can simply right click unlocked launcher. Let's say I want to move stuff around. You can hold your left mouse spot until it slightly displaces it, and then you can move it up down and place it wherever you want. Teoh. In order to get to the configurations that we want to make, we need a downloads files. It's open up Firefox, and what we're gonna be looking for is a theme and an icon. Now what is a theme in Lenox. G T. K is the is steaming engine that Unity uses unity being the desktop environment or currently in the G T K theme controls everything about how things look and so these window controls appear this way. Right now, the title buyer is a dark gray. The selected color is orange, which means if I select items, it's orange. If I select something over here, it's oranges. Well, these are all things that we can change. But in order to do that, we need some G TK themes, and we get those by going to G gnome dash look dot org's Now, in my experience, with about 2 15.10 so far where it's newer, it's using G T k version three points 18 and so older. G TK Themes appeared a break We may be able to see that here. This is a theme for G. T. K 3 16 and 18. Have a look at that. We can click on. The image is here to see larger versions of the image, and that looks like a neat, uh, theme. I think I want to use that. So in order to do that scroll down here were received the download links, and we want to make sure it's compatible with our cheeky K version. So click download on the second link on this team. You guys feel free to really explore the themes here on genome Look and we will install them together. You guys propose the video if you want to go and find some Oh, some of the links to download the themes and icons linked to other locations this specific instances deviant art. And so I will click the download button here. It's 4.5 megabytes archive file, and so I'm gonna open it with my archive manager. You could also save the file to your downloads directory, but I just want to open it now. Once it's opened in the archive manager, we could see the theme file here. We're not gonna select that. We're just going to click extract. This is going to open up a file browser work. We can actually choose where we want to extract, too. So I'm just gonna put in downloads and then select extract. Once it's done extracting, we can either close this message and leaves the archive manager open. We can show the files and leave the archive manager open or we should quit. I'm gonna click. Quit. For now, we're also gonna need an icon theme. And there are similar issues with the icons as there are two g t k themes for different versions of G t K. Some icon themes don't appear tohave every necessary icon is so they can look a little messed up. I think I like this one. So again I'm gonna check it out in a larger image here. And that does look pretty nice. That's nice and flat. So I'm gonna download that here. Icahn themes typically are a lot larger than G t K themes. I've seen archives as large as, uh, you know, 300 megabytes. That's quite large. There's no download button here, so let's look and see if they have ah different way to install them. Here's the download link right here. So get Hub. Click that and I'm also gonna open that with the archives manager. While that's doing this thing, we're also going to find a nice wallpaper that we want to use. So I'm going the search this, you know the images. I'm gonna take this one once it loads the emergent one right click and click save image as I'm gonna see it into my downloads directory. We've got about one minute remaining for the icons here, so I'm just gonna minimize Firefox and we're going to install an application that we need in order to really configure the system, you could go to the system settings and this is good for some things and I'll show you here in one moment. But there actually is a tool designed to give you even more control or your system. So this is the system settings. And here you can, uh, very, very minimalistic Lee change the appearance. By that, I mean, it lets you change the wallpaper in the size of the icons on the left. That's not exactly how much customization we want to do. It also has a behavior tab. You can auto hide the launcher if you want. Teoh. We don't want Teoh, so I'm gonna turn that off. It gives you great control for mouse your power settings. You can change the screen display of your screen isn't displaying at the correct resolution . Got sound settings on and you've got a lot of other things here. So explore that if you'd like gonna close that for now. Here's the icon archive that we downloaded. I'm gonna extract this into my downloads directory. 9. Unity Tweak Tool: Now I'm going to install something called the Tweak Tool. This is the tool that I was referring to earlier That's going to allow us to really configure the system. So bring up terminal with control Ault T Once terminal comes up, we're going to run another task as an administrator. So we're going to tape pseudo. The program we want to use is called Apt Get which this is what you used to manage software . Either installer uninstall the action we want to get to do It's gonna be in stall and then what? We wanted to install its called Unity Tweak tool and then hit Enter put in your password. It's not gonna show the letters being typed, but it is going in. I quit after that. Now, while it's installing unity treat tool, there's something we need to do with files. So if we go to my home directory and then into downloads, here are the files that we've saved. This is the icon theme and this is the G t k. The So these air the actual theme directories, we could see if we go in here, we should see, um, smother files that included index of the seat. So these are the files were gonna copy. So we're going to select them all night control, see to copy them, then hit control T to open a new tab in the file manager. And in the new tab, we're going to go to home. We can't see the hidden directories. So hit control H. It's going to allow us to see all the hidden files and directories. Now, any file or directory that begins with a period is denoted as a hidden location or hidden file. We need to create one of these four themes. So right, click and select new folder type in period themes and hit enter than in this themes directory control V. We're going to paste the themes that we selected in the other tap there and copy them over . We need to do roughly the same thing for icons. So if I go back to my other tab here, back up the downloads, then into the icon theme directory. Okay, so it's one level up that we've got a copy to go back to downloads control. See, let's go back to our other tab here. Go back upto home. Then we need to create another hit on directory called Icons. It's very straightforward stuff, so period icons enter. It's lacking a bit there we dio is going to this directory and then control V to paste the previously copied files. All right, guys, that actually took are really a long time, I suspect, because it's running in a virtual machine, it's emulating the file system type. I really can't wait to weaken installer directly to the hard disk, which is gonna be not in the next video, but in the, uh, in the module after that. But we finally got the icon theme copied over into the Icons directory. We have also got the unity treat tool installed. So if I open up the dash type tweak, it may not find it because we just installed it. That's an issue has been noticing with with the bunt to 15.10 so far is that changes in the dash are made as soon as they should be. So I'm gonna scroll through here and see if we can't see we don't. The dash hasn't been updated, so I'm gonna take this opportunity to explain to you guys a little bit about how a file system works. We got a computer that is going to go to the root directory. As I explained in the previous video, now slash home is right here. That's where our user director is. Slash User is used by the system for a lot of things been in. This user directory contains binary files that you can run, but you wouldn't typically run them by navigating to the BIN directory. We're gonna go back to user, and you guys feel for you to do the exact same thing. If you have the same problem, we're gonna go into share. And the share directory and user basically is used as a place to house configuration files for the buying very applications we have an applications directory in this directory has all of the installed applications. These air all dot death top files. You can't see the file extension, but that's what they are. And basically, when you run one of these or from the dash, these files contain what binary files to run, where, how etcetera should see unity. Tweak tool right here. There we go. So if you double click on that, it's going to launch the tweet tool, which is exactly what we want to happen. And now this. What we're gonna be using to customize the system. First thing I want to do before I even do that, I want to change my desktop wallpaper. It's a symbol is this Find an image file on your file system. In this instance, it's in our downloads directory, right? Click it and select said his wallpaper. Good stuff. Now I want to change some things about the launcher here. We can also set it to auto hide, which we're not going to dio. We can change the icon size, so I'm gonna take it down to 38 pixels. I'm gonna make it a bit more transparent. You can also change it to a custom color rather than a color based on the wallpaper. So this would be blue in this instance. If I turn transparency all the way down, we see what color actually has chosen. It's going to sit that to about there. We can change the panel as well. It's like it locked up a little bit. There we go. We can make the panel entirely transparent. If we want, we can make it kind of transparent, or we can make it not transparent at all. This really depends on the theme we're gonna be using. If we go back to overview, we're gonna come down to appearance and select theme. I seem doesn't look like it. Uh, work. So let's have a look. I'm gonna go to my home directory the themes I see. Ah! Ah, There we go. Here's the problem. So in each one of these, we need to take the directory and pull it back to themes. So the theme Dark Gonna pull that up to themes? No work. Hold on this very sensitive. Try that again. Once we see that, we should be going to drop it. There we go to the other. The main theme file. You're operate there. All right. Now we do actually have to restart unity. Tweak Tual. Still not picking it up. Cool. It's very gonna goto Computer user share applications way down on the bottom launched unity Tweak tool. It's like theme. Now we can select the theme that we want is there we go. This is actually broken. It appears, uh, see the window. You can see a bit of fray right there looks like it is indeed broken. So this is one of those broken themes I was talking about. It's not too broken, though you really can't notice. Then over an icon's, we're going to select the icon theme that we also just downloaded, which was masala. You can go over the cursor as well. Change it to a black cursor for the window controls. This doesn't work. I noticed this and it hasn't been fixed yet. It's gonna keep the window controls up. I'm gonna come back to the panel settings because it's very transparent at this point. Oh, that looks nice. I was supposed to be entirely transparent. Shouldn't like that. That looks all right. There we go. So we have briefly customized version of a bun, too. Feel free to explore a little more on do any configurations that you want to dio in the next video. We're gonna be discussing desktop environments. So this is unity, albeit a slightly customized version of Unity. In the next video, we're going to be installing cinnamon and maybe a few others. Thanks for watching. And I'll see you guys next time 10. Installing Linux Alongside Windows (Dual Boot): you guys. Thanks for joining me today. We're going to be installing a bundu alongside our Windows installation on her actual hard drive. So you're gonna need a few things for this. First, you're going to need a USB described. I recommend eight gigabytes or larger, uh, and you also need a program called You Net Putin. So to get that program, open a Web browser and type in you net boot in dot source forge dot net. And when you get to this page, download the Windows version and I'm going to select open. Now. While this is downloading, I want you to pluck your USB on. Once it's in right click on your Start menu icon. This should be the same for every version of Windows since Windows XP. When you right click it, you should get a menu, and there should be disk management in that menu. So click on that, and we're going to format our USB drive in order to be able to install the I S O image of a bundu on it, which we downloaded in the first video. So in the disk management screen, you're going to see a lot of things Actually, you're probably only going to see a few things because you haven't yet done any formatting to your hard drive. So what you should see is a few smaller a few smaller partitions at the beginning of your hard disk and then a very large C drive, which should be ah N TFs. That's your Windows partition. Um, mine have already got some partitions here from previous about two installations. We're not gonna worry about the disc zero right now, because that's not what we're focusing on. First, we need to find our USB stick. You can usually find it by the size of the device and right click on it and click format, and you can name it anything you like. The important thing is that the file system must be fat 32 in order to boot off of the USB stick. So make sure that selected leave everything else and I recommend checking this perform a quick format. Otherwise it's going to take a while, so leave that check. It's now it's gonna format, and it should happen pretty quickly, and then what we're going to do is, once it's done, you actually need to unplug it. So remove it from your US before and then put it back in. And what this is going to do is stop mountains that you net Putin consumed and so we can install on there. Now, I got a notification here that said, It's the F drive, so it's already selected, so I don't need to do anything here. I need to select disk image because that's we're going to specify the I S o image that we're gonna burn to this USP disk drive. So this ah, button over here and browse to the file that you want to install. So mine is in downloads bumped, and this is the same eso image we downloaded in the first video. It's the same one that we installed in virtual box, and we're gonna be using it now as well, so selected and hit open. Now, if your drive is blank because you took the disk three USB disk out, then put it back in. All you have to do is toggle this over the hard disk and then back to USB drive. It should find it. You should have a list here, make sure you choose the appropriate one and then hit. Okay, Now it's gonna start the burning process onto the USB disk, and it's gonna take a little bit. Should take five minutes or so. I will be back when mine has successfully burned. So when it completes, you should see this screen, and it's gonna prompt you to reboot now or exit. Now. It's important that you do one thing before you reboot your computer. Windows has a feature called Fast Start up that's gonna interfere with your ability to access the windows drive. So we are gonna need a re partition the windows drive, so we need access to it from the ban to now. How fast start up works is basically when you shut down your computer. Normally your computer doesn't fully shut down. And so there's still things running, or at least a saved ST. So it's like hibernation. So we need to change how that works. So what you're gonna do is right. Click on your battery icon and click power options. Gonna go to change plan settings here and then on the bottom click change advanced power settings. That's not where we need to go at all. Sorry about that. Cancel it here. All right. Here it is. So on the left hand side, choose what the power button does and then change settings that are currently unavailable. And this will allow us to change these settings down here. Now, this should be checked unless you've manually turned off already. What you want to make sure is that this is unchecked and then hit. Save changes, so feel free to either reboot now or exit that manually restart the computer. 11. Dual Boot Setup Continued: So when your computers turned off, you're gonna turn it on, and you're gonna have to press the key to enter into the BIOS boot menu. I'm working on an HP laptop here, So Mikey is F nine. So when you hit the power key, you're gonna need ah repeatedly tapped this key to make sure that you get it at the right time. That's usually a small window of opportunity there, Teoh. Get it? So I'm gonna just tap on the F nine key and I'll be presented with this. You should have something similar. Now, if you're on an F I system, that's great. Make sure you choose theme USB drive you e f I and hit Enter. So you're going to use your up and down key and then hit Enter when you select the correct device and this is gonna let us boot off of the hardest. So click, try a bun, too, and then just wait for it to start up. It should be relatively quick. Can There we go. We're now booted into a bunch. So I select the double click the installer, one Teoh icon on the desktop. But when it opens the installer. Select your language. And when you're ready, it continue. You're going to want to connect to a WiFi network unless you're connected through Ethernet . I've already connected to a network, so I'm not going to do this. But connect to your networks that you can download updates while installing, and he'd get most fresh packages from the repositories and hit. Continue. You're gonna see these big check marks telling us that we're all good to go. You're also gonna wanna check download updates while installing and also install third party software. And I've already got these checked. You want to make sure they're checked. If they're not checked, checked them. You don't need to install 33rd party software. All this allows is for playing MP three files and other proprietary file types. So when you're ready, here it continue. And this next bit is going to take a little bit because it's scanning are hard drive. So when you see this screen, it's gonna prompt you to install it onto alongside Windows were not going to do that. We're going to manage the partitions by ourselves manually, and that's going to give us a little bit more control so select something else at the bottom and then hit. Continue. That's going to scan the disc again. And you're going to see something entirely different here. All right, this is our windows partition. We can tell by first is formatted as NT fs and also the size of the drive. This is my free space. What you're gonna want to dio is right Click on the NT FS file system. Well, the second I just got to remove this two finger scroll. There we go. Much better. This is the EFI partition. We're gonna focus on the windows practitioner right now. You're gonna need a shrink this and in order to get the free space, So click on this and click change down at the bottom and you're going to just reduce the size of this. Ah, Windows does take up quite a bit of space and the applications on it. So I recommend leaving this relatively high. I've got about 500 gigabytes that I use for my windows partition, and I find that's comfortable. So once you've done this hit okay, and you're going to see the disc Reese can and it's going to show you that you've now got free space after your windows partition. So we now need to set up a few partitions. So click the free space and the plus side and the first partition we're gonna be creating is a swap area which acts sort of like RAM, but on the hard disk. So in the size of the swap area, you're gonna want to make it about double the amount of ram that you've got, what it refreshes. Here we've we see our swap area we just created with the free space after it. So now we're good to create our main partition for the installation of a one. Do so make sure you use ext four journaling file system and set the mount point to a forward slash and hit. OK. And basically, the forward slash just means the entire operating system, the home directories, applications, configurations, they're all gonna be installed in this partition. Now, Lennix gives us a little bit more flexibility that we're not going to really go in depth with right now. But you are able to create two different partitions, one for the forward slash the main partition, and then you can also create another one set the Mount Point to forward slash home, and that's going to mean that all your user directories are stored on that partition. And this makes sense for upgrading and installing different versions of lyrics because the Home Directory will always stay attacked. You won't need a format every time you install Lennix, and you can install Lennix over the root partition. So now that we're set up here, were basically good to go. The device for the boot loader is important. If you are not running an e f i system, you need to leave this to dev slash sda. And what that means is that the boot loader is going to be written to the very first sectors of the hard disk, which is where non F I hard drives store their boot motors with windows so it will replace the windows partition are the windows boot loader and replace it with grub, which is the Lennox boot loader. But it will also give you an option through that installation of the boot loader to boot into windows. Every time you boot up your computer, you're going to see boudin at Lenox or boot in the windows all right now I'm working with an F I hard disk, and hopefully you are too. Every computer released in the last few years are now e f I. And if I is great, it's a way where you can match. You can better manage dual and try booting different installations or operating systems on your hard disk. And what this does is if you've got an F I partition, as you can notice. Mine selected in the area above is SDA to, but the type is E F I and system says Windows boot manager. All right, where we're using an F I disk. We are going to install the E F I files for the boot loader on the existing EFI partition, which is SDA to. So when we're already here, you can now click install. Now it's going to tell you that it's going to make these changes. They're gonna be permanent, and you may lose data if you've done something wrong, So please make sure you do this all correctly. It will leave your windows partition intact because you're not formatting it. You're just shrinking it and you're creating a couple new partitions. So when you review these changes it continue and is gonna install the operating system now to our hard disk. And the installation procedure is exactly the same as it was in virtual box. So you're gonna choose your location or your time zone first. So here we're going to select our keyboard layout. I am English US keyboard layout. So I'm just gonna leave it, Continue on here. We're gonna create our user account. So I'm gonna need my computer Ultron on user name and password. And you do have a few options also to logging automatically or require your password. You can set this however you want. I like to require my password to log in, so just to continue. And now you're presented with this beautiful slide show of everything about Duke and do not everything but a few things. Um, and we're gonna dive into more of these things in the future. But for right now, I'm gonna pause this recording and I'll be back after it installs because it does take about 10 to 15 minutes. So when it's done, you should see a prompt like this. And it should tell you that the installation has been a success, and you're now free to either continue testing on the USB drive or restart. Now, you could do whatever you'd like. Just if you're going to continue testing the way you reboot is in the top right hand corner , select the gear icon, then select shut down. 12. Introduction to the Linux Command Line Interface: Hey, guys, Thanks for joining me in this video. We're finally going to get to the command line, and I'm really excited about that because this is probably the key aspect toe Lennix that you're gonna need toe learn. It's great to have a been a background knowledge and how to install the system. But those air the, uh, very small and insignificant in comparison to how much you'll be working with command line . So toe open up the command line. We use a program called Terminal and you can access this in the applications menu by typing terminal. Um, or you can't hit control Ault T on your keyboard on it will launch terminal. So here is terminal and we're gonna talk about just a few commands today. The 1st 1 is going to be P W d. And what p. W. D does is it prints working directory. So if I tape it here, eyes going to list the current directory that I'm in, which is slash hold slash Nick, this is my user directory. This is the default location that you'll be in. The second command that we need to talk about is C D or change directory. So this allows us to, uh, basically change Which working directory were in Now I can type user share. For instance, it's gonna take me to the user share directory, and I'm gonna show you guys here in the file manager what this looks like if I click computer here, it's gonna take me to the root signified by a forward flash. So when you're changing directory, if the first character after CD is a forward slash, that means it's going to be an absolute path from the beginning of the hard disk or from the root directory. So here I could change directory into s been or I could see the into home again. And in home, we've got a directory called Nick. So how to change directory with a relative path is you just omit the forward slash and this will basically tell it to change directory from whatever directory I'm in to the next level , which is Nick and I end up here. So again, you can change directory into an absolute path by setting the forward slash to the first character. And we can see this is where I'm in, and then you can't change directory with a relative path by not putting the forward slash now. Additionally, another symbol in Lennox is a period in a forward slash, and what the these two character combinations mean is in the current directory. So if I remove lint here, if I just change directory into the current directory that I'm in, I will stay in the same directory. Now I can type CD lib with the period it forward flash, and that's going to send me into the current directories next level directory called Lib. So I'm going to see the back into home slash Nick. Now I could type it out like this. Ah, and this is about 10 characters. But let's say I was really lazy. You can use the tilled, and that's basically that's the key to the left of the number one key on the top of your keyboard. You need a hold shift in press that it's it's the key directly under the estate key. This is a tilled at this basically means home, so it's going to take you to your home directory, which is unique for each user. For instance, my home directory. As we could see up here the top is forward slash home forward slash nick because this is my user name, so we can use this a bit and put a different spin on it. Let's say I'm in user slash share flash applications. Where I have right now is in this directory, we can type PWD to see the directory that we're in. Find one to go directly. Two home slash nick. I can type CD tilled, but if I want to go home slash nick slash documents, I can still use the tilled followed by a forward slash followed by documents, and this is going to put me into home slash next slash documents. 13. Navigating Directories with the ls Command: now this is all fun. But what's the point of navigating a file system if you really can't do anything? And so that's our next command that we're gonna learn? Um, so I'm going to change Directory to home to my home directory. Let's say you want to go up a level. So remember how Changing directory with period forward slash meets current directory? If you put two periods and a forward slash, that means one level up. So the parent directory. So right now I'm in home slash nick. If I type CD period, period forward, slash and hit enter, it's going to put me into the home directory. I can take PWD and see that I'm in home. So again, C b killed is gonna move you to your home directory period. Forward flash means current directory so you could tape a relative path from that forward. Slash means the root of the directory, and this means that you're going to be giving the CD command a very absolute path so I can type forward flash user share, as this is a file path directly from the root of the hard disk. The period period forward flash means go up one level so that in change directory into my home directory. And now the next command we're going to use is l s. And what that does is it lists the contents of whatever director you're in. So here is my home directory. Here's what it looks like in the files and folders in it. If I type Pete EVD to make sure my home directory I could type ls that's going to list all of the contents of this directory in alphabetical order. Now, L s is a big command that there's many options that you can throw into it, but we're going to focus on a few file permissions. And Lennox are very important. They define who conduce what to what file. So, for instance, um, the a dot out file that, you see there is a binary file from a C plus plus program that I wrote that belongs to me. That means I can run it. How do we know that belongs to me? We can use the L s command separated by a space, a dash and the letter l now the dash l argument that were passing. It means that we're going to list in a long way. So we're going to get some more information. The left column is the permissions of a file. Uh, so owner, user group, we're not gonna get into permissions right now, but ls dash l does list, um, it lists the owners user account and also the corresponding group. So when you create ah user in Lennix, it also creates a group at least during the main installation on the group's name is the same as the user name. And it also shows the datemodified that stuff. Now what if we actually wanted to list a directory based on some other things? So if we wanted to listed in reverse order, let's say we can type ls dash are and it's going to list in reverse alphabetical order if we want to, uh, define file types. Wouldn't realist weaken tape ls dash P that we see that a directory eyes followed by the forward slash Now, Also, there are color coding, so we can tell that that directories air, blue and other files air generally white that the a dot out is a binary file. And so it's green. We can also sort based on file size. Now what we've been doing so far is listing contents of the current directory. Where in now that's cool, Because if I wanted to see every file that within, um, Applications directory, I would change directory Teoh user share applications. And once there I would take a less. And this is going to show me all of the files and, uh, directories within this path. Now this works. But let's say I didn't want to leave my home directory toe list the applications directory . You can actually pass an argument after ls of the path, but you want a lift and it will do it. Now here's ah bonus command for for the terminal, it's clear what that does is it makes terminal a little less cluttered. So again, if I wanted to list files in home documents, I could do that. Let's say I wanted to list them in reverse order. I couldn't do that. So now you see that you can start stringing commands together are at least the ls commit. And if you're ever really lazy and you don't want to type the entire ls, you can just type out. So thanks for watching this video with me. Um, we're gonna recap here. We type CD to change into a directory. We type pwd to print the current directory that we're in and we type ls to list all the contents of that directory. And there's a lot of options for l s. I've shown you a few. If you want more information, you can actually tight ls dash dash help. And this is going to provide you with all of the options that you can run with the command . A swell as an explanation of what they dio. So thanks for watching this video in the next video. We're gonna be going through some more, man find stuff. We're gonna be doing command line for a little bit. 14. Administrator Privileges in Terminal: the guys. Thanks for joining me again. And in this video, we're gonna be talking about administrator privileges in the terminal. So I mentioned briefly in the previous video about file permissions. We really didn't jump in. And so I've created file in a location that I don't have access to. The file I've created is, um it's ah e T C. It's in the etcetera directory and it's just called file. So if I change directory into E. T. C and that type l, we can scroll here, it's alphabetical, and so we can see file right here. That's the file I created. Let's say I want to edit it and we're gonna be going into Nano a lot in the future. But right now I'm going to be using Nano and in orderto edit this file, it's a terminal application for text editing. So I'm gonna type Nano and then in the current directory open file. And this isn't open this file that I for which is great. I convey you it. But what happens when I try to right to it? I'm gonna hit control. Oh, which is the command to save this file, and I'm going to type enter, and it's going to give me an error warning that I don't have permission to do this. And so if I type, if I click control acts, it's gonna ask me if I want to say if changes so I'm going to say no because I can't. Well, then how do we edit that file that I just created? We need to use administrative privileges in order to be able to edit that file. Now there's two ways to do this. The 1st 1 is to type pseudo before the command. And what this means is Super User Dio. It's at abbreviation Super User is determined Lennix that identifies your privilege level So Super User do allows you to make changes to files and perform administrative tasks for this one command. So if I type pseudo battle file that will let me edit the file now I can type test 343 hit control Oh, and then enter and we see a success message, wrote two lines, so I can now exit this and it has been saved. Now what if I don't want tea retyped the entire man? So if I type nano file, try to write to it. It will fail because permissions nine I'm not I haven't run this specific command as pseudo , so I'm going to exit. What you actually need to do is type pseudo at two exclamation marks. So the two exclamation marks basically mean run the previous command. So by pre pending that with the term pseudo it will rerun the previous command as pseudo. What if you don't want to? What if you have a lot of things to do and you don't want to write pseudo before every single command? So now what? If you have a lot of things to do and you don't want to type pseudo in front of every single command, you could actually do this. And that's the S U command. And what this means is switch user. So generally you type switch user s u. I mean followed by the name of the user account you want to switch to, but we're gonna do is type pseudo su is going to change us to the root account. As you can see the name pre pending the computers names. This is the computer name, and this is the name of the current user. I'm acting as which is root, and the root user has 100% control of everything. So now I can type nano file and add a new line control Oh, at control X to close it. Now, when I want to switch back over to my user account, I'll type s you space thick, and that's going to get me back into my user account. So basically, if you get a permission error running a command, you might need to run that command as pseudo. For instance, if you're editing files in any directory other than your home directory, you're not gonna have permission to those files. And we'll go over in the future how to get permission to files. But for right now, for all intents and purposes, these instances is when you would run your command pre pendant with pseudo. If you have a lot of these commands to run and you don't want to type pseudo before every command just type pseudo space, Sue. So thank you guys for watching this video. We're gonna be continuing command line in the next video as well. And again, we're gonna be doing it for quite a while. So I hope you guys are enjoying this 15. Using the Package Manager to Install New Applications: guys, Thanks for joining me again in this video. We're going to be going over the package manager of a bundu or how to manage the packages that you have installed or that you want to install. So how we do this is through a program called Apt. Get so in terminal if you type apt dash, get that is the program that we're going to use to install applications. If you follow this with determined stall, this is the action that we want apt get to perform. And then the file that we want this action performed on is for this video going to be bluefish, which is a text editor that I don't want installed. But for the purpose of this video, I'm going to install it now. If you hit enter, you're going to notice. It's going to tell you that you do not have permission to use that program. So again, this is where pseudo comes into play Sudo bang, bang The enter. It is going to, um show us that while for me for this system, it says thes were automatically installed that we don't need him. Ah, down here we see the following extra packages will be installed, and it's going to install bluefish data and bluefish plug ins, which are two different packages that bluefish needs. And it will also tell us how much will be downloaded and how much space will be used on the disc after the application is installed. So we're going to type. Why, for yes and hit Enter. Now it's going to connect to the repositories of a bundu. So while it does that, I'm going to explain what that means. So a bundu has repositories set up that have indexes and package files, and it has indexes of those package files. So this allows us to run the command apt, get and install packages from the repositories. Now there are some programs that aren't in the repositories, and we'll go over those in a moment for the sake of this specific action. Blue fish is in the repositories, and I knew the name of the package that I wanted to install before I ran the command so I could just type sudo apt, get install bluefish, and this installs bluefish to my computer. And when this complete, I can now hit the super key and type in blue fish. It hasn't found it yet. I forgot. There is a bug with this version of a bundu where the dash isn't always updated. If I type in blue fish from the terminal, we can see that have got bluefish installed. So that's how you install programs. Now, let's say we want to remove a program. We do that in a very similar way. We're gonna tape sudo apt get remove bluefish. So with this command Ah, we're using the program. Apt. Get the action. Were performing is removed. And the action is the package that that action is performed on is bluefish. I would attack. Why? For yes, I do want to uninstall this, and it's going to uninstall the package. What if we want to Ah, install ah program and we're not sure of the exact name of it. 16. Searching Through the Repositories to Find New Applications to Download: So let's say we want to search through the repository and we're looking for something specific. What we'll do is tape apt Dash Cash Search and then the program we want followed by an Asterix. And this means it's going to find anything that has the word blue fish in it. I can type apt cache, search Kim and it's returning. Ah, lot of stuff. Now we can find it in here. Um, Jim, uh, let's say we want to see if we've got something installed. We're gonna use apt cache again. We're gonna take policy as the action. And then Kim, we see that this is the version we have installed 2.8 point 14 and the official repositories contain this version 2.8 point 14. Which means you can see here we've installed gim through the repositories. Now, additionally, you could go to give its website. I believe it's give dot org's and you could download an installer file from there. So if you're on an older version of a bunch of that doesn't have version 2.8 of gimp in the repositories, you can actually manually install that package file on. We're gonna go over that in a moment. So if I tape apt dash cash policy bluefish, which I've just removed, we'll see that we have none installed, but we can install version 2.2 from the official repositories. 17. Installing Packages Which are not Located in the Repositores: What if we want to install a package that is not in the repositories? So if I take apt cache, search chrome, we'll see a lot of chrome. But I'm not seeing a package called Crow. I see chromium browser. That's the open source version of chrome that we can install that by typing soon. Oh, apt, get install chromium browser. But let's say I want the actual Google chrome. It's not in a chrome. It's not under Google Chrome either. We're going to see that it wasn't able to access that package. So what, we're gonna dio we're gonna open up Firefox because that's the browser you're gonna have pre installed on a bun. Do you are going to have fire Fox? It doesn't come with another browser preinstalled. However, you can install other Web browsers now. If I wanted to install Midori, which is a Web browser I can check, is their version that I can't install through the repositories. And there is I don't want to use Midori, though. I want to use chrome. So what we're gonna do is go to chrome dot google dot com and when the page loads, it's going to allow us to download chrome. I'm gonna go to download for personal computers and this is automatically picked up that were on Lennox. So if you click download chrome it's going to give you four options. Ah, 32 bit dot Deb file a 64 bit dot Deb file that also 32 64 bit rpm files on limits. You're not going to be using RPM files. That is the package manager for a red hat. And so it that's a different Lennox version all together with Debian a bun two distributions. And in the first or second video, I explained how the Monte was four from Debian. So a bun to uses the same package manager as Debian, which is dot dep files or apt package manager So apt package manager works with dot Deb files. So we're gonna download the 64 bit Deb file because we're working on a 64 bit system and the 64 of the installation we're gonna type. We're going to click that accept button that I'm going to save the file now. Once the download completes, we can change directory into our home downloads directory. We can use the L s command to see this file. And so how we're going to install it? I mean, you could open up the file manager coming to, ah, the downloads folder and double click this and it's going to open it up with software center, which is a bunch use graphical package manager app. But we're not going to do that because we're focusing on command line. So how you install it from command line is by running the following command, we're gonna go pseudo de p k g dash I for install, and then we're going to give it the file past. Now we could go absolute and type home. Nick, you know that loads were not going to do that because that gets really old and boring really quick. We're gonna type in the current directory. Look for Google Dash, chrome dash stable, underscore current underscore and de 64 dot Deb and hit Enter. It is going to unpack this Debian package and is going to install crone and again, it's not gonna pick up the application there, but we can type chrome, I believe. No. What about Google Chrome? There we go. And then we can launch chrome because it is installed 18. Keeping Programs Updated via Terminal: now what? We ah, what we can do with the package manager? It doesn't only allow us to install and remove programs. It allows us to keep things updated. So let's say that a new package version of one of our applications has been pushed to the repositories we can actually type sudo apt get upgrade. This is going to upgrade any packages that have new versions in the repositories. And we have older versions than that on our system. We're gonna hit enter and ah, little note on pseudo is that when you run it once, I believe in that session in the terminal. You don't have to put your password in every time just the first time. So here we see that we have 16 kilobytes of upgrades to do so let's go look at that. So it looks like my K d e installation is upgradable. Good stuff. So what a type. Why and hit Enter. Now it's going to upgrade these existing packages. So we covered a lot in this video. I want to just take ah a couple minutes here at the end of the video and go over what we learned. So basically the package manager of a Bundu and Debian and Debian based Distributions is aptitude, and we use that through a program called up Get Now. When we use apt get, we can give it specific actions to carry out like, um, like installing programs and removing them. We can also add repositories, which we're going to go over in the future. But we can add repositories that aren't the official who bun two repositories and that will give us access to MAWR applications. We can use the APT Cache program to search through available applications and to check the installed versions against, you know, new versions of the repositories. And we can see programs that we've already got installed by using the policy action in the APT Cache program. And we can also use D p k G application to install local dot Deb files that lets us install packages that aren't the official a bunch of repositories and aren't in other repositories as well. So we can manually download files, make sure the architecture is for your hardware. Make sure if you're on a 64 bit system that you're installing 64 big applications, and also we don't use our PM, so rpm installer files are for fedora and red hat in red hat periods. So typically with a bun, too. I mean, always with you want to We're going to use dot Deb files. We're going to use Thea, get an apt cache programs to manage our software, and then the final piece is upgrading the software. So periodically a different package maintainers or developers will release new versions of their software into repositories. Whether that is Theophile Shaloub unto repositories or if it's third party repositories that they manage specifically for their application that you have added to your system. And so using sudo apt get upgrade allows us to upgrade packages that are available for upgrade. So thanks for watching this video in the next video. We're gonna be going over mawr command line. 19. File Permissions and Ownership Explained: the guys. Thanks for joining me again today. In this video, we are going to be going over more command line stuff and it's file permissions and file ownership. So the first thing we need to do in order discuss this is to have a file that we currently don't have any permissions, Teoh. And the easiest way to do that is to type pseudo nano filed. What this is going to do is as an administrator or as the root user, it's going to use Nano to produce a file named file. I'm gonna put dot txt there so we can keep track of it. I'm going to type, read and control Oh, to save it. Enter and control axe. Now, if I type ls Dash Oh, we see here that filed out text is owned by the user route and that users group route. Now what we've got here are permissions. The way these columns work is this is for the owner the owner can read and write. Groups can only read and public can only read. So if I want to make myself able to read and write, I've got to change this third column to match that column and I've actually got to first share it with the group. Nick. So what I'm gonna do is I'm gonna use a second command here called pseudo ch own. And this means change ownership of the file. And then how we write this is we type the user colon group, so user corresponds to what we're setting this column. Teoh group corresponds to what? We're setting this column too. So I'm going to leave it as root for the for the user that owns it and share it with the group nick and then the file that we want to perform this action on. Now, if I type l s l we should see here, that file dot txt now is under ownership of the Knick group. So we need to change this, um, third column to write. So how we do that issues ch mod. We're gonna use that pseudo to change the permissions of the file. Now, six means it is readable and rideable. Four means it is readable. And seven means it's a directory. We don't use that typically with a single files, and we'll go over that more in a moment. So we're going to set. Uh, I mean, if I typed out the permissions in numeric values that I currently has, it would look like that so we can see that four corresponds to read access six corresponds to read, write access. So what we want to do to change the third column here is we're going to type pseudo ch mod 646 and then the file that we want to perform this action on. Now, if I type ls Dash l, we can see that change has been made so I can now use nano file that taxed, and I should be able to write to it. And I can't. That's because the columns I changed the wrong column we needed to change the second column . So I'm gonna type pseudo see each mind, um 664 on file dot Txt. But this is done. The 1st 2 columns are now read, Write, read, right. The third column is just read. Now I can write to that file 20. File Permissions and Ownership Continued: so that's me. But let's say I want to own that file. Let's say that file was created, um, under administrative privileges, but I want to own it forever. So I'm gonna type pseudo ch phone Nick Dick. The file that I want to perform that on is that let's say I want to switch the permissions back to 644 I will retain ownership so I'll be able to write to it as the first column has read. Write access for Nick. And that's me. So I no longer need this group. Call them there as well. So what I'm gonna type is sudo ch mod 644 file dot txt If I run Alice again, I can see that the permissions have been changed back so that only the owner of the file can write to it. Cool. Now I'm gonna delete that file because I don't need it. So to delete a single file, all you'll do is type RM and then the file name. And if I list again, we do not have a file dot txt. Let's create a directory. Ah, and I'm gonna create it as administrator so soon, O M k D i r, which means make directory and I'm gonna name it my dirt. And we can see here that my directory has been created and we can see the permissions on this. It's owned by Root Root. Now what this means is it's readable, right? Herbal and execute herbal. This means that anybody else can read and execute it so I can change directory into my This is executing it. So I've just allowed myself to execute that, and that allows me to go into it. Now let's say I wanted to go back up a directory and use the Let's create a file actually in that directory, So in a type pseudo nano file dot txt. Actually, I gotta put that in my and the way we do that again, we specify in the current directory, find minder and create it in there and hit Enter. Now if I Alas, my dear, I see that I have a file in there Type ls Dash l. I can see that the file in there is also owned by the room. Let's make another file. So going over the previous command and in terminal you can hit Thea PKI and you can keep hitting it, and it's gonna go up, up, up from previous commands that you've entered. So I see there's two files in that directory that I want to own, as we can see. Right now, both files are owned by route because I've created them using the Super User account. Now what we're going to do here is, ah, form of the change ownership binary file. Our command and how we're going to do that is type pseudo C h own, and we're gonna pass it. This argument. Dash capital are, which means it's recursive. Every file in this directory is going to become under the ownership of Dick. So to give a little bit about this committed that we're running because it might look confusing because there are multiple parts to it. We're running as pseudo because we currently don't have permissions to this directory because it's owned and by the root user and group, and we have no right access, so we can't change it. So we're running this command as you know, C H own stands for change ownership. That's the program that we're running. We're passing it. This argument. Dash capital are to make the command recursive. If I didn't have this in this command, if it looked like this, this would change the ownership of the directory to Nick Nick, but not the files in it. So capital, ours Azan argument there, and then the user and the group that we want to assign ownership to and then the file or directory that we're going to perform that action on. So when I hit enter and then type l s l we see now that I've got ownership of this directory, and if I type ls dash l on my directory, we can see I've also got ownership on all of the files within that directory. So to recap, we use, uh, Joan to change ownership of the file. Well, you ch mod to change the permissions of the file both of these Converium cursive by adding dash R two the command. Um, then we define the specifics of the change we're making. So with ch mod, it's gonna be 755 or 757 or 777 This is just a bad idea. If you're running a server, never make any directories ownership. 777 files are one digit less so 666 would be full ah, modification ability for anybody on a file we would never do that. 664 means the owner of the file and the group of the file have read, write access and the public has read access. And 644 it means Owner has read, write group has read and public has read. Now, if we're using the ch own command, it's going to be in the format user group, and this is going to change the ownership of whatever file we give it to that. And then the last part of each of these two commands is the file or directory that we want to have this effect on. So I five type users share. This is going to give my user all all the files in this directory are gonna become under the ownership of my user and my group. Be careful when you run that, because some files need to be owned by route in order to work. Typically, you're not going to be working too much outside of your home directory, But we're gonna get there. There are some files you're gonna need to change, especially when we set up Apache as the Web server and what not So thanks for watching this video. I hope it's been informative. I'll see you guys in the next video. 21. Creating New Files Using the Touch Command: let's create some new files. So to create a new file, I'm going to change directory and a minder because it would be quicker to write commands and touch is gonna create files. So So if you just want to create a file without open like in the previous in one of the previous videos, I showed you how to type Nano and then the name of the file. And if the file didn't exist, it would open it and create a new one. But if you just want to stay in terminal and don't want to go into a text editor, you just want to create files use touch, followed by the file name so touch and we're gonna create main dot see pp. So in the previous command, let me clear this there. So in the previous command, we learned how to use the Asterix. So if I were to remove this, this would remove everything that has CPP extension. Let's say I actually wanted to remove everything but leave the directory intact. We would type this So let's get out of this directory and I'll show you how it looks from the outside. So if I wanted to remove everything but my dir But leave minder existing. It would be written like this if I run that and then run callus on, my dear, we see it is empty. It doesn't have anything in it. So now we can remove fighter. Oh, right. Sorry. Uh, RM dash R f minor. So you need to use the dash R f to remove a directory. And there were back exactly where we started. So to recap on a few commands here, and I'm just going to take them out. CP is copy. The first argument takes is file. And the second argument it takes is where you're putting it in. What? Finally, That's how to copy files, how to remove files. You just type RM and then the file name. Now, let's say this isn't a directory. You can still remove it. You just, ah, type the the position of file. Then if you want to remove all filed on any things, you do this. If you want to remove all text files, you do this. If you want to remove every file from a director, you just do this. It's gonna remove everything from that directory and leave the directory. If you want to remove the directory is well, that's everything in it. You would run this command, and this is remove our F and then the directory need. If you want to move a file, it's just like copy, except it doesn't leave a copy where it started. Eso file they and then where you're copying it to. Let's say you just want to copy into the same directory with a different name. You would do this and we also learned the touch command so this you can create files and stay in terminal. So that's that's ah, neat command. Eso Thanks for watching what I want you guys to do before you watch the next video. I want you guys to get used to moving around in terminal. So use the commands that we've learned up to this point. Excluding the package commands, just use ls and CD and, like, move around the file system and go explore a bit. Don't change permissions on any files you're not aware of and don't change the ownership of them. So really, I'd recommend staying in the home directory at this point. Just create some directories, move around them create files, move files, copy files and get used. Teoh using terminal In this way, it's gonna make future videos a lot easier because I'm not going to go. Ah, slowly on them. And so I want you guys to be able to follow. Thanks for watching, and I'll see you guys next time. 22. Creating New Directories and Moving Files: everyone. Thanks for joining me again in this video. We're going to be covering a few more utility commands, and then we're gonna move on to more advanced stuff. So we already know how to use the following commands. Ah, and also switch user. Ah, these air utility commands. I'm not gonna I'm not gonna throw the repository commands and package installation commands in here. These are the utility commands that we can currently use. And this gives us the ability to move around the file system in the terminal to print things out. Teoh modify some things in terms of file permissions, but we we have a few more things. Todo so lister by listing this directories contents. Uh, so let's look at the a dot out file. Let's say I want to move that. I just want to move it somewhere. So how we do that is we will first create a folder. Um and so this is the first command we're gonna learn here. It's m k d I. R. And this is an abbreviation for make directory. It's going to be followed by the directory that we want to create. So again, we can, uh, use an absolute position. If I wanted to put it user bin and then my directory. This would create an absolutely positions directory. We can go one level up or two levels up and then create the directory. Or we can just say in the current directory, create new directory. Then if I run ls again we can see new directory right here. So let's move a dot out into near directory. So to do this, you're gonna type M V and the sin abbreviation from Move a not out space new directory slash a dot out. And what this is going to do is it's going to take this file which is found in the current directory, moving into new directory slash the same name, and we do need to provide the name and then hit Enter now if we run ls again, we see that a dot out is no longer in the home directory. But if we run ls on the new directory, we can see it's in there, so that's how to move files. Now let's say we want to copy it somewhere else. So I have a directory that I created in a previous video called my er, let's rename that so to rename it use the M V command. Then if I run ls again we're gonna see we no longer have. Ah, minder. But we have Ah, my second directory. So let's copy, uh, the eight not out file from new directory into my second directory. And how we do this is with a command called CP Interesting abbreviation for copy. And the first argument we're gonna give it is what file we want to work with. And then the second argument is gonna be where we want to copy it to. So new directory slash a dot out and then my second directory a not out and hit Enter. Now, if we run ls on my second directory, we get this, we've got file and file to from the previous videos. But now we've also got a not out. And if we list the new directory, we also have a daughter. So now we've got to copy that file, which is awesome. 23. Copying, Renaming and Removing Files: Now, let's say you want to copy a file while renaming it. This is possible. So let's run. Copy. Ah, new directory. A dot out and we're going to copy it to new directory be dot out and hit. Enter. Now, if we run ls on new directory. We see we now have two files and the same thing for the move command. So if you want to move a file and rename it while you when you move it, you have that ability. So as you'll notice in the move command, we do need to give it the file name as well. So essentially, you aren't naming it. So to rename it, you would just name it something different. Well, cool. Now we've got Ah, we've got three copies, Theo. Exactly. Um, file and I'm gonna move it back to my home directory, and then we're going to remove some things. So, uh, let's a copy from new directory A dot out back into current, directory it out in the current directory. As we can see, here is our home directory. So So we're running relative commands in here, and they're being run from the home directory. So if I hit. Enter here. Run! Ls we can see my a dot out file is back where it started. So let's remove a single file and we're going to do that. Let's change into new directory. We're going to remove that. Be dot out file. So RM is on abbreviation of remove and then we're going to given our file name that we want to remove. Now, be very careful when removing files. It doesn't prompt you if you accidentally add a forward flash the beginning. It's I mean, you won't have permission. You'd have to run a pseudo. So I guess it's not that big of a deal hit. Enter now L s And we can see the bead I'll file has been removed. Let's go back up a directory. So let's say we want to remove an entire directory. So we created new directory in this video. Let's remove it. How to do that is using the remove command. But you've gotta add dash araff and then the directory. If we run ls again, we see we no longer have a new directory. Interesting. Let's list my second directory. They're that's what we're gonna work with. Um, we're gonna rename this directory back to Minder just because it's, ah, quicker to type out. All right, so we've renamed that directory here. So now what we're gonna do is remove, uh, let's remove all the text files from this directory. So we've got two of those eso we want our eight not out file to remain. And how we do this is it's gonna be using an Asterix in the command, and that means everything and you'll see how this works in a moment. So type RM, my dir slash anything dot txt. And what this will do is that it will remove every text file from this directory. Now, let's say we had ah bunch of files, let's say main dot CPP main dot txt main not etcetera. What we would be able to do at that point is type main dot star, and so the star means anything, right? So this is gonna be main. Not anything gets removed, But for right now we're working with two txt files star dot txt and hit enter and now run ls on my directory again and we see that it has removed everything with the txt extension 24. The find Command and it's Practical Uses: guys, welcome back in this video, we're going to be discussing the find command and some practical uses for that command. So first off, I've got a director here. Ah, named lt. So I'm going to remove everything from that directory, and then I'm going to change directory into their We've got nothing. So to demonstrate how we're going to use the find command. I'm just going to take a moment here and create a bunch of files with very uncreative names . So I'm gonna use touch to do this. And ah, I'm also going to create some text files in here. A swell. There we go. So if I run ls on this directory We see I've got, like, 10 11 files. And that's not a lot. There are gonna be sometimes that you're gonna be working in really large directories and so you can use the find command to help navigate within those directories. But right now we've got ah, basically some files that we can use fine command on. So, as you can see, I've got file types of two different extensions PHP and txt. And you can see that some of the extensions are printed in lower case. Some are in upper case and some are in a combination of the two. And this is gonna help you understand the different things that find command could dio. So let's say first that I'm just looking for all PHP files, so I'm gonna type s. So first we've got the command, which is find the next parameter is going to be the directory that you're going to be looking in. So we're gonna put one single dot because we're gonna be searching in this current directory. The next argument is going to be a flag, which is going to be type, and that's gonna be followed by an F for file and then, ah, flag called name. And this is gonna be the name of the file we're looking for. So if we just put dot PHP, this isn't going to bring anything because there's no file with that exact name. Eso What we need to do is add the wildcard Asterix character and we hit Enter and it's gonna return all, uh, all files with this exact extension and this is case sensitive. So as you'll notice, it's only returned files with the lower case PHP extension, which can be useful. But let's say that I want to find, uh, all PHP files. Regardless of the case, this is essentially the same commands you're gonna type find dot type is file. And instead of using name, you're going to use I name and the I basically just means that is going to ignore case sensitivity. So if I run this command again, you're now going to see that I'm getting all PHP file extensions, lower case, uppercase and mixed combination of the two cases. 25. The find Command and it's Practical Uses Continued: so that's pretty neat. Um, we can also do it for ah, different file names, not just extensions. So if I were to run, find in the current directory type F and let's use I name and I'm going Teoh, I've got a few files with the word file in them, so I'm going to type file and then an Asterix, and it's going to return all the different files that I've got so you can use this in a more practical application. Um, this is just an example, but let's ah find in E T. C type is gonna be af and I name is going to be asterix dot confident. This is going to find all configuration files and it is a recursive function. And so you'll notice that there's a directory here system D inside of etcetera that has configuration files in it. And so it spits out all configuration files. So this is useful if you are looking for all files of a certain type. But also, here's an interesting thing. I'm just gonna clear this out here. So now let's use the find command to find files that that have certain permission set and so how we're gonna take this command is first I'm gonna tape lsl and we're going to see that all the files in this directory are read, write, read, write, read. And this permission scheme translates to the numerical value of 664 So what we're gonna do is type finds dot for the current directory, um, type and so type can take. You don't even need to include this. So if you omit the type flag, uh, it's just going to find files or directories. If you type dash type AF, it's only gonna find files. And if you replace the F with a D, it's only gonna find directories. We're only working with files anyway, So I'm going to throw this in their ah, and then we're going to use the perm argument and we're going to 0664 because those are the permissions on this file. And what's going to do is it's going to spit back the output, which in our case, is all of the's files. You can also search based on file size. So again we're gonna type, find with a period for the current directory, and we're gonna type, size and here, you can put for instance. Ah, anything over 100 kilobytes. Ah, you can. If you're looking for an exact file size, you can use that or maybe one megabyte, anything over one megabyte. And so you can see how this command would be useful. It wouldn't be useful in our case right here, because we've got, you know, small files. Maybe we tight find. Not sure if this conduce this, but anything under a megabyte cool. So you can search more than or less than and then your search parameter. It's clear this again. You can also use a not operator. So let's say and this is good because you can get so far using, um, using the find command. Let's say I wanted to find all files that have on my name of stop PHP, which is not case sensitive. So it's gonna find all of the PHP files regardless of the case that was used in the extension. But let's say I want to find all files that are not PHP. Let's say I've got a bunch image files and text files and other you know, javascript files. Let's say I just wanted to find everything That's not PHP. What I would do is type Find in the current directory type is gonna be files again. Not. And then the argument I name Asterix. Stop PHP! And this is going to spit back all the files that don't fit that criteria. 26. Find Command Final Thoughts: And so this is a really useful command. I hope I've explained it. Well, there's also one more thing that I want to show you guys eso to for this. I'm gonna clear out of here, and I'm gonna change directory into the E T. C directory. And first I'm gonna run this command find in the current directory type is gonna be file. And let's say I name my name is going to be started out. Khan. And so the E T C. Directory we discussed very briefly in one of the previous videos that basically holds configuration files for applications. And so, uh, standard At least what I've noticed with Lennox is that configuration files usually have a dot CEO enough extension. So if we hit enter here, we're going to see that we get a lot of things, and that's apparently because it's, as you can see here in e t. C slash fonts slash con FTA avail. There is a file, so this recursive, which is pretty neat, But what if you don't want it to be recursive? Well, we can pass an extra argument here, so let's take the exact same thing find in the current directory, Max Depth. It's gonna be one. And then, ah, followed type F and, uh, I name asterix dot com. So now you can see that the only things that return is that looked a little confusing. Ah, the prompt was write. Ah, right here. So everything over this, that's from the last command. So it was recursive, but we controlled the depth with this one. So what you can do, you can either, you know, go one level down or if you want a max depth of two, you can do that on these air, always of modifying, defined to really hone in on what you're looking for and you can pass multiple arguments. So let's only look for configuration files that are over 50 k And I don't know if we're gonna find one. No, we're not. Let's ah, remove the max steps so that it will be recursive and 10-K There we go. So we found a couple. This file is more than 10 kilobytes. So again, that's how ah, that's how we use the fine command. And this is a really powerful tool. I'm convinced that you guys, you know if if you're using a graphical file manager. It's really not that necessary, because you can kind of look at everything and see so much more. But if you're working in terminal, I'm confident that that this is gonna be a command that you guys are going to be able to, you know, hit the ground running with this is, you know, a really great and powerful tool. So thank you guys for watching in the next video. We're gonna be going over another really awesome command. 27. Using the grep Command to find Information Within Files: Hey, guys, Welcome back in this video we're gonna be talking about the grab command and how we can use that to find things in files. So in the previous video, we learned about the find command and how we could use that to find files. And now we're going to be covering how to find things in files. So we do that using the grab command, which you can use like this. Um, so first I've got a bunch of PHP files here. You remove these two files there, So I've got a bunch of PHP files here, and what I've done was, I've put, ah some functions in them. So this one has two functions, and the other ones have some other ones as well. And we're gonna be using this to demonstrate how to use grab. So you type the command grab and then what you're looking for, and then what files You're looking for them so fired a type file to dot PHP. This would return the three functions that I have in that file. If I were to just keep adding on files here Ah, it will look through each file and it will actually return which file they're found in. So that's pretty neat to things that I want to talk about regarding grap before we, you know, do anything a little more extreme is two flags that it can take. So a flag in a command is a way to pass it. More information about what we want to dio so we can get really specific. So we're going to run, grab using I bash I, which means ignore the case. So ah, case sensitivity won't be a problem here. And then we're going to look in all files. Oh, I forgot the search string. We're looking for function, and this finds not only the functions that we saw in the previous command, but I also found this function which has a capital f If we were to run the grab command without the dash I on all files here, you'll notice that the only difference between the output is in file. To hear it found function with a capital F, and it didn't in this result. So that's how you used the dash I It's pretty standard across Lenox. Usually I will be integrated into commands, as you know, ignore case sensitivity Now, the second flag I want to talk to you guys about is really neat. It's dash end, and it could be used in conjunction with other flags. We're gonna take the string that we're looking for and the files were looking for it in And what this dash and flag does, is it? It gives you the line number where the instances of the string is found and then the rest of that line. So this is pretty cool. This is how you use grab. 28. Using grep in Conjunction with the find Command: Let's say that I had a bunch of PHP files in a bunch of JavaScript files and other files that have functions in them, but I only wanted to look in all of the PHP files. How I would do that is by using the find command. So in the previous video, we learned that we can look in the current directory for type is F four file or D for directory. Then we can give it what we're looking for. So in this case, we're going to be looking for all PHP files and the I name flag means ignore que sensitivity in the string that we're looking for. So we found ah, PHP files with extensions in both lower case uppercase and a mixed case here. So that's cool. But how do we use find with crap and this is gonna be the big thing that that I want to show you guys, this is really handy. So what, you can dio you can give it a certain search through the find command. So we're gonna find tight. Ah f the I name is going to be PHP. And then what we could do is we can pass the find command another flag, which is going to be exact. So what this is gonna do is it's going to first find all files that match this criteria, and then it's gonna execute the next command on it. So we're going to use grab function, and I'm going to ah, past the dash I and Dash and Flags here. And then we need to add to curly braces and a plus sign to end the exact flag. So everything in here is gonna be executed within this flag. So if I hit enter, it's going to look through all PHP files, and it's gonna find case sensitive are case insensitive functions with line numbers. So that's really cool. We can use this to find type file sighs. We're going to say less than 10 kilobytes and weaken group search parameters here. So I just passed a flag of size and the value of that flag is under 10 kilobytes. But I'm also gonna pass it dash I name, which is going to be PHP. So this is gonna find all dot PHP files that are less than 10 kilobytes, and then I can exact grab in here and right Now that looks the same, cause I'm pretty sure all my files are less than 10 kilobytes. They don't have much in it. Um, but but you can kind of see how this works. So this is a really powerful tool, and you guys can use grip and find together to search through a very specific set of files for very specific strings and instances. 29. How to Redirect the Output of a Command: one final thing that I want to show you guys in this video is how to redirect the output of a command. So how we do that is simply we write a command, uh, for this instance is gonna be ls. And then we're going to use the right arrow. And this is the key just to the left of the question mark key on most keyboards. Um, and then we're going to tell it what file we want to put it into. So rather than out putting the result of l s is going to put the result into out file. And so weaken type nano out file dot txt and we can see the output of that command, which is pretty neat. Now, I'm gonna use the find command to find all files with the size of less than 10 kilobytes, and I'm going to use exact grab dash I dash and we're gonna look for sandwich. Then we're gonna end the exact flag here, and then we're going to redirect the output to f dot text. Oh, oops. Let's ah forgot this. I name. We're only looking in PHP files here, There. Now if we open up f dot text. We see the used to sandwich functions that I found, but that didn't print it out on the screen. So the final command that we're going to share with you guys in this video is t e on what this does. If I type the previous command out again, let's look for function. This time we're gonna end this. We can actually pipe this across to t e and making out file that txt. So before I run this, I want to break this command down, were using find to find all files less than 10 kilobytes in size and with the dot PHP extension were then going to execute grab ah, ignoring case sensitivity and numbering lines. We're going to search for function in these files and then we're gonna pipe it over to tea . And the second argument of this T command is the out file that we want to write the results to, and what this command will do is it will return the results on the screen, but it's also going to put them into a left dot txt. So this is gonna be useful if you want to copy down the results of a command while seeing them in real time. That was a pretty big video. I hope you guys found it informative. And I hope I explained it. Well, um, in the next video, we're going to be going over processes and what they are and how to manage them. 30. Using the top Command to View Applications in Real Time: Hey, guys, Welcome back in this video we're gonna be talking about process is what they are and how you can manage them. So if you've ever opened up the task manager in Windows, you would see a list of running applications or processes. The same thing is true for Lennox. Basically, a process is just a application that is running, and so we can get an idea of, uh, of what kind of processes run on a Linux machine by using the command top. So if we run this, it will show the top of the list of off running applications. It's really time. So if we start new applications, it's going to see thes process in here. So I don't want to go through every single column here, but what I do want to mention are the most important things. The P I. D. Is the process idea, and you can use this to manage that process. Uh, the user is who the application is running as, and you can see how long an application's been open and also the command that's associate it with the process. And as always, you can hit control C to escape that 31. Viewing the Entire List of Open Processes and Closing Applications via Terminal: So what we're gonna do to see the entire list if you the command called PS ox and this is gonna this is not really time. So this captures it at the time that you run that command. But you can see the list is quite a bit larger, and we can go through and look for applications that we want to see. But this didn't get a little, uh, you know, convoluted just because of how large this list can be. So I'm going to run theory browser here, and when it opens, this is now a process that is running. So I confined any Leary browser processes by typing PS space ox, and we can pipe that over to the command grab and we can look for Leary browser, and this is gonna search for all processes that have Leary browser anywhere in it. So the name of command or the file path of the command, it doesn't matter. It's gonna find it based on that name. Now that's pretty neat. It gives us a few things. It gives us the process I d and the time running and the command and stuff like that. And it also gives the time that it was run so we could use this process. I d to manage whether this app is running or not. But let's say we've got a few instances running. It's now I have three processes for the Leery browser. So what happens when I run the previous command? It's ah, messy. You could read through this, and, ah, if you want to. But if you're just if you just want to have a quick look at it, this is not the command. If you want to get the process I ds of an application. You can use the P grab command and type in every browser, and this is going to return three Process I DS because we've got three processes running. The order of these process ideas is chronological. So the top one here, 6186 That's the first window I launched, which is this one, and I'm gonna type first right here. This would be the 2nd 1 which would be this one. So this is second window and then the 3rd 1 we're gonna put over here, we're going to do that so that we can ah, I can show you how you can identify processes based on chronological order. If you know the order in which certain things were opened, I did because it's ah, I only ran through three instances of it and the way that they opened, they told me which ones were on top and so I could see the order of them. So let's say I wanted to close second window. I can use a command called Kill, so I'll type kill and then Dash nine and then the process i d. So in this case, it's gonna be the 2nd 1 which is 6300 So if I type 6300 and hit enter, it kills that instance. So if I run P graph on Leary browser again, it's now just going to show me the other two. Now you can kill APS like this, Uh, sick three. Sorry. 6186 And then another process. I d. 6358 We can run that is going to kill all those processes. Now that's pretty neat. But let's say that you've got a few instances running and you don't want a type. The process ideas for each one. If I take a peek Grap Larry browser. This is going to return four Process I ds Now in the p grab command, the application is P crap. And then the second parameter that it takes is the command. That's wrong. So it's the same when we run top, we'll see under command Leery browser right here. So we can we can see that's the command. And if I was running it from terminal, it would be, ah slash off slash leery Larry browsers, Something like that. And then the resulting command would be leery. Dash browser. That's the actual binary file that's running. So what we can dio rather than closing them by process i d. Which we can get running this. We can close them all at once by using the kill all command. And so how did you that is? Basically type kill all. And then the process name, which is Larry browser. That's gonna kill all of those processes. So that's ah, basically how Teoh manage and monitor processes on the Lennox machine. I hope I explained it well. In the next video, we're gonna be discussing services 32. Services Explained: Hey, guys, Welcome back in the last video we discussed processes, and in this video, we're gonna discuss services which are a special type of Lennox process. For the sake of this video, I've downloaded and installed elasticsearch from elastic dot CEO. I've tried different versions of their software and I find that 1.7 point three works best for me. And let me just check and make sure I'm telling you guys the right thing at 1.7 point three has worked the best for me on all debian derivatives that I've tried it on. So if you have trouble with other versions, try installing this. They offered dot debian dot r p m installers. We're not going into depth on the last X search, but we're gonna use this as an example for a service and we're going to see services more in depth in the future as well. When we install Apache Web server on the machine and, you know, use that So we start a service by typing pseudo service and then the service name and then the action we want to perform on it, which is start and we get no output. But it did start and we can confirm that by going to Firefox here and going to the Web interface of Elasticsearch, which is located on Port 9200 at local host. And we see here that we are connected to elasticsearch so we can also stop the service in a similar way. And if we come back here, we'll see that it's unable to connect because we're no longer running that service. So a services like a process except you started up and it kind of weights in the background until you need to use it or it can perform various tasks in the background so they're helpful toe have, and there later on the system when you're not using them. 33. Configuring Services via Terminal: So let's start up that service again. Confirmed that it's open. Perricos takes a minute to load up. And let's say that I don't want to run it on Port 9200. I want to run it on Port 11 50. So, how we do that? We need a configuration file and theological search configuration file has a dot. Why am l extension somebody use find here, toe Look in E t. C. And the type that we're gonna be looking for is a file. And the I name is going to be elasticsearch ass tricks. And here it is, right here. So I'm going to sue. No, nano e t c elasticsearch elasticsearch dot Why am l? And in this file, we're not gonna go over the file too much. But I'm just gonna find the part that configures what port it runs on, which is down near the bottom. There we go. So that's the I P address and then the port here. There we go. The default is 9200. I'm gonna change it to 11. 50 that I'm going to save the file and exit. Now, if I refresh this, it's still gonna work on Port 9200. It's not gonna work on Port 11 50. And the reason for this is that it's still using the old configuration file until the service is reloaded or restarted. So rather than typing, you know, elasticsearch, stop and then elasticsearch start. We can use one command in that a pseudo service elasticsearch Reload Restart. Sorry. And it's going to restart the service. So now if we come back here, give it a moment and then refresh. We're going to see that now we're connected on Port 11. 50. And if we were to go back to Port 9200 it would no longer work in this because the restart function has updated the configuration file that it's running with. So that's basically how you use a service. And we went through the commands that I learned when I was learning Lennox, and we don't use those anymore. So bun, too has moved to using upstart and system control. So nowadays, how we would do this? Let's stop. The service is kind of in the same way. We're gonna use a different program, though, so I'm gonna take pseudo system CTL start. Elasticsearch changed port here to 11 50. So essentially system control does the exact same thing that the service command does. It just does it a bit differently, and that's probably going to become the standard way to do it in the future. So I'd recommend you know it's similar to stop service. The only difference between using service and system control is that in system control, the action is before the program or before the service name in service you type service, service, name and the action. So that's the only really important difference between the two. I would use system control, get used to using that because I'm pretty sure that's what's gonna become standard. Thanks for watching in the next video, we're going to be going over scheduled tasks. 34. Using crontabs to Schedule Tasks: you guys. Welcome back in this video, we're going to be discussing Cron taps, Cron jobs. And this is basically a way to schedule tasks Teoh be run at certain times. So let's get right to it. How you're going to get into the interface for building Cron Tabs is typing Cron tab, Dash E and this is gonna open a Cron tam file. It's gonna be saved to the cetera directory, and I'm gonna erase this. So basically, you can see on this line right here the structure of the Krahn tab. So this is gonna be minutes 0 to 59. This is gonna be hours 0 to 23. This is gonna be day of months. So 1 to 31 uh, month number, which is gonna be 1 to 12 and the day of week, which is gonna be 0 to 6 and then the command that you want to perform at that time. So I'm going to run a command on the 15th minute the 14th our regardless the day of the month, regardless of the month and right, godless. The day of the week in the command that I'm gonna dio is, uh ls and I'm going to output the command results, too. Home, Nick, Elke Cron rez dot txt And I think if I change this to 12 and then save and the exit, it will be able to see this happened right away. So it's going to this directory here on maximizing. So it's now 2 12 and we're looking for Cron Rez. So this process just ran and it returned a list of my, uh, home directory and put it into this file. So, as you can see, if we go back in there, the reason it did that at this exact time is because on the 12th minute of the 14th our on every day of the month, every month of the year and every day of the week, then this has performed, right? So if I wanted this to run at 5 a.m. On Sundays, I would do this. And at five AM every Sunday, it would log this, uh, this ls command two chron rez dot text 35. Crontab Practical Applications: that's cool. But what practical applications doesn't have? Well, one of them, actually. You can see in the example here you can actually keep it back up. Updated. This is gonna run at 5 a.m. Every week on Sunday or Monday, and it's going to basically do this. It's going to create a ah tar archive here, so it's gonna store environ slash backups at home dot Teague easy. And with the contents of it is gonna be the entire home directory. So it's going to make an entire back up once a week of all your files, so that that's pretty useful. I want to give you guys one more example of how Cron taps can be used. So I'm going to exit out of here. No. And what I'm gonna do now is So when we just did that, we set up the reason why it out put my home directory for the L S command into this file is because we created that Cron tab as our user. And so if we wanted to run a command, you know, in a Cron tab that required elevated privileges in order to do that, we actually type pseudo Cron, Tab Dashi. And this is going to open the Krahn tab file for the root user. So for scroll down. Perfect. So let's set up a command. So I'm gonna run this at zero 7 a.m. Every day of the month, every month and on Monday. So Monday morning at seven AM, this is going to run, get upgrade, Nash y. So the dash wife lag in the app get upgrade basically me and say yes to everything. So this command is going to keep my system updated every week at 7 a.m. On Monday. So this this is great for scheduling tasks. If you need certain things to run at certain times or so frequently, you can do that using Cron tab. I hope you guys enjoyed that. I'm really excited because in the next module we're going to get talking about developer things, and so we're going to go over different development environments and technologies and stuff , so that's really exciting. Thanks for watching. And I'll see you guys next time 36. Choosing an Integrated Development Environment: Hey, guys, welcome back. So in this video, we're gonna go over integrated development environments or idee ease as their otherwise called. So there's a difference between a code editor and an I. D. A code editor is good for quickly editing single files or even multiple files, and they usually provide decent syntax, highlighting smart indentation and sometimes code completion, which is really handing tool to have. However, if you're working in a large project or need a more complete set of tools for development, you're gonna want to use an integrated development environment. I These are for the same code features is code editors, but also more advanced features like version control, support tool chains and ways to run the application from right in the i D. Depending on your choice programming, language or development tools, you'll need to choose an I D, which supports those technologies. Some I d support multiple languages, while others choose to support only one language or select few and optimize the I D for the chosen languages. For instance, eclipses a widely used I D provides version control support support from many different languages from C A C plus plus two PHP and Java. Like many i ds Eclipse requires Javid be installed in order to use the i d E to install the Java runtime in a bun to open up terminal and type soon. Oh apt, get install open J. D K, Dash A Dash Jr. Or, if open J D. K eight isn't available in your systems repositories, you can install Open Jay Dickey seven. Then extract the Eclipse Archive downloaded and run the clips Dash i N s T File to launch a graphical installer Code Blocks is another popular I D. The support C C plus plus and four Trend, unlike Eclipse Code blocks, was written in C Plus Plus and Senate Java, and so it doesn't require any special run times in order to use it. Max you Tea or cute is a framework for cross platform Q. I applications and the development installation included Zone I. D. E. Called Cute Creator. Cute Creator supports C plus plus in Q M l. As languages a version control project and build management and includes its own graphical . GeoEye builder called cute designer Cute creator is the smartest i d. I've used in my opinion and can be very powerful when used correctly. Now for anything others in C plus plus in q m l. I use a jetbrains i. D. So jetbrains is a company that provides ideas for a variety of languages. No matter which of varieties you install, they all operate essentially the same way just for different technologies. They include great code completion and build management as well as version control. A comprehensive settings component plug in support. And when you write python code, it even lets you know if you violate any of the pet guidelines, which is style guide for python code to keep things clean and readable. 37. Eclipse Installation and Setup: So once you download Eclipse, for instance, you're going to get a compressed archive and you can right click and extract. And it's going to result in a directory like this college eclipse since dollar. So just double click that and head into that directory. And once in that directory, right click and click open in Terminal and now you need to make sure that Java is installed . So I have had limited success with Open J D. K eight with Eclipse eso I just installed open J. D. K seven and let's see how that works. So just to recap to install open J d K type sudo apt get install open J. D. K seven dash Jerry or eight for the version number to confirm that you've got to have already installed you just type Java dash version and it should tell you, Ah, type of Javy, you've got stalled now to run the installer. We're going to target the current directory and run eclipse dash against and is going to launch the Eclipse installer. Now, once the installer comes up, you're going to see that we have a list of ideas that we can install and I downloaded the complete package. So it gives me every possible option here. I'm just going to install the eclipse. I d for Java, Stephen here and install. It's going to install Eclipse to our home directory. Ah, the Eclipse directory is set up. And then any ideas that you install are put into that directory. So it's asking, Do I trust these certificates? And I'm going to select on it, OK, because, uh, you know, I'm confident that this is the actual application I think it is. Now, when it's done, it's gonna present you with the launch fund. So let's just click that dive into eclipse and have a quick look around. Now I don't use the clips for development, but if you do, if if this is something that you use on Windows or OS X and you feel comfortable using Eclipse that you're gonna probably want to use this on Lenox, it's cross platform, so everything should be the same. So this is the clips. It's ah, the the main window here. I'm going to create a new Jaffa project, and I'm just going to call it, uh, entitled, not really feeling to creative at this point. project. Lay okay. Yeah. This Okay, this all looks good. It's gonna hit next and finish. All right. So on the left hand side here you have a Project Explorer, which is basically just, Ah, a list of projects used in your clips, workspace. And this is my job. A project that I just created. These files opened are from other projects using Eclipse to try it out. And so you can just ah, you know, get started right away clips. 38. PyCharm Installation and Setup: Now I'm gonna look at Ah, a jetbrains ideas. Well, actually, let me just close this there. So the same thing goes for pie charm or any other jetbrains I d that you download, you're going to get a compressed archive file, and you're going to extract it, and you're going to get a directory. As a result, this is pie charming than the version number. So go into the ideas directory and then into the bin directory and open this in terminal. Now, this is pie charm. So I'm going to run the pie charm dot s h file. If it was Web Storm, that would be a file here called Web Storm dot s age, and it's pretty self explanatory. So adapt this to whatever i d you've downloaded and are using, if any. So to get started, I'm going to run S h in the current directory. My charm dot s h and we wait. Now, the first time you launch pie charm in this way, you're gonna be prompted to create desktop file and mind type associations. So a desktop file is basically ah launcher in Lenox, and this allows you to launch it through um the dashboard overview or whatever you're using . If you have, um, a menu to launch APS from it's going to create entries in there. So now, getting started with pie charm you Every time you launch it, you're going to see a list of projects on the left hand side. And I'm just gonna create a new project. Just gonna be pure python. And I'm going to name it. Ah, pie. And it's going to scan all files in the project, which right now there shouldn't be many. That should just be one python file, I believe. So again, on the left hand side, you've got your project Explorer. It actually didn't create a file. So let's go ahead and create, uh, locked up here. There we go. So you can right click on a directory and go to new and create a new file within that directory. And I'm going to call this May. That should be good. That right there, Andi, it's gonna be really simple. It's just going to What's this year? Yes, except that print. Hello, world. Now, the great thing about having an i d. Is if I were just using a text editor for this, I would coat it all in text better than I go open up command line. And then I'd navigate to my main file and I'd run it through, man. And the great thing about on ideas that you can actually run it from the idea itself. And as you can see here is the output of the application and it tells you the exit code it exits with and an idea is very full featured in this way that basically for most of the stuff you need to do while developing it can be done from right within the i. D. And so that was a few of the options that you have for I. D. S. On Lenox. There are a few so explore that if you want Teoh and in the next video we're gonna be talking about gets its gonna be mostly command line. But I am gonna come back to Pie Charm in the next video 39. PyCharm Installation Problem Resolved: Hey, guys, in this video, we're gonna be discussing git and why you should be using version control for your projects . So first of 90 to do is actually manually create the dot desktop file for pie charm because it did not do. I guess so, Uh, in the BIN directory, I'm just going to open a terminal and run my charm dot That's h. And when it starts, I'm gonna cancel. It's gonna automatically load the last project that I was working in, Just not what we want. Right now you're going to see this configure link in the bottom just right. Left. Click that click create desktop entry here. Sure, that's giving me that error here. Locate suitable startup script. What's odd? Because this is the startup script. If we can make that excusable, see if that fixes it. They're real. So if you guys encounter that, just make sure you're right. Click here properties permissions and allow executing files program. You can also do this with CH mod Ah, command. So it's just confirmed. Good stuff 40. GitHub Installation and how to Setup a Repository: So now I'm gonna launch pie charm and kind of throw that in the background because we're going to get more into get at this point, just gonna close. It's actually so now let's talk about get It is a great tool if you work in a team, if you're working on large projects or if you're working on open source projects. Get allows multiple people to work in the same files or the same project same time, and it's pretty smart at letting you control. You know, if there's merge conflicts, what exactly, to do. An emerge conflict is basically where the same block code is edited, are modified by more than one person and sent up to the server. There's gonna be march conflicts and you can sort those out and we're going to go through that. So first thing we need to do is install get so again, terminal sudo apt, get install, get and get stash extras and the reason we're adding get extras as well as get is that get extras gives us a little more control, and we're gonna go over some of the things in the get extras package as well. In terms of what certain commands do you get? All right. So once the installation of git is completed, I'm going to actually go into the pie term directory for the project I just created. So I'm going to I think it put into pie charm projects. So it's going here, and I named High, So I'm going to change directory in the pie and we see our files here. So now what I'm going to do is initialize a git repository here. So I'm gonna take get in that And it's an empty repository at this point. Has no information. It doesn't know where it's supposed to sync up to sell. What we need to do at this point is, uh, go into our web browser and get over to, ah, get hub dot com. It will create a repository for this project. So on, get hub. If you don't have an account to sign up, if you do sign in, and when you're signed in in the top, right, you've got this little plus sign you're gonna click that and click new repository and here you're going to give it a name. So I'm just going to name it the same as my project. Actually, I'm gonna name it Python Dash. Hi. Example. And we're going to initialize the repository with the read me that we can automatically pull right, right from the get go. So here is the repository. And here is the URL for the repositories. Just clicking here, Control seed. A copy. Come back over to the terminal and we're gonna run, get remote at origin and then paste What we just copied from the get hub page. So this is basically gonna tell our local repository where it's remote origin is, and that's the repository that you see in the background in chrome. So when you enter here and we if you don't get a confirmation, that means it all worked well. If you get an error, just try and follow the error messages close as you can, and see if see if you can get added. The git you are. L toe add an origin always ends and dot Get so pay attention to that as well 41. How to Push and Pull Information from our Repository: Now that we've got getting stole that are get repository set up here. We also need to configure our user account. And so how we're going to do that is through the git config. So run get space config two dashes and the keyword global user dot name. And in the quotations here gonna take her name and then get config global user dot email. It's going to be this. So now our user is set up, We can pull from this repository and push to it. So let's do a pull. Let's ah, run, get pull and you're going to see that it's going to give us an error because it doesn't know exactly which branch is the upstream. And that's basically which branch you should always pullin push from. So you have two options. You can either run, get pull origin and in the branch name, which in this case is Master. This will work, but also you can set the upstream branch. So I'm going to do that. So run, get branch dash dash set upstream to equals. And here we're going to ah type origin dash the branch name. So in this case, it is Master but that's not gonna work. Let's do a pull. Let's do a manual per poll first. So get pull Origin, Master. And if I run, ls we? Now see that we've got to read me in here. So I'm gonna try setting the upstream again there. So you do need to do a poll first. And that basically tells your machine what repository are what branches the repository has . And then you can set the upstream to one of those branches. But the repository on your local machine has to be aware of the branches first. So now we've got a repository set out. We've got a file that we can edit, and I'm going to do that. So I'm gonna come over two pi charm here and open up the project. This means that for now we've got to read me file. So I'm just going to write Ah, quick description here, there. So I'm gonna control us to save that and come back over here. I'm going to clear this so it looks a bit cleaner. And now what we're going to do is push this change to the server and how we do that is we first need to add all the files Teoh tracker. And secondly, we need to commit our changes and then we need a push. So toe, add the file, you can either run, get ad and then the file name. Or if you want to add all changed files, you can run get ad dash capital A Now that we've got the files added, we need to commit the files, and we're going to do that with git commit Dash M and then our commit message, which basically is a headline for these changes we've made. So it should ah, it should. It should describe the changes that we've made and be less than, say, 100 40 characters because this is going to show right here. And if it gets too long, you know, it might, uh, not be his convenient as it should be. So I'm just going to name this one updated Read me Added made dot pie, then hit. Enter now I'm going to Ah, uh, let's just push it. So get push. Now, if I hadn't said the upstream to origin Master, I would have to type get push origin master here. But I have the upstream set. So I'm just going to type, get push, and then enter the user name and the password. And this commit has been successfully pushed to the remote repository. So if I come back to this page and refresh, we're going to see the changed The Read Me file has succeeded. The main dot pie file has been added, and we've also got this directory right here, which is for the pie term i e this these files provide information to pie term about, Say, which files were are currently opened, uh, stuff like that. So if I close pie charm and reopen it, it knows what files toe open from my last session. 42. How to Remove and Ignore Directories in our Repository: All right. So what I'm gonna do at this point is I'm going to remove the dot idea directory and this is done not through. The typical are in command, which you would expect. It's done through git. RM are and then the directory. So it's removed all of these files now. And if I change, actually, it's not gonna be there. If I go back to buy charm, it's probably gonna tell me that something has changed. Needs to be. Ah, no, the notification yet. All right, let's just do this. Let's run, get add a get commit remove idea directory and get push. Now, if we go back here and refresh the idea directory is still here because it's got that now. So in a close pie chart entirely, it's run the, uh, remove again. Remove it with Dash F because it's been modified. Then let's get push again. They're So now. If I refresh, I should see that directory gone. And I do So how do you get get to completely ignore that directory because it's going to be automatically created every time I launch ah pie charm or whatever jetbrains idea you're working in and I'm not sure if it does it for other ah ideas if it creates a little hidden directory there that you don't necessarily want to be included in the repository. But if it does get the name of that directory and do this So in the main repository directory, I'm going to run, get ignore. I think that's actually using a hyphen. But I'm going to ignore that directory of everything in that directory. So if I taped Nano, get ignore, I see this, which is good when exit out of there and I'm going to type, get ignore that just the directory. Wait there. So now if I open up I charm, let's make some modifications to the main dot pie file and then we're gonna commit those changes and send them up to the repository, and we should we should ah be able to see that the idea directory is excluded. So I'm going to open up main dot pie here. What's deaf? Fine main function message. It's print message, and then we are going to just call main. Hello, people save. We can run this in the i d. If we want to make sure it works before we commit it. Now let's go back over here. Let's run. Get ad. Hey, get commit. Um, changed main dot Tie and then get push. There we go. So I'm gonna refresh this, and we've got the main dot. High file is the newest version we can see there. We don't have the dot idea directory because we've ignored it. And this is our get ignore file. So that's cool. This is how you would use git, um, in terminal. 43. How to Resolve Merge Conflicts: Let's do. Let's do this. Going to change directory out of here. I'm going to create a new directory called High too CD and a pie to get in that Get remote . Add origin and I'm going to add the same one. Get pull. Oh, I need to Ah, do the whole origin master again. And now we have two directories. Has this project of it. I'm going to pie charm projects and going to pie, too. I'm going to make changes to this file. Add a comment, save that now. Going to get add a Didn't get a push. Sorry. Get push origin, Master. All right, now I'm going to change back to my pied director. And what we're doing right now is we are creating emerge conflict. So if I refresh this page, I'm going to see the most recent should you know what happened there? Okay, you guys, I forgot to commit the changes before pushing. That's really silly. So let's go back into the pie to directory. And I'm going to get commit, uh, made some changes and then get push to origin Master. All right, so now if I refresh this page here, we're going to see the comment in here, which is cool, but this came from our pie to directory. If we go back into our pie directory, we're going to see that we don't have that version of this file. So this directory now is behind the actual master branch. Now, we would normally run, get pull at the beginning of each day. If you do this professionally, you run, get pull at the beginning of the day and maybe even throughout the day, um, and make frequent commits. But let's say you forgot to do that. And now we have emerged conflict. If I were to pull right now in this directory, everything would work. Great, because I haven't made changes. So let's add a different comment here and by charm. Just wrecked up on me. So close that Wow. For right now, I'm just going to edit this in G ETA. I guess adding the second comment to this file Gonna save now in the pie directories. So go back to the main directory were working in. I'm going to get at a get commit. I'm going to try to push my change to the server without being aware of the fact that my local repositories actually behind Ah, the remote repository. So this is what you would do? You make your changes, you'd add the file you'd commit with, uh, adding new comment and then try to push. And now we see that we get an error message or, uh, because we're behind and so is his fetch first. So let's run, Get fetch Origin Master and we open up this file, merge conflict, fixed conflicts and then commit the result. So now we've got this because we we told it to emerge, and this is what happens. The head is this and this is ah, is what they're most ever contains. So we see that it's added some special characters That kind of tells us what is coming from what? So if you have a huge file, you can always see your changes reverses. The change is coming from the server, and now you could do some fancy little stuff like, let's just keep both comments in here because they're both useful comments and then save this file. Now we can get, uh, add the file, get commit, and we're going to say merged, uh, conflicts result and Now we're going to get push and it's going to succeed because we've taken care of the conflicts. Now, if I go back over to this repository and refresh, I'm going to see that both of those air in there and ah, that's well, we really need to worry about at that point. So So we just learned how to handle merge conflicts, which is a very useful skill toe have pie chart was still bricked up on me entirely, and I'm not sure why. 44. How to Setup and Manage Branches: Let's launch Web Storm. I'm going to show you guys something else here. Just too quick. Little demonstration. Actually, I like to do this high charm. It doesn't Ah, kill it by the term pie chart, I'm gonna have to kill all Java processes so you don't kill all java. All right, now I'm gonna run pie charm again. I have noticed that by charm, sometimes bricks up, but I'm not sure why. I'm not sure if it's just an incompatibility with my system. Ah, the other jetbrains ideas work fantastically. I need a fire watcher is not excusable. Maybe that's the whole issue there. Not sure. Uh, so what I'm gonna do is add that I'm going to initialize version control here right in my i d. So what I'm gonna do is ah, let's go to few tool windows version control and we can see that I've got one file changed , and so jetbrains id's a really smart. They kind of just plug right into version control. So if I change files, let's say I ah, make a change here. I'll see that in Ah, the default local changes. Two of these are Abbott here. These are all the files that have changed. So if I right click, gotta commit changes Ah, the commit message is going to be newest. Commit and hover over this. But you can either commit and continue working to make more commits or you can commit and push all in one. I'm going to commit and push. Ah, it's going to origin, master. And ah, it's pushing. And it's going to ask for my password again. Once in decided, he I think. No, no, I guess it doesn't all good. Let me find that repository accidentally back. Here we go. And we can see newest commit here, which I just pushed from the I d. And so I d Ys make, um, make version control a lot different. I'm going to create a new branch and call it, ah, version 0.1 it. Okay. Now, if I make changes in here, no longer need comments, and it bricked up again. Cool. All right. Basically, that's how you working branches, though. So if I were to open this file with, uh, g edit and at this no longer need comments here because it's self explanatory, what's ah, create another function. And let's just have this print out new function, and we're not gonna call it or anything. I'm just going to save this and that. Uh, no, this one is. All right, So now, if I we'll get branch. Okay? Get at a yet commit You ran Get push origin. Uh, he's there at one. There we go. Now, if I come back here, we'll see two branches. And so this makes sense if, ah, if you have multiple people working on different type of features and it's better if they work alone in a separate branch, So they don't have to worry about the changes everyone else is making to other areas of the project that don't necessarily impact them. Each person can have a different branch. So you might have branch for a specific new feature or you know what have you? But branches are pretty, uh, simple. So you can also merge branches back in the master. So now we're on Ah V 01 branch here. And so we can switch over to this branch and we can see that it looks a bit different because this file was changed with that commit. So how do you get those commits over to the master branch. You need a check out Master branch. So currently we're on V 01 because that's the branch we're working in. So run. Get check out, master, and then get push. No, There you need emerge the branch together first, and then run. Get push Origin, Master. And if we refresh here, we now see that the master branch has this new commit. So that's how to use Get in command line. Uh, basically, it's really simple and it's really great if you have large projects, or again if you have a team of a lot of people working on the same projects. Thanks for watching this video. I hope you guys found it informative and useful. 45. Correction from Previous Lecture: Hey, guys, in this video, we're gonna be going over some meteor Js stuff. But first, I just need to correct something from my last video. I've been working in JavaScript quite a bit lately, and so it's natural for me when I make comments to use the two leading slashes, and this is the same in a lot of languages. However, it's not a make comments and python. And so I just need to correct this so that you guys know that I was doing it wrong in the entire last video eso in Python. We've got this comment here and theatrical way that you write comments and Python is by using a hash tag sign and it turns it blue. And yet it's so you know, it's ah, it's commented out. 46. Getting started with Meteor: Hey guys, I want to touch briefly on meteor Js today in this video and a little bit about how to use it. So first thing you're going to do is in the address bar. Just ah type install meteor. It's going to give us the location of theme meteor installer to download as right here You're on OS X or Lennix. Just copy this command here, open up, turn a little, clear that out and then paste in here. And if you get this error, it means you don't have curl installed seeming to install it so soon. Oh, out, get in, stall And once girl is set up, you can run the previous command again and it's going to download meteor and install it. I already have meteor install here, I guess. And so it's removing my existing meteor installation and it's going to download a new one. So when Meteors done installing it, ah gives you a little notice year. How to get started. Eso Let's just create an app. Do I have a projects directory already? Ideo So when change directory into projects and I'm gonna type meteor create to do it is going to create a project in a project directory in my current directory called to Dio. So I'm going to change directory and then if I list the directory. Meteor has created three files to get me started so I could type meteor that is going to launch three. The the program on Port 3000. They're real. So once you get this message, it means the APP has been launched so you can go to local host on Port 3000 and this is our meteor app. It's got an event handler here for the Click Me button, which counts the times it's been pressed, but that doesn't really look too great. So I'm going to close this year, and how you add packages to meet here is you type meteor. Add in the package name so you can browse meteor packages by goingto atmosphere Js dot com . And, ah, if I were looking for, say bootstrap, I would. There's a lot here. However, the official bootstrapped uh, module or package is ah, T WBS stands for Twitter Bootstrap in them. Who's trapped. So I'm gonna add that to my project like this and let me go into the file manager here into projects to do, and you're gonna see the three files that I created for us. But if you hit control, H, you're gonna also see a hidden directory titled Meteor. And this is where it stores the packages that we ah, that we add. And ah, and some internal meatier stuff is, Well, we're not gonna get too into that. Thes are the files that you'll be working in with Meteors. So you can open, for instance, the html file with, uh, gee edit. We go and you'll see this is Thea Markup. So meteor works with templates a lot. This isn't a new in depth tutorial, but more just how to get started. Meteor has a pretty awesome tutorial on their website. Just gonna meet here dot com, and you can access the documentation reference points and the tutorial to get you started. So that's a basic usage of meteor in the command line. Typically, it's just meteor create, and then the app name. And once you're in the apse director, you just run meteor to run the application, and you can use meteor add or media remove. If you want to remove a package, add to add a package and then the package name. So thanks for watching this video. I hope you guys found it informative and a good place to start with meteor. Ah, selling point for media is the fact that really time interactions are built into its core. So you no longer have to fake it with JavaScript. Ajax calls Teoh PHP scripts. Everything is done in JavaScript. It's all rial time, so it's awesome to work with. Ah, and it It makes things easy as well. So So check that out if year into, ah Web application development at all and I'll see you guys in the next video. 47. Setting up our Meteor Project: Hey, guys, Welcome back. I'm gonna do this video. I wasn't going to, but I decided to do it as this is a module for developers. And I think the information you'll find in this video is gonna be really helpful for you. And so it's going to be a more in depth look at meteor and how to use it in your next project. So it's a tutorial of some sort, and so I'm going to be showing you guys how to use meteor with react and flow router. And I find that there's not too much information out there on this combination of tools. And so it makes sense to give you guys that information if you're following along this course anyway, you know, I think it's quite reasonable to assume that some of you at least, are going to need this information. And even if you didn't know you needed it, maybe you could go ahead his meteor in your next project. So in the last video, we created a project through terminal for meteor. So what I'm gonna do now is I'm gonna open up my terminal, and I'm going to change directory projects and into two Dio, and so meteor automatically creates a few files for you first. So let's go ahead and open this up in Web Storm. I'm going to click open and down into projects to to do it. Okay, Now, Web Storm is going to open up Thea Project and we've got the project few in the left hand side. So the first thing we're gonna do is delete these files because we don't need them. Now we're going to start creating some directories because in meatier projects can get fairly large because you're going to be working with a lot of files. And so organization is a huge benefit here, so Ah, let's right click and create a directory called Client Going to create another directory called Lib and one more for server. Now, the client directory is gonna contain everything that's going to be available to the clients. This is where your templates and stuff are going to go. So in client, I'm going to create a new directory called Components, and this is where we're going to store the reactor components now in lib. What I'm gonna do is create a file called router dot Js X and in the router file, We're gonna be finding routes for floor outer. So before we get to that, we actually need to add some packages to the project. So in the directory here in terminal, just tape meteor add react and then could era colon uh, react layout and your ah, Colin flow dash, router and hit Enter. There we go. So we've got everything added in here. I was having an issue with jetbrains i d. Ease. And basically it was a conflict with open J. D. K. And so, in order to resolve those, I've installed Oracle Java, And basically what was happening was when you start typing something, this auto suggestion box pops up and that was causing the program toe hang. And so to resolve that what I had to do was at a repository to my system. And I'm just going to search Web update Jabba, and you're going to go to the launch pad dot net page and in here just copy this archive. You are all there and in terminal, you can run pseudo add out repository and then the repository name, and you can actually start connecting multiple commands together. So sudo apt get updates. And the way you connect commands together is by using two AM percents between the commands and that basically says Run, command one. And when that's done, if it's successful, run command to And if that's done, run the next command, which is gonna be pseudo apt. Get install Oracle, Dash Java eight bash installer. And so you're gonna run that. And that should resolve the issues with jetbrains i d. Ease if you're having the same ones as I was. Uh, so let's get back to in here. So let's start making some routes. 48. Setting up our Router and React Components: So the first thing we need to do is set up the router to be able to actually route to, you know, certain files on the routes. So to do this, we're gonna create the first route which we're going to type flow router, not route. This is the path that we're creating the route for. And then you pass as the second parameter an object and that with semi colon, and you can name the route. So this is going to be named home, then put a comma and the action function and take Haram's as its argument when we open that up and I'm going to reference here a function that we haven't yet uh, actually created, but we're about to. So the function name is going to be render have you than in here. I'm going to create the objects, So this is going to be home, and this is the react component that we're going to create. So, basically, we have a function here that we need to create called render view, and we pass that a component. So ah, here. We're going to create it, uh, function, render view, and we're going to reference that object here as component and then we open it up. And basically all you have to do is type react dot Sorry, react layout dot Render main layout and we're going to pass it a few parameters. So header is going to be header component that we need to create content is going to be the component were passing into it and then footer is going to be ah footer component that we need to create and then hit saved. And this is all we need to dio uh, this bitter code is going to render ah header a component and a footer. So let's get started with the ah with the main layout. So we're telling it here to render this react component and pass it these as parameter So we can actually reference the of these components inside the main layout component by typing this stop props dot header content and footer. And we'll see this in action here in just a moment. So in clients I'm going to in components, I'm going to create a new react class called main layout dot jsx and here basically, we're going to get started with how to create react components So the first thing you need to do is name the component. Mine's going to be called mainly out, and we see that's equal to react. Create class and we open that up with brackets and curly brackets. So ah, we really need Here is the render function, and that's all we're going to do at this point. So take it, render and then in the render function, you're going to put return and you're going to open up just regular brackets and this is a bit odd. I know, Um, but this is how it's done. So here we can actually print html and it's going to, uh, it's going to render what we tell that you. So we always need to wrap, um, all elements under apparent container so I wouldn't be able to say, return to dips like this two siblings. It wouldn't work. So we do need to wrap it. So here we're going to to reference the props that came in. And so, as an example, I'm going to add another prop here called Log This and it's just going to be a string. Um, this is, ah, property that I'm going to say that So in the render function, you can access that by typing Consul log and then this dot crops dot Log this and see that . And I'm going to go to the app here, and I'm going to refresh it and you're going to see two things happening. The first is that home is not defined, and that's because we haven't created the component yet, so we still need to do a bit of work in order for this to work. 49. Watch as our Meteor Project Begins to Take Form: so in components, it's create a new file. Let's call this better not JSX, And I'm going to open it up by typing Header equals react, create class. Open that up as usual. And in the render function here, I'm just going to return a bit of bootstrap. Uh, so active class. Uh, actually, I'm just gonna wrap that Dave first eso in this render function, you can't just type div class equals, you know, whatever. Because class is used in javascript. So we actually need a type class name, and then we could give it a class, so I'm just gonna call it now bar, have bar default and close that. And I'm just going to give class name equals container, put a bootstrap container and there and then give class name equals. Now bar brand. Actually, this should be in a element, and it's just going to say, uh, my site name like that. So if we save that, the header is now created. So I'm now going to create the footer and the same thing would go for the footer. But I'm not going to put anything in here. I'm just gonna have it return a div so footer equals react stock, create class. We're gonna open that up, going to open the render function and return Div like that. So now we need to create the home component. Ah, and the reason why is we've referenced home header and footer. We've got footer and header created. We still need this component which were passing in as home. So we need to create the home component. So I'm going to create a new directory here to keep things organized. I'm gonna call it home. And in that director, I'm gonna create a file called home, not JSX, And I'm going to do the same thing. I'm gonna name the component home reacts dot Create class Right now I'm just going to render a, uh, return div Ashley H one. It's gonna say hello world and hit save. So if I come back here and refresh this page, we're going to start to see it take shape because we've created all the components that were referencing. And so the first thing I'd like to draw your attention to is that it? Rent it me. Open this up. So in the Where was it? Ah, the main layout. I console log this dot props start lock. This which I passed into this class is a property, So that's basically what's happening. We're passing in components to the main layout components, so I would reference header content and footer in the very same way. Except what we could do is, if you want to render the content of a property, you put it in single curly brackets. So it's like blaze except you're not using to curly brackets. You're just using one, and you just type it. So let's type this stop props dot at her this dot props dot uh, home. Our content. Rather, we're referencing that here we're setting it. The property is content, so we're going to reference it like that and then the footer as well. So this dot props dot footer we're going to save this and this is our main layout. So the header, If I, for instance, made a route called Floor Outer dot route at slash page that opened up curly brackets here , let's name it Paige, and the action is going to be read interview. And let's say I had a component named this page. I would do that, and it would render that component into the main layout with the header, that opponent and that the footer. And we're also passing this just a za proof of concept. I'm not gonna do that. So now we've got this but Boots draft does not appear to be working. And I think maybe maybe I forgot thin to add Bootstrap here. I don't think you got ah, at it. Maybe in the last video. I know. Added it. Maybe I canceled out of it for some reason. So let's go ahead and get that at it. So control. See here. Meteor ad tw B s colon, Bootstrap and hit. Enter. All right, I'm gonna run. Meet here again, and the page refreshes automatically because it's meteor. 50. Getting into the Programming of our Meteor App: what we're gonna do next is get into the, uh, programming of this. Someone close eases that no longer need them. And in server, I'm going to create a new directory called Collections. And in here I'm going to create a new file on I'm going to call this collection, uh, posts. And so posts equals new among, uh, mongo collection posts. And then I'm going to write posts, allow in search function, returned true update function, return true and remove function function. Return true. And this is going to allow us to insert up the and remove from that collection. So the posts are going, Teoh, let's create a way to put the posts in first. So in the home page, let's actually I'm going to create a new component here called, uh, insert post Doc JSX Insert Post is gonna be the name. It's gonna be equal to react, create class. And I'm going to basically render some html to put a post in to the database. And so I'm going to form. Actually, I don't need that. Let's just use a text area. Placeholder is going to be type a post name is going to be. Please just give it a class name and we're going to put form control. And I d of, uh, post body there, Malloch tagged as empty body. All right, and then a button. So button class name. It's going to be button, but in dot info and it's going to say save post. So let's say that in the home component, let's render that so it's just ah, post there. Oh, right, I I have to wrap it here. They're all right. Let's invent this so that it doesn't look too bad. And if we refresh this, we're going to see that our new component has been rendered. But if we ah type stuff, it doesn't do anything right now. So let's have a insert to that collection over here. And how we do that is we're going to create a new function here called Insert two Collection. It's going to take event, and so once you start getting mawr functions in reactor components, you need to separate them with a comma. And what we're gonna do is we need to say, on click and in curly braces. Type this and then the functioning. So this is going to be insert to collection, and we're not passing anything to it. So you can leave out the ah brackets here at the end. And the first thing we're gonna do is, uh, event prevent the fault, and then we're going to get the post body. So, uh, content, Actually, I need to far content equals. And we can just use straight up, uh, G query here to get post body. I'm going to console log content, make sure we're getting it. I didn't need to copy that there, so let's see that. Come back here. Refresh this. There we go. And so we are getting that content into that function. So from this point, it's ah, basically regular meatier stuff here, going to tight posts, insert and then, uh, you know, content, content. Save that and refresh. And actually, to be able to, uh, I am gonna wrap this in a form element. Uh, just because it's there so that we can hit enter in the text area, and it will also submitted. So on submit. We're going to call this dot insert to collection, so we can actually just change this to type, equals, submits and remove this part here. And this button will also function as a means to insert into the collection. So if I come back here and refresh, let's make sure that gets into the collection. So this is a post to insert to the collection going to enter. All right, it's the text area. Never mind. I'm gonna save that and it logs it out. And if I want to make sure that it ah, inserted successfully, I'm just going to in the consul log here. I'm going Teoh find and let's just do that fetch. And it did put into the database with content there as Thea as the key. So let's actually extend that a bit further by adding date added, It's going to be new date, and if you want to be able to read it easier, you can do this. That's what I usually dio and it's going Teoh, make it easier if you get like, huge objects that you're putting into the collection. So I'm gonna delete that console log. Now. We do not need that. So now we've got this working. It's a component to insert posts, but how can we get them out of the database so over in our home component. I'm going to do a couple things. The first is going to be I'm going to add a property called mix ins, put a colon and then, ah, this in a tight meteor react, Uh, react meteor that, uh So now we can create a new function, and it's going to connect meteor data to the component. And the function name is going to get meteor data. We open it up, we do this. So right now I'm going to just get all the posts. And so I'm going to Ah, variable hosts equals hosts, find, fetch. And then in here, we're going to return certain things to the render function. So I'm going to just return and then open up curly brackets here. I'm going to return posts as posts. I'm going to save this. And now what we can do is we can access that from the render function by, for instance, uh, it's created variable here called all posts, and this equal to this dot data dot posts. I'm gonna consul log Oh, posts. You see that? Gonna refresh this page and it's going to log all the posts, which right now this is the only one we have, So that's awesome. How do we get it into here? Well, let's Ah, let's actually go back to insert post here. Gonna create input field. Uh, class name is going to be form control. The idea is going to be user, and the placeholder is just gonna say user name and that, but a line right there. I'm also gonna put a line break down here. I'm gonna also handle this, so ah, var user equals. And then just straight up J query from here, the i d of user Val, I'm gonna insert that the collection as well. So user equals user comma. So we now have three fields that will get entered into the collection. I'm going to remove the current one that we've got because it doesn't have this necessary information in it to render it so I'm just gonna type posts, find Oh, fetch. Gonna get that. I d I'm gonna say posts. Move. I d that after now. If I run posts, find Fetchit finds nothing because we have just removed it 51. Rendering our Blog Posts: So let's create a component to render the posed so in the home directory under components, I'm going to create a new file, and I'm going to call it post dot just single post dot jsx. So, as usual, post equals react, create class, Open it up here. And what we're gonna do at this point is something a little different because the each post that's rendered needs to be rendered with this single post. So what we're gonna do is we're going to pass the post I d. As a as a property to this function. So I was just ah, render and let host I d equals in the post i d. This props post i d. Now something I like to do if we're passing multiple properties and they're always passed in as this props and then the name of it, What you can do is you can actually ah, do this. So just wrap your variables. Now these curly brackets and, uh, let's say I also had a post image and whatnot. This would say basically each one of these equal to this stop prop stop whatever it is. So it's really useful when you're using multiple ones right now I'm just going to console log post I d and then the post I d and turn diff well there. So what we're gonna dio is we need to map the posts. Actually, let's get to that after Let's Ah, a couple tasks in here is that we can actually pull him out and, you know, see what we're so user name. Nick, this is my first post it save, and I should set it to automatically reset Thies to default empty when we save it. Uh, this is another post and then something you'll really enjoy. So now I've got three posts and I want to pull them out down here. So now, to render posts, we need to create ah couple methods here in the home file. So one of them is going to be called, uh, get posts. We're gonna pass it an I d. And the other one is gonna be called render posts. So what we're gonna do is Theo Get post is just going to return all of the posts, so I don't need a Pass it on. I d eso get posts. Let's just do return posts. Find thatch and then from here in render posts, we need to return this, get posts, and then we're going to map and we're going to call it post here and put a little fancy arrow to an object. We can have that with a semi colon, and we're going to return the post component with the post being sent as an attribute or property. So let's and that with a semi colon as well. And what we need to do is in here in the main body of going to put ah line break there and then I'm going to call this render posts. Let me have a quick look over here. Make sure it's all good. Looks all good. So let's go back here at what we need to do is in post. Ah, see, There we go. Ah, imposed. I'm just returning this. So let's do class. Name is card. And then in here. Let's go with each three tag and ah, here, See this property? That's what I'm expecting to get. And so Ah, the post is the only property that I'm sitting over here small going to in curly brackets here. I'm going to put post Ah user and then in a paragraph tag, I'm going to put post content saves. And so, to recap, what we're doing is we are mapping the results of this function, Um, to basically this and this is Ah ah, new way. We can actually pass. Passed each item from these results over as post to this little block here which returns the components on. We pass the post through with the property Name of post. So in the post component, we can reference the entire post. Is this from this? Props, If I go back here at refresh got three there. This is not working. What have I done wrong? So I'm going to pass the idea long as ah kee property here posts underscore i d. And the reason why wasn't rendering the post is because I forgot to add the ah brackets here so that it runs this function. So if I save that, go back here at refresh. I'm going to see this now I'm going to let's say, ah at a few of these here. And the great thing about react is when something changes, it scans the document and you'll see over here react. I DS, and it performs at def of the current content versus the new content. And Onley rewrites the portions that need to get rewritten. Eso it's a lot faster, and that's why it's better to scale using React that blaze Ah, second post of mine, which will be a bit longer. So I'm going to style this up a bit and I'll be right back. 52. Putting the Finishing Touches on our Meteor App: Alright, guys. So this is getting closer to done. Uh, we now have a working way to insert posts and also view the posts here. One thing you'll notice is that we've got posts by two different people. So how meteor should handle this and react and floor outer? We're going to modify our home component a little bit to be able to use a different route. So I'm going to go into my router file here, flow router and listening their outposts by and then Ah, user. So the colon here basically means that what follows is gonna be the name of a variable. And we can use that variable by accessing Haram's. So what I'm gonna do is name the route, uh, posts and the action we're gonna pass Paramus to the action is going to be render if you I'm going to reuse the home component here. But I'm also going to pass it in with user property. That's going to be equal to, uh, Haram's dot user. And so now I'm going to close this component and and that was semi colon. I actually need to there that got a little dish place there. Silly issue when we create new routes, we need a type floor outer dot route. All right, So what we need to do now is ah, we need to make this a conditional if, ah, if we're on basically in the router, we're passing a user property here, but we're not here. So we can use this to identify if if we're on this route. So what I'm gonna do is here in the get posts method. I'm going to say if this the props start, user, we're going to return posts. Find where the user is equal to this stop prop star user gonna fetch those elf. We're just going to return all the posts. So if I go back here and refresh this, I'm going to see when I view posts by neck that these air the only results I get And when I view posts by Pete, these are the only posts I get and still accessing the home page. I will get all of the posts and so you can see how you can really reuse components here to ah to be able to serve conditional data. Now, that's basically all meteor is is very simple and straightforward. using with react and floor outer. I really recommend it. It's much faster. The development. I mean, it's basically quicker to do everything. It's quicker to develop. It's quicker to browse, and it's It makes your app faster in general. So I hope you guys found this video informative. I know it's a bit longer than the other ones, and so hopefully you know, the next few videos will be shorter. I think they will. And I'm actually going to provide this coat to you guys through get help. So right now we're going to be combining a bit of what we've been doing. So I'm gonna go toe get hub dot com But I create a new repository here, and I'm gonna call it meteor React tutorial. And let's initialize it with the read me file. And then, ah, you know, all the usual stuff. So from right in the directory here, get in it, get remote at origin. I need to pace that. You are all here. I'm gonna close Web Storm so that we can get rid of the dot idea directory. Okay. So we can just use the regular arm. Uh huh. Idea there and then we're going to run, Get ignore. All right, thea, forward slash Get add a get commit. Um, the message is going to be example. Meteor react stuff and get push origin Master, There we go. If I refresh this, we should see. Yeah, So here is the entire ah meteor project that we just created. Ah, you can find it. A get hub dot com slash knicks remain slash meteor dash react dash tutorial. So thanks for watching this video. I hope you guys found it informative. If a bit long. Hopefully the next ah set of videos should be a bit shorter. 53. Apache 2, PHP 5 and MySQL Setup: Hey, guys, Thanks for joining me again in this video. We're going to be discussing Apache two, but we're more going to focus on Apache two PHP and my SQL. So we are, in essence going to configure and set up a ah lamp stack through this video in the next video. This video is going to be more of beginners 0.2 to actually install everything necessary and get a basic configuration set up. And in the next video, we're gonna be going through more advanced configurations that you might want to dio. So pull up terminal and install the necessary packages. So Sudo apt get install Apache two PHP five, my SQL server. Ah, PHP five common And I should do it for now. So it Yes, it is going to download about 40 megabytes of data, so this may take a little a bit of time, depending on your connection. So Apache is the server that runs quite a bit of the Internet, and it basically allows you to host websites and stuff. So if I were, uh, working with my server through ssh or something, I would be doing this to install Apache and whatnot on it to be able to get it to actually serve Web pages and content. So that's why you would use Apache Now you might just be, Ah, you might just be playing around, you know, with creating websites and you find you need Teoh. I found actually recently that you can't use less dot Js um without, you know, going through a server and the domain and stuff If you just loaded up. If you create a basic HTML file that uses less and the less Js file, you can't just open at, like file colon slash, laugh slash, and then the file path, you're actually gonna have to set up Apache and serve it as a Web page on local host. So with my SQL, which is another sequel server, that this is more commonly used with PHP and it's for good reason. I mean, it's good. It's just not not my preference. I really like Mongo db and my SQL is more compatible with PHP from what I understand. And so you might use this if you are hosting a wordpress blogger. If your doing PHP my SQL development or if you're maintaining something so the my SQL service needs a root password. So the user name means route. And the password is gonna be whatever. You said it too. Ah, So I'm gonna set it to this. You're gonna have to re type it. And I think that's the only user interaction that this is going to require. Should just return me to the prompt in a moment, and then we'll get to how to start Apache and PHP and what not? 54. Server Configuration: All right, So now that we've got all that installed and set up and everything, what you're going to do is start the Apache to service. So just type pseudo system control. Start Apache two. And right now, we should just be able to go to local host Ah, on no port. And we'll see the default. Apache two directory our webpage. So the first thing we're gonna dio and you're gonna see why. Let me open up file manager here. I'm gonna show you where Apache two serves the files from default. So we're gonna go to other locations. Computer var. So from the root directory, it's gonna be fire that we w w html This file is the page we see right here. We see that route, owns it. And so if we were to edit the file and save it, we wouldn't be able to We have to run. Everything is pseudo or route, and that's bad. So we're not gonna do that. What we're gonna do is we're going Teoh, make a few configuration changes. The 1st 1 Let's go with Sudo Chown Nick Neck Ah, far www. Actually, we need to do that. Recursive Lee There we go. Now let's have a look. Make sure this went through good stuff. Now, the second change we need to make is within the configuration file of Apache itself. So it's ah, change directory into E. T. C. Apache two. And we're looking for Apache two dot con so Ron pseudo nano Apache two dot com. And that's actually the wrong things were going to come back to this file later. We actually need end of vars. So I let's pseudo nano and roof fires. What we're gonna do is change the run user to our user and the run group to our group patrol. Oh, control acts. Now, you actually need to restart the server. So if I were to refresh here, if we had ah, any major changes in configuration, they wouldn't take effect until we restarted. We'll learn that in the next video when we actually set up virtual hosts and what not you'll see. That won't work until we restarted. So pseudo system control restart and she to restart this. Now. Basically, what we've got right now is the ability to edit this file. So the first thing I'm gonna do is delete this file. Now I'm going to create a new file. So let's go. It was just open G Edit here for actually. Let's ah, use Nano. So var www html we're going to Since we actually have write access in here, we no longer need to use pseudo. So just nano index, stop PHP. And just to confirm that PHP is working, we're just going to do this Control. Oh, next memory fresh. What is that? Not working? It's true. This there area I got ah, I I I forget sometimes with PHP how the info commanders written I think it's Ah PHP. I think it's just this actually. And so if I refresh yeah, okay, so there's no underscore. For some reason, I keep thinking there's an underscoring its or every time I do this, I always try once fail once and the second time I get it. So this is the output of configuration check. I guess for PHP and the server itself will give you all sorts of information about about PHP and the server and the environment. What? Not So that's ah, how to set up PHP my SQL and ah, and Apache. It's it. I don't know, like people think it's this huge thing to be able to configure a server, and really, it's that simple. You just install a few packages, start the service, and you're good to go. Um, so, yeah, In the next video, we're gonna be going over some Ah, some my SQL stuff. Advanced Apache, two configuration stuff. And ah, that's about it. So thanks for watching this. I hope you guys managed to get your own Web server set up with this video. Thanks for watching, and we'll see in the next video. 55. Linux Hosts File: Hey, guys. I wanted to take a brief moment here and touch briefly on the hosts file on Olynyk system and what that is and what it does because we're gonna be using it in the next video. And, you know, for the next few videos, we're gonna have to configure some things in our hosts file. So to put it simply and I'm not gonna get too much into networking right now is that's what we're going to be doing later on in this course. So for right now, basically, when I type in google dot com, what my computer does is first it checks. If there's any specified routes in my system that tells it where google dot com is. If not, then it goes out to the Internet and looks for stuff. So what we're gonna be doing with the hosts file is intercepting requested domains from our machine. So let's go ahead and open up terminal, and I'm gonna show you guys what I mean, So we're gonna see the into the E p. C directory here, and I'm gonna type pseudo nano hosts. So there's a host file in the E. T. C directory and we need to go in there and edit it now. I've already said this route up for the next video. It's app dot local host, and that's what we're gonna be using to deploy our meteor application. But right now I want to show you guys how this works. So the first element in the line is an I p address. That's the I. P. Address for our case. It's gonna be our local machine. And so the local I p address for this machine for any machine for your machine is gonna be 1 to 70 does euro 700.1 and that's gonna tell whatever we type in next to go to local host and then Apaches gonna pick it up from there. It's gonna do stuff with it. So I'm gonna take google dot com in here, and I'm going to save this. And now when I try to go to google dot com, it's gonna go to my Apache Default page, which is stored at fired out www dot var slash www slash html and the main file in there. Now what I could do from this point would be to configure a virtual host toe handle google dot com as its own virtual host. And in order to serve up a specified web page from my local machine, we're not going to get to that right now. We will, in a few videos from now. Now, I'm gonna remove this because I don't want Google to always be redirected to my local machine. What I'm gonna do is create ah, sub domain of local host. And so it's gonna be sub domain dot local host. I'm going to save the file here. Now, if I go to http sub domain got local host, it's also going to redirect to the main HTML directory. So this is going to be necessary for the next few videos. We are going to be redirecting certain local host addresses Ah, and submarines to our local machine. And then we're going to get Apache to intercept them and to serve up content based on that . So I hope you guys found this video informative. In the next video, we're going to be installing our meteor application 56. Deploying our Meteor App to our Apache 2 Server: Hey, guys, welcome back. So my desktop looks a bit different because I accidentally destroyed my bone to partition. Well, it wasn't an accident. I guess it was a mistake. I was reformatting partition to put something else on to it. And I didn't think that the partition I was reformatting was the one that had a bunch of what I thought about two was on a different partition. And so I completely lost the entire installation. And so I've installed Zorin OS 11 which is based on a 1 to 15.10. So it's the same version that we were using when we started, and that means that everything is gonna be the same. The only thing is, it's gonna look a bit different. So in this video, we're going to be going over how to deploy our meteor app to an Apache two server. And so the first thing we need to do is open up terminal here. So control T and then change directory into the projects directory. And then what we need to do is we need to build the meteor app. So you're gonna issue the command meteor build and then where it builds juice. This is gonna be Wonder Directory up into doapp. Alright guys. So that took a little longer than I expected. It does take a bit of time because it's compiling the entire project into ah into its final form. So what you're going to see is if you change directory up one level that we've now got to do app directory. So going to change directories again into their and we've got a resulting tired of gz file . So what we need to do is copy this to our Apache html directory. So just type c p to do dot tire dodge easy, and then where we're putting it, which is year. Now, if you change directory to there, you'll see that you've got to do Dr Jeezy it out there. So what we need to do is extract this. So you're going to run the tire command like this tar, and then the first ah parameter is going to be dashed X VF and then the file So tired. Uh, sorry to do. Don't tire dot Cheesy is going to extract it. So when you run ls again you should see a bundle directory. So we're going to go into there now. What we need to do next is to install node Js you won't be able to install from the repositories as the version that's included in the repositories is node 0.10 point 25. And the version that we actually need is 0.10 points 29 or higher. So what we're gonna do is go at a specific package. This is the girl. I will include it in the ah, in this lecture. What you're gonna do is just Ah, if you go to the PP a here, you'll see trustee, you topic vivid and wily. And we're on version wildly. So it's great out. But if you're not yet, just click. Whichever one makes sense for you according to your system, and then scroll down a bit here and click on the most recent package. It's going to take you to this page, which I was on before, and then click 64 Bit Deb package to download it. I can click. Keep, uh, you're gonna open this and it should open up the software center. We're gonna be manually installing this. I've already got it installed. And so it's not gonna let me? Well, it would let me reinstall it if I wanted Teoh. I'm not gonna do that. Basically, once it opens up, it's going to prompt you that Ah, older versions included in your systems repositories. And it's recommended that you use that version instead and only install this if you know what it is. Basically, you can just disregard that this is the package we need. So you're going to see an install button here on the right. Just click that. Let it stall. Once it's done, you can close this program here. Come back to terminal and from the bundle Director. You Actually, if you run the ls demand, this is what the structure of the directory looks like. The main dot Js file is gonna be of interest here in a few minutes, but for right now, just change directory into programs, slash server and run pseudo NPM install. And what this is going to do is it's going to reinstall no jazz fibers for our meet your application. So now the APP is ready to go, but we've got to configure a few other things 57. Setting up our MongoDB NoSQL Database: so the first thing we need to make sure is running is mongo, so just type pseudo system control. Start mongo DB, and we can confirm that it's running by going to local host at Port 27 017 and we'll get this message, and that basically means that it's working on running. So what we need to do is create our user for our database that our APP is going to use. So our application is going to use the database will create called APP. So what we need to do is connect to the mongo shell to create a user for that. So just type mongo. It's gonna take you in, and it's gonna automatically connect you to a test database. We need to be using our database type use and the name of our database, and that we're going to create our users. So to do that, type db dot create user. That's a capital. You in user open up brackets and inside that some curly brackets and then type name and in quotations your user name comma pwd, and then the password you're going to use and then rolls. And in here you need to open up square brackets and inside that some currently brackets type role and in here type read right has the value Uh, w in right is capitalized, and then I d be in the name of the D V. Eso we should look like this. Make sure your syntax is correct. It's very easy to miss commas or brackets when you're working and the bongo shell when you're ready, just hit enter and it should create user. And it should tell you that it successfully created the user for me. It gives me an error because I've already got that user created. So now we can exhibit A here and we're back into our shell. So now we need to configure Apache. Actually, first, let me ah, we need to do one more thing with Mongo, So type pseudo bano forward slash e t. C. And it's gonna be mongo db dot ceo. Enough. We've got to turn authorization or authentication on here. So just come down to this line that says off equals true and just remove the hash symbol control. Oh, to save control X to exit that we're gonna restart Mama TV. So system control you start my body. Good stuff. Now we've got to configure Apache, and this is gonna be the point of the video, I guess. Eyes, this is on advanced configuration of what you could do with with Patrick. It's not gonna be all encompassing. You may need to use, uh, some different modules or, you know, with Apache than what you need with me here. If you're deploying a meteor app, this should work flawlessly for you. But this gives you an idea of the fact that there are different modules that you can enable and disable in Apache if you need. So we need to enable three modules for Apache to handle the proxy because we're gonna be running our app on poor 58080 But we don't want users to have Teoh, you know, remember the port number and we definitely don't want the port upper visible in the URL. And so this is what we need to configure for Apache. So to do this type pseudo a to and mod proxy and then pseudo a two and mod proxy underscore html and then pseudo a two and mod proxy. Underscore, Http. Now, once you've got this done, we actually need to create the virtual host. And so what a virtual host is is. Let's say you want to run. You know six different websites in their own directories at six different domain names. So let's say you have six. Domain name is pointing to this are actually let's say you've got one domain name pointing to the server, but you want to use sub domains, which is the portion before the demand. So you could have, like app dot your domain dot com to dot your domain dot com. And here's how you had set up those. So what we need to do is go into E T. C slash patchy, too. And here you can see that we've got a sites available directory. We're gonna create a file in there, So just type pseudo nano, uh, sites available. And I'm just gonna call it app dot con 58. Setting up our Virtual Host: It has got a blank file here, and we need to create the virtual host. So I'm going to explain what I'm doing as I'm doing it. So we're going to open up the element, which is virtual host in its Campbell case. We're going to specify the port that it's listening on which by default for Apache is Port 80. That's the default port for Web traffic, and that's what you should be using. And then we close off that element. Now the first thing we're gonna do is assigned a server name, and this basically tells the virtual host What what name? It should be listening. Teoh. So it's listening on poor 80 and that we're going to tell it that this configuration is for the domain app dot local host. And then we need to type proxy requests space off, jump down a few lines. We're gonna configure the proxy, so it's kind of like HTML your opening elements and typing things in Esso. We're gonna take order, deny comma, allow no space between deny, comma and allow, and then allow from all and then the final been here. We need to actually configure the proxy and tell it what it's listening for, on which ports and then what? Not So to do this open up a location element and the location is gonna be a forward slash This means it's the route of this domain. So we should be able to access apt out local host Um and it should worked great. So we need to lines in here. The first is gonna be proxy pass. And then what? It's passing this to, which is going to be local host at Port 58080 in a forward slash that proxy past reverse, it's gonna be the exact same say and then hit control. Oh, to save We're done with this Apaches all configured to translate local host at Port 58080 to the ural app dot local host. So save it exit. So now that we have got the virtual host configured, we can actually at this site are enable. And to do that, you just type pseudo a two and site and then the name of the site. In this case, it's app because it's everything that's prefixed from the extension. So so everything before the dot com, so I'm gonna type app. So now that we've got all the modules enabled thieve virtual host configured and enabled. Now we can restart the Apache to service. So system control restart Apache two. 59. Using a Shell Script to set our Environment Variables: Now we're gonna get back over to our HTML directory. So seedy, too far www html bundle. And what we're gonna do is in order to run the media application, we need a set. Ah, few environment variables. And you can do this from terminal. You can just type export and then the name of the variable. So let's just create a variable called my var equals and then the value. So if you're using digits or characters, you don't have to put quotes. But if you're putting a string eso spaces in there, you've gotta put them in quotes. So this is variable, and I've just created that variable. And then I would be able to echo that out in the show by typing that So rather than set the variables like this, though, because the downside is that as soon as I close this terminal, all those environment variables are lost. And so if I need to restart my app say, in a week or so, I don't wanna have to re type all the variables. So what we're gonna do is create a shell script to do this for us. So type in nano and then in documents. So in my home directory and documents, I'm gonna create an if tha s h. So the first thing we need is the crunch bang. And we need to tell it what? What type of file it is. So, user, been as aged is gonna tell it to run with bash. Then we can just start creating our variables. So we need three. The 1st 1 we're going to configure is Port, and we're gonna set that to 58080 So that's the port that this meteor application will run on the next one is the root you are else. We need to set this as to what the hell is going to be that the APP is running out. So in this case, it's app dot local host and then one more We need to add a mongo u r l and this is going to be a girl using the mongo db protocol. And so the way we take that is mongo db, colon slash slash the name of the user account of Mongo DB, and then the password of that Mongo DB user account. And then we put an at symbol, so the So the 1st 2 bits of information is used name and password, and then the host name another colon. And we're going to specify the port here and then a forward slash in the name of the database, which in our case, is app and this is literally all we need. So what I'm gonna do is hit control. Oh, to save and control X. Now what you're gonna have to do. So let's say I need to restart the app in a week. I won't need to re type of those variables and the values for them. I'll just have to re run the script. So how we run the script is normally you would run a shell script by typing S h and then the location of the script. But in order for the variables that we're exporting in that script to be integrated into the environment that were working in, we're going to use the source command. So just type source and then the location of the script. And then you should be able to echo, for instance, port and it should print out the poor. And it does so what we can do at this point is run the application and we should be good to go. So to do that just type node Js space main dot Js And I'm getting an error because I might have this running and already So I'm going to kill all, uh, node, no Js actually, I'm gonna try that again. So no jazz main and no errors. So I should be able to go to the local host port 58080 And I should reach the to do app and I dio But aside from that, I should also be able to go to ap dot local host and that works as well. Now this will work. But as soon as I exit out of here, you're going to see that the APP is unavailable. And that's because when you exit out of a note jazz shell instance Basically, it stops the app. So in order to run this outside of ah of this instance of no jazz, you need to install in NPM application called Forever. So to do that type pseudo npm install Bash G and the dash G on the NPM install. Basically all it is is it tells it that we're going to globally install the following application. Normally, if I didn't include that dash G that would just install forever to the current note instance, which is our meteor application, and I wouldn't be able to use it elsewhere in the future if I needed Teoh unless I installed it there as well. So I'm going to put the dash G so that is globally installed. I can use it anywhere, and then just type four after and it's going Teoh. You know, check through the package list of NPM and it shouldn't stall it. And when it does, you should see an output like this. So now that we've got forever installed, what you can do is type forever. Start main dot Js and we get this notification here. It says it's processing the file Main job Js, which means we should be able to access the app and you'll notice that we're outside of that instance in terminal. So if I were to close this terminal completely, the APP would still function as normal. And so that was an example of how you would deploy a meteor application using Apache two and the proxy past module in Apache to in order to serve the application through Apache and do some internal translations between the ports and then the address. What not? Ah, and again, this was a look at how much more advanced Apache to get. There are some other things that will touch on right quick. So if you are, for instance, using WordPress and you want to enable, like, pretty well that the column Perma links. If you want to enable Perma links, you'll have to have, ah, moderately right module enabled. And so how you would do that is ah pseudo a to end mod rewrite, and it's now enabled. And to activate the new configuration, you just need to reload the Apache to service using system control. It's it says Service Apache to restart. But as I covered ah, few videos ago. We're using system control, and I would recommend using system control for that. So I hope you guys enjoy this video. Thanks for watching 60. Installing and Configuring phpMyAdmin: Hello, everyone. Thank you for joining me again. In this video, we're gonna be going over installing and configuring PHP my admin. So, first, what is PHP Myatt men? Well, it's easily explained as a graphical interface for interacting with my ass. 12 databases that you can access in your browser. So the way to install it. It is in the official repositories of a Bantu and should be in all about two derivatives. So just open up your terminal and type in a sudo apt get install PHP my ad men. So we're gonna set Ah, in my SQL admin password. You guys, I have had this package installed already, so you guys may get another prompt asking for a password. I would just use the same one. It's creating a configuration file there. So we're going to now at it the Apache two configuration file. And I believe that is ah, just Apache two dot con and it is Okay, so pseudo nano e t c. Actually two Apache two dot cons I didn't hear Just go to the bottom of the file and right . Include e t c slash PHP Myatt men slash Apache to duck confit and then control. Oh, to save control X to exit and then restart Apache two. I got the ah, pass around, I believe one sec. Is there a peach people? Okay, so let's ah ls ah e t c h p Myatt Men hot She con. Let's make sure I included the correct file. Uh, well, here it's very bottom. It was e t c slash PHP. My men slash Apache. I don't think it was Apache two. I think it was just Apache. Okay. I was OK. That was a problem. Uh, I included the wrong file. So once you include the correct file, restart Apache two. 61. Let's Take a Tour Around the phpMyAdmin Panel: If we open up a Web browser, we should be able to now access and log into the administrative panel. So local host each team, I admit. And it's remembering my password from a long time ago. That's actually wrong. All right. Yes. Let's update that password. So now that we're in here Ah, you guys are probably used to using this. You know, if you've used servers in the past that you see panel Ah, see, Panel used PHP my men as Thea my SQL uh, management tool? I guess so. Basically, you can create a new database here, call it my DB create. And then we could create. Let's just create a user's table and half, four rows, then, Ah, let's name the rose i d. User name, email and password. That's gonna be 55. So an integral in a is to 55. Uh, our car, I believe, is by 99 it might be more than that, actually. Generally, what I stick with the password is going to be do MD five. Even those not great. Ah, let's just go of our car. We could probably change it later. Ah, ai means auto increment and that basically means let's say I have a user. I'm not going to specify an I D. Number. It's automatically going assigned to the number one. And then the next user it creates is going to be assigned to the number two and so on and so forth. So we don't need to specify Ah, you know, I d numbers for each one. They will automatically be assigned. And I mean, this is straight run of the mill PHP my admin stuff. I'm not doing a tutorial so much into that because that's Ah, I don't think it's necessary enough. But I will give you guys heads up on a few things so you can browse tables through here. You can create a new table in the table. You're automatically gonna be put to this, uh, and you just get click over to structure to see the current columns toe add or delete columns. Ah, let me. You can either use the SQL and you can like, uh, write your own like insert into users. And they even have these ah, helpers down here for you. You can search through the database. I've never done this. I've actually found with BHP my admin that search functionality is limited. And so I What was it called? Admit er there's another one. That's Ah, that's really good. A search, but not so created Everything that PHP my men is Ah, you could just go to insert years and I'll show you I'm gonna leave this blank. I'm gonna insert a user and then a password. I should be able to turn this into empty five in here. Go. If you go to browse, here's recon. Ashley browsed the tables data. So right now, we've got one entry and you'll see the I. D. Was automatically assigned is warm. You can export your database. So if you're switching hosts or servers, let's say you would need to export your database. You congee Just do this. Go. It's gonna download the actually, that just downloaded the table. If you go to the database, go to export. Its gonna, uh, export the entire databases and SQL format or, ah see, SV pdf. You know all these options here. Ah, and to import the data base, you would just make sure you're on your database or table. If you just wanted to insert a table and then you just browse for the file and it is pretty straightforward. You convey. Drop the table. You can rename it. You can copy it. Uh, it's pretty much just all standard stuff. So that's how to get set up with PHP, my man. Using an Apache Web server on a bun to Thanks for watching. I hope you guys enjoyed this video. 62. Creating a Basic Virtual Host: So let's create a virtual host and going to explain this as I do it in the previous video, when we deployed our meteor application, we created a virtual host for it. And so this is kind of follow up to show you how ah, basic virtual host configuration with look, because with the meteor virtual host, we had to omit certain information that would normally be in a static websites virtual host . And we had to add stuff in. So let's go ahead and get to creating a virtual host. So I'm gonna open up terminal here. I'm gonna change directory first into my HTML directory, and I'm going to create a new directory called Site One and another one called site, too. And if I list the directories, we now see that I have a site one in sight to and eat in each one of these. I'm gonna put in html file. So Nano, let's go site one index dot html And in here, I'm just going to type. This is our first site located at site one whoa dot local host control. Oh, and control accent. I'm going to do the same thing in the sight to directory, and I'm just gonna close that and we're not going to use any ah html markup or anything. This is just gonna be to show you guys how it's gonna work. So let's go over to our Apaches directory. So that's in the E t c directory Apache two. And I'm gonna create two files in here in the sites Available directory. And so the 1st 1 I'm gonna create is so it's available site one dot com. And so what we need to do is open up virtual host and I missed the capital V so virtual host at any web address on Port 80 this is gonna listen, Thio Thio, try and find our site here so the first thing we need is a server name, and this is going to act as, uh, the U R l there the domain. So if I was gonna point example dot com to this server to the i p address of the server and then once a request, say if I go into a browser and go to example dot com, what happens would be that the request reaches the server and then it parses all these enabled websites to get further information about where the site is stored. And even, you know, if you're using modules for you can do that in virtual hosts. Well, for right now is just going to be site one dot local host. And then we said a document root. And this is a nab salute file path into our documents roots. So in this case, it's in our HTML directory, and it's at, ah subdirectory called site one, and I'm gonna control Oh, to save this control. Actually, all I gotta do this a pseudo uh so well, that previous command with administrative privileges, I'm gonna write it out again. So virtual host at any web address on Port 80 But then we have to close it. The 1st 1 is server name. That's going to tell it basically the name of the site where the domain or sub domain it's located at or the sub domain we wanted use for it. And then the document root is where the files are located. And then I could just control oh, and control Lex. And then I'm gonna do the same thing for, uh, site to so pseudo nano sates available and say to dot com. So as you can see, it's all the same. The only difference is gonna be that we're gonna reference site, too, in both the server name and the document root. It's gonna be at fired. I need W html site, too. So I'm gonna save this and exit, and we actually need to go into the hosts file to create that internal route to come to local host. And so what we need to do is run pseudo nano hosts and that is in the E t C directory. But I'm in the Apache directory, So pseudo nano one directory up in a file called hosts. So you'll see the app dot local host, which we created in the last video. And this is gonna be site one don't local host and say to dot local host. And so the hosts file on Olynyk system is basically just a way to create your own records of redirection and whatnot. You know, different hosts to resolve by different, uh, domains or you are else. So I'm gonna save this and exit, and I'm going to start the Apache service. Actually, what I've got to do is ah you know, eh? Two n site. We've got to enable the site and then we need to restart the service. So system control, restart Apache two. If I open up a Web browser, we should be able to see the difference routes actually in effect. So it's good. Http. Site one dot local host. It says this is our first site located at site one. If I change this to site to not local host, you'll see that it's the second virtual host site. And so if I were to go into we're Stott Fire W w e html. Here, you'll see what we've got going on. And so you can have is many websites in here as your disk space permits and you conserve up each at its own domain name. So that was a brief video about what a virtual host is and does. I hope you guys found it informative 63. Setting up a WordPress Installation on top of our Apache 2 Environment: So now what we're gonna do is set up a WordPress installation on top of our Apache two environment. And so the first thing that we're gonna need to do is actually go grab the WordPress Zip file from wordpress dot org's. And then we can extract the and putting into our HTML directory. So it's got a wordpress dot org's and click download WordPress. You might have a different version here if if you're watching this, you know, off in the future somewhere, Once it's complete, just open up your file manager and it should have gone to downloads Just right. Click it's and, uh, extract here. And when we go in here, we want to make sure that we're copying all these files and actually the directory containing all these files. So I'm gonna copy this directory here that it just created, and I'm going to go to computer my Vier directory, w w w html and I'm gonna drop it right here. Now we need to create a virtual host for the WordPress directory. So let's open up terminal and let's go into our Apache two directory states available now. First thing I'm gonna do is enable a module so that the WordPress installation will be able to use pretty URLs or Perma links. So we need to enable moderate right? And how we do that is through suit does Earth through Apaches a two and mod command so pseudo a two and mod rewrite. I've already got enabled, but you guys should see a confirmation there. So now let's create our virtual host for our WordPress installation. So, uh, pseudo nano wordpress dot com. As always, we open up the virtual host and we close it down here. Now we need to give it a server name. And so we're just gonna use wordpress dot local host bull co host and most of Apache is Camel case, by the way. So there's capital letter at the beginning of each word in a directive. And so server name right here. That's a directive. Think of it like in programming. If you set a variable that essentially was going on here except it's not called a variable . It's called Directive. So the next thing we need to do is set the document root. This should look exactly the same as it did in the last video. We're just gonna pointed to a different directory, and now we actually need to configure, uh, something's so open up a directory element and just put a forward slash here. So we're gonna configure the root directory first, and we're gonna put options, Fuck, follow sim links and then allow override all. And then we need to configure the directory of a WordPress installation. So directory of our www html weren't for us that closed that directory on it down here. And so we're going, Teoh, allow it. Follow siblings were going allow it to override you RL's and we're gonna basically order allowing deny. And so I'm not gonna go over too much what all of this does. But this is the basic configuration for mod rewrite in virtual host. So options indexes follow sim links, and we're actually also gonna add an option for multi views as well. Down here, we're gonna tape, allow override all and then order, allow comma, deny and finally allow from all. So this is going to make sure that ht access files work in the rewriting and we'll have a look at custom ht access rewriting here in the next few video somewhere so Let's save this and then exit Nelson able to cite pseudo a two and site or in press. Now we restart. Apache system Control failed. Let's have a look at why would fail so system control status. Apache two dot service. We must have got something wrong. Command options. Interesting. I see. Oh, I think that was the only issue there. It's try restarting again and we're good to go. So let's go at it. Our hosts file so pseudo nano hosts, we're gonna create another redirection here internally to our system is going to be wordpress dot local host, save and exit and then we should be able to go to wordpress dot local host and start setting up the server. 64. Before Using WordPress we need to Setup our Database: now. Actually, we're gonna have to create the database first. So let's go to local host slash PHP Myatt men. And just long in here with the same information that you created in one of the previous videos there about PHP my admit and just hit new. We're gonna create a new database. I'm gonna call it WP one create. That's all we needed doing here. So on the WordPress installation, just go through it graphically, and I'm gonna show you how to do it manually in a moment. So the database name, It's WP one user name. This is going to be the, uh, the information for the my SQL user that we created when we set up by SQL. So this case, it's route, uh, and the my SQL password. What? Zach actually used a password here that that I used for some other things. So I'm gonna mask that here by using the password type submit Can't create the WP config file s so I'm gonna have to create it manually on After that, we can run the install, so just come back here to the TML directory and in here there should be WP config sample basically, we'll look at that the second for right now. I'm going to create uh, w p dash fic dot PHP, but open this with text editor. Pace that. And here it save. Get out of there. Now. We should be good to run the install. So this site title is going to be next new site. User name. Let's create a user name here. Password. I'm gonna copy this because not gonna put it in when we log in and my email it's gonna take a few moments to dio, but it should return with success message in just a moment. There we go. I'm gonna save that password. Actually, let's go log in. And as you can see, we've got a fully functioning WordPress site installed on our Apache server. It's really that easy. If I goto Hello world here, you're going to see this really ugly. You are out. So let's take care of that. So how we're going to do that is by actually going into the dashboard and in settings, there's a Perma links setting page Click on that and here you can choose different structures for the girls. And so this one right here the post name That's the prettiest. And so that's what we're gonna use. So let's save those changes and actually the, ah, our HT axis. So this directory isn't rideable by the server. And that's because we have the server running under the user Apache two instead of under our user, and then the files in here in the directories in our, uh, html directory is owned by our user. And so what we're gonna have to do is change the user that Apache is running out to match our user, and then everything will be fine. The Web server will be able to read, write all these files or not. But for right now, it doesn't. And so what we're gonna do is create a new document. We're gonna call it dot h t access that we're going to open it with the text editor. And what you need to do is basically copy this over here, and something that I noticed actually is that this won't work this way. I'm going to save this, save it. I'm gonna save this right here. And if we refresh, it's actually gonna work. All right, let me have a look here. that's open. Right? Uh, okay. So it will work, actually. Good stuff. It was giving me a server error before, but, uh, basically this line right here at this rewrite rule, I had to remove it, and then everything works. So if you guys have problems, try removing that third line that says, Ah, rewrite rule index PHP. Try removing that, and everything should work. Fine. But we've now got a full WordPress sites set up with Perma links enabled. And from here, I mean, you can just go on, you know, create your own pages, posts and stuff like that. From this point forward, this is basically just all WordPress. So, uh, that's awesome. I hope you guys enjoy this video and found it informative. And we're gonna be going over more Apache stuff in the next video. 65. Python Installation and Command Line Interface: Hey, guys. Sorry if I sound a bit off for the next few videos, but what we're gonna do in the next few videos is Python. And so we're going to start with the basic installation and how to check your version and a few basic things about Python like Thea the command line interface Idol. So on a bun to 15.10 at the derivatives of that about two system, you're gonna have python 3.4, pre installed and python 2.7 point nine. And so there's too active versions in development by the python guys. And basically, if you're gonna be developing a new program, I usually recommend using python three if you want something. If you If you're jumping into an existing project that's using python to you would need python to Now the changes between the two are very winnable, but they are code breaking, so you can't just ah, run a python to application using Python three. It won't work. So what we're gonna be doing is actually using Python to, and that's because we need to use a few modules and we're gonna circle back to Apache because we're gonna be deploying Python application through Apache and make it accessible to the Web. So first thing, let's check what version we have. Pi thought so. It's 2.7 point now. The first thing that we need to do is install the python. It's it's called Pip. I don't recall what it It's back for abbreviation, but it's basically pythons own package manager. And so to install that type sudo apt, get install Python dash pip. This will install Pip to your system. Now, if you're gonna be using Python three, you're gonna need Python three Dash Pip. And instead of running Pip as a command, you would run pick three. But for now, we're working with Python to so gonna install this. I believe it's already installed up by system. It is all right, s so you guys should be able to install it this way. And once it's installed, we can actually use it to install python modules. Ah, and we'll get to that the next video now something. I want Teoh cover very briefly. Here is the python interpreter. So python is interpreted. Language were like C and C plus plus are compiled languages and so they're different you wouldn't typically compile python application so you could actually use a real time CLI crowd line interface program called Idle just by typing python in the ah, in the terminal. And here, for instance, Weekend set. I was starting to type javascript there. So to set of variable Inp, I thought you just take the day with a variable. So I'm going Teoh, Call it age That equals 20 uh, 300. Now, if I print age, it's gonna print that number and you could see this Israel time, so that's awesome. Now, if you it controls Ed, it will exit. Uh, if you want to use a different version of the Python interpreter, you can't first, this type I thought three on it will use the most recent version of pie thought. Three. You can also type that If you have that stalled that specific version, you can Ah, you could, uh, you know, run that interpreter. So that's then used different versions in the terminal. And that's basically it for this video pilots already pre installed. So you're good to go The next video, we're gonna be covering bah, jewels and a few other things 66. Python's Practical Applications: so I wanted to take time to talk about how truly powerful Python is and why it's so powerful. So a lot of what I see. When people learn python, they'll get a handle on the syntax of the internal functions and the way to use Python. And they're kind of wondering like, Well, how is this practical like, What can I do? Or, you know, they're basically missing modules. And so modules are the way that python has been extended to be such a great environment to program it. So we're gonna be looking at one specific extension or module and python. We're going to install it and we're going Teoh, start using it. So what we're gonna do in the next video, we're going to deploy our python application through Apache. So we're gonna be using python module called Ah, Web Pie. And what Web Pie does is basically just allows us to use python Teoh serve a web page. So what we're going to do first is install the module, so type pseudo pip stall web dot pie. Now I've heard it got it installed. You guys should see a little doubt load progress bar and it should well return with a success message. And once it does, you can start using web dot pie. So I'm gonna actually open up g at it right now, but we're going to start using it. And I'm just gonna set a basic example of ah, this web dot pie. So let's Ah, first crunch bag user bid python. Now, here's how to import modules itp. I thought you just tape import, but we're gonna import web. We're gonna set variable called you RL's and, uh so we actually have to do something first by thought requires four space deputation on G ETA is automatically set up by default to do eight species. Change that to four better here. Now, here. We're gonna define routes. So the root is going to reference a class called, uh, why class, That's it. And we're gonna create that class. So class my class and in the in the class, basically what returns The html is the Bethan. Get so you're on death, get pass itself. And right now, let's just return h one. Hello, world. It's what now? At the bottom here. Outside of that class, we're actually going. Teoh set the application variable equal toe Web app. So application equals Web the application and we're going to its stan. She ate this year s o The first parameter is you RL's It's gonna take our routes up there. Uh, that global's that's it, actually, and that ws g I slunk. That's it. So let's save And I'm going to save this into our HTML directory, actually, So you are We w w html gonna create a new directory here. I'm going to call it Python. And in here I'm gonna call this file main dot pie. So if we had multiple classes that we wanted Teoh return multiple routes, Basically, what I would do is, uh, about second class like that, and I could define my second class here at I would basically just define that get method the exact same way pass itself, then return html string. And I mean, you could even load up html template files from files here and, you know, injects variables to the templates html file and then returned that as a string. And that's a more practical application. Uh, but we're not gonna get that. It adapts into it gonna save this year, and that's all we need to do. So in the next video, we're gonna be stalling an Apache module in order to serve this up through Apache, and we'll configure a virtual host for it. So thanks for watching this. I hope you guys like 67. Adding and Removing Users Through the Graphical User Interface: you guys welcome back, eso. We're all done the development stuff now, and we're moving onto some more basic clinic stuff, and I think basic because this current module is all about users, and so it's all pretty simple stuff. But it is, uh, the reason we decided to do the development stuff in the other stuff before the user stuff is because this is less used. It's less commonly used, so I don't think it's as important as the other stuff. However, it's still important. So let's go ahead. We're going to do this both graphically and through command line. First, let's do it graphically so we can get that out of the way and then get to the fun stuff. So open up system settings. I realized that my desktop environment is now different from the one that we started on. So if you're still on unity, just open up Dash type system settings or just settings should find it. If you are on genome or any other desktop that uses a, uh, full screen launcher with a search, it's gonna be the same. If you're using a menu, you would usually find this by going in the system tools on there should be a system settings right there. Now, this system settings application, it should look the same on, uh, a lot of different desktop environments that that used gnome components. And so as far as I'm aware, there's most desktop environments actually used genome components, including gvk and stuff. So if you're using a g t k desktop environment, this is probably gonna all of the same. If you using Katie your Katie based desktop environments, it's gonna look vastly different. Either way, you should have a user accounts item in here. So you're just gonna click on that? And now we've got ah, no access in here. We can't do anything right now because we didn't launch this application as pseudo or root . And so we have no authorization over this program to do system level stuff. So we need to unlock its and just click unlock and then enter your Lennox password here and now these buttons become enabled. So hit the plus symbol and you're gonna create an account. Standard is basically a standard user account that doesn't have access to pseudo. An administrator would be an account that does have access to pseudo, We're going to get to that more in a moment. First, we're just gonna create a right clear user account. Gonna give it a name and I'm just gonna do this. It's gonna create the account. We're good to go now. We could log out to the log in manager or the display manager and log in as this user where we could go into command line and switch user to this user and that new stuff if we wanted Teoh. I'm not going to for the sake of this video so we can get out of the G A Y stuff as's quickly as possible, we're gonna just learn how to delete user accounts. So just highlighted in the list on the left and then hit the minus button here, you're gonna get a prompt. It's gonna ask you if you want to delete files or keep files. If you choose to delete files, this user's home directory is gonna be removed. If you decide to keep files, is just gonna leave it. So I'm gonna delete the files here because I don't need them, and then I'm also gonna delete this user account here. So that's all there is to it. Um, let's get out of here on learn how to do this in terminal 68. Adding New Users Through Terminal: So go ahead and bring up your terminal. And in here we need Teoh. Use a program or command called add user. And so we need to run this as root. So type pseudo add user, then the user name of the account you want to create. So I'm just gonna create a to But in your pseudo password No, it's gonna add the user. It's gonna add ah, group for the user. And then it's also going to add the user to a group and, uh, you know, all this other stuff, and then we need to set a password for this new account. So just go ahead and type of password and you can also add additional information about the account if you want to. If you don't want to just enter through all these and then hit, why on enter? And now we've got a new user account, so let's ah, switch over to that accountant. Have Look, so type s you Nick, too. We enter the new accounts password, and now you can see what user were using, uh, in terminal at the prompt. So it's going to see your user name at computer name and also after here for in any directory. It's gonna tell us what directory where we're still in the Nick Jermaine directory because that's our main user account where we're coming from. That's the directory that we were last in. So if I type pseudo nano uh, text file, it's already added me to the pseudo, uh, group. So we don't even have to worry about that. Actually, it hasn't. Okay, I was singing. That's a bit weird because it shouldn't have been prompted for the password, so I assumed it did. So this is actually exactly what we wanted to see. We're gonna figure out how to get Nick to into the pseudo er's file, so let's go ahead and switch back over to our main account. So this enter your password and then we're back in this account in order to add Nick to the Sioux Doors file. It's really simple. Just type pseudo add user Nick to pseudo. So basically this command is the same as when we went to create the user. Except there's one difference. There's now 1/4 parameter in the entire command so pseudo let's mark that off. We know what that does. Add users the program were using. And then there's two additional parameters. Now. If there's only one, it's gonna assume that you're actually adding a user. That's all you're doing. If there's two parameters, what it's gonna do is it's going to add the first parameter to the 2nd 1 as if it was adding user to a group. So that's exactly what this is going to do. This is gonna add the Knick to user to the pseudo group that it can use pseudo. So just hit. Enter here and, uh and we're done. So now we can switch back over to that account and to demonstrate the pseudo privileges it actually already gave us. Ah, new message here, longing and as pseudo for the first time. So let's go ahead and use that command. Just make sure everything is working so soon. Oh, uh, touch, uh, text file. It's stuff. Now, if we list the directory, we've got a text file there. So now we can sudo RM text file analysis. Jen, we're good to go. So, uh, that's how to add users to the account in the next video. Actually, we're going to learn how to delete users. It's probably gonna be a really short video, So thank you guys for watching 69. How to Delete Users Through Terminal: Hey, guys, Welcome back In the last video, we learned how to graphically add and delete users. And in terminal, we learned how to add users and add users to group. So we're gonna bring that full circle at this point, and we're gonna learn how to delete users from terminal. So go ahead and open up terminal. And I've got a user created called Nick, too on that's the account that I'm going to delete. So let's go ahead and run this command pseudo del user and then the user name and that's it on. And now you know, if you see this message here, removing User Group has no more members than done. That's exactly what we want to see. So if I went ahead and tried to switch into that account, it's been deleted. So that's all to this video. Thanks for watching. And in the next video, we're going to be doing some or fun terminal stuff 70. How to Change an Existing User's Password: you guys. In the last video, we took care of deleting users. And now we're actually gonna move on Teoh how to change a users password once the user exists. So it's pretty self explanatory. How'd you do that through? Ah, gooey. And so we're going to focus on terminal here is very simple. We're about to learn a new command, so go ahead and type pseudo past W d and then the user name of the account. You want to change the password, too? Now you'll get a prompt. You can go ahead and add a new password, and that's literally all there is to it. This is how you would change a password for any user account, and it's really simple. So thanks for watching this video. 71. Adding Users to a Group: Hey, guys, Welcome back in this video we're going to learn how Teoh create new groups and why we would do that. So, for a moment before we do this, we're gonna talk about file permissions again, and this is something we covered very early on, but it actually is relevant now. So I'm gonna create a file here called Text and, uh and if I actually I'm going to make directory here cold group stuff and then move text and to group stuff and then changing the group stuff just keep things a bit organized here that I'm going to list the directories. Here, you'll see three, um, three fields here. Basically, it's read, write, read, write, read. And what this means is, uh, owner group and everyone else. So I am actually gonna play around with Thea the user account that I created a few videos ago. And so what we're gonna do is we're going to add that user to ah specific group. So right now this is owned by the user mixture main. So this becomes relevant to this section. The group here becomes relevant to this section, so I'm actually going Teoh change ownership of just the group here of this file. So I'm going to, uh, shown eso actually need to create the group first. Good stuff. So now we're going to create the group. And how you do this is type pseudo group add t t That's gonna be the name of the group for whatever reason. And now we can run Chone Jermaine T t on this file. Uh, let's run. You know I'm buying. There we go. So now it's owned by my current user account as well as the group which has read write access. So now if we add our second user account to that group and then log in is that second user and attempt to edit the file, we should be able to because we should have read write access. So, in order to add a user to a group we already learned that, actually. So let's go ahead and pseudo add user Nick three teeth. And now, if I change user to Nick three Ah, I should be able to edit that file without problems without using pseudo. I'm going to control oh, to save exit. And, uh so that's why well, that's, you know, a really fundamental reason why groups are used and it may be relevant to you and may not entirely be, but it's still good to know how the system works out with permissions. So I hope this actually, you know, made more sense of the permissions from the previous videos. I tried to explain that the best I could then and maybe seeing this will help you guys understand that if you didn't quite get it at that point. So, uh, that's all for this video. Thanks for watching. 72. Introduction to Networking: Hey, guys, welcome back. So we're all done with the user accounts and groups and stuff, and we're gonna move on to networking. Now, Networking is a big topic in and of itself, and so there's no humanly way possible I'd be able to teach you everything. There is snow about networking on I don't plan to. What I plan to do is give you guys the most essential and necessary, you know, information about networking, and then you guys can take that if you want, you know, further develop it. But this should be a starting point for you. It should help you understand what's actually happening on a network. Even what network is so for people new to, uh, I guess computers and technology and maybe not new. But maybe you've used the Internet before, and you just haven't thought about you know what's actually happening. And that's how I was for a long time. Actually, I I had worked with an Internet service provider, and before I worked there, I just thought, you know, the Internet was magic that, you know, I opened up a Web browser and type in, you know, a series of letters you know, separated by a few dots and that somehow, magically, I didn't really care how it happened. At that point, it went out and found a page, you know, magically brought it to my computer. And so if that's the kind of understanding you guys have at this point, this is gonna be some really great information for you guys to take and really absorb. 73. How Does the Internet Work?: in this video, we're not gonna be doing anything or not gonna be learning about networking specifically on Lennox. We need to understand a few general concepts before we get to that. So this video is going to be a sort of introduction to networking on Lenox on Introduction to Networking in general. So right now you are on a computerized device watching this video, which is on the Internet and the way that's happening. Eyes Basically, you're connected to a router or modem router all in one device, and the router is connected to your Internet service provider, and your Internet service provider has devices that are connected to the bigger world of the Internet. So, uh, you send a request if you open up a browser and type in google dot com and then hit Enter your Web browser sentences that as a request, it's basically saying, OK, this is the Web page that this computer wants to look at right now, it said, Is that through your router, which sends it to your Internet service provider and your Internet service provider has all these fancy computers that that properly route certain requests to ah DNS servers. Any request, actually, And what a DNS server does is it says okay, you gave me this string of taxed Ah, domain name or you are l and I have a record here that shows this domain or string of text is supposed to serve up the content at this I p address. And so how the Internet works is it doesn't understand google dot com or facebook dot com on the Internet uses network address is right. And so think of it like each web server. Each server out there hasn't address. Just like every house on your street has an address. So if you were gonna send somebody down the street to Joe's Place, you would say, OK, well, go to this address, then you would give them the address of Joe's, please, and they would be able to find it right. The same thing is happening on a DNS server. You give the DNS server at domain name that that you want to look at and then the DNS server takes that says Ok, well, I know this domain name is supposed to route to this. I p address you request request. You need to go over to this server to get that contact. And so you requests, then gets translated to an I P address and other information, and it gets sent to the Web server that is supposed to be at and then the Web server running Apache or anything Really Engine accer. I'm sure there's tons out there that I don't know about. But, ah, the Web server receives your request. It receives all of the information related to it. So cookies, you know, session variable stuff like that, as well as the exact item you want to look at. So if you go to website dot com slash something slash something else, everything after the dot com slash is called a u R I. And that indicates what piece of content on the server you want. So think of the first part domaine dot com as what server you need to be communicating with . And then afterwards, you know, slash about dot PHP or something that's gonna tell the server once against the request, what page it needs to send you. And then it does. It's, you know, rendering process, and it sends you that page in ah, in the exact same route that your request took to get there. So it's like when you send your friend down the street to Joe's Place toe pick up, uh, a box of pizza. And so your friend walks down the street. He turns, laughed. You know, maybe he turns right. He gets to Joe's place. He walks in, says, Hey, I need to get a pizza. Joe gives him the pizza that he walks the same way back to your house and before you know it went, Page has loaded with in your computer box, and that's how that happens. I hope you guys understood that in the next video, we're actually gonna cover a few more concepts before we can dive into really understanding to the point that we can use applications to do certain things in regards to networking. So I hope you guys found that formative if you didn't. If there's any point in this video that you felt lost or confused, or even that I was just rambling or even if you just want to tell me, you know a few more Web server applications aside from Apache, there's a comments section inside of this video, and you just leave a comment. I will reply. I'll get you whatever information you need, and hopefully this will make sense to you 74. What is a Local Area Network?: So in the last video we described how the Internet works. What the Internet is is technically on interconnected collection of networks. So all these little networks all over the world can now be connected to other networks in the world. And so we have the Internet, which is just that, so to understand the network. And here we're bringing it down from, you know, the top level stuff down to a more localized thing. And so a local network is the type of network that you have set up in your house where you connect to the router, the router than you know, can interact with the Internet for you and then return the information to your computer. Now, I wanted to talk for a moment about IP addresses and the current issues that face them while still using IPTV four. So let's go ahead and open up a document here, so I p address looks like this. This is an I p. Address of a server somewhere. Probably if you put this in your let's actually try that. It was just a random one that I just rode out. If you what happens, this is probably the address of somebody somebody, you know, somebody eyes connected to an Internet service provider and they get one i p address for all their computers. And the reason why that happens is because of these I p addresses can go from from they can go from one not 1.1 dot one all the way to 2 55 like that. So, as you can imagine, the range here is pretty big, but its not quite big enough for the human population. And so we've been running out of I P addresses for the last 15 or 20 years on multiple solutions have been brought into the equation to try and solve this problem. One of them was called a gnat on what this is is a network address. Basically, you have one router. You have one I p. Address. So the i p address you have, let's say, is this one up here at the top? This is your I P address that the Internet service provider has given you without the use of a router, you can plug one device into the modem and your computer will use this I p address in requests. So, basically, when you send a request to google dot com to load a page or to load a search. What happens is your I p address gets sent to Google is well so that Google can return this data to your device. But what happens when you only have one I, p address and seven computers connected. That's when the Nat comes into place. So this I p address now is the i. P address of your modem or router, and it assigns not addresses to all the devices on your network. So let's say you just have to devices on the network. The 1st 1 actually the I p address of your actual router is likely this. I've seen one instance where a network did not use this i p address as it's ah routers. I p address. Okay, the I P addresses that your router will assign to computers in your home. All begin with 192 So basically it would be something like that, right? That would be the I P. Address. Actually, hold up a sec. I got this wrong. This is the I P. Address of your outer. This is the I. P address of your first computer, so it always begins with 192.168 Your second computer might be this and your third computer might be this. So now you have three. I p addresses three devices on your network, and your router here is keeping track of them. So from this device, I typed google dot com into the address bar. What happens is this I p address along with the request gets sent to my router. The router then sends the request off to the I S P and then over the Internet stuff with the i p address of the router, which internally, is this? And externally, this is our I S P I P address they gave us. So what happens? This consent to google dot com google dot com sends the page back to this I p address connected to the router here. The router than takes that request and connects it with the device that requested it. And then it sends it back to that device, right? And so that's how ah router interfaces between a local network and the Internet. So, in the olden days before the not address and routers really took off, each one of these computers would have had a different i p address. So it would have looked something like this, right? And so on. So that would have been three actual I p addresses when we found a way that you actually only need one. I p address her network. And so that's what a router does. And so these i p addresses are local, and you're gonna see these in terminal now, one other special i p address is 1 to 7.0 dot 0.1 on every computer. This means this computer, it's basically a self identifying I p address. If I were to type this into my browser, I would see my local host where if you put this into your browser, you with your local host 192.1 uh, you know that I p address basically works the same. What? So if I were to go to 192.168 dot 0.3, it would try to find a computer only on my network that has this address and then connect to it. So that's how a router works. And in the next video, we're going to be getting into ah into the if config on windows, you have an I p. Can fake command on Lenox here. You've got have confession. We're gonna cover that in the next video and a few other commands as well. So thank you guys. So much for watching. And I'll see you guys soon. 75. Practical Networking Commands: the guys. Welcome back in this video, we're going to get to some practical networking things, and this is all in terminal. And so the first thing we're gonna do is bring up terminal. And first I want to talk about the ping command and what this means and what it does. So you can ping an I p address or ah, domain name to see if you can get a successful response from it. This is a great way. Ah, let's say you're using a web. This is just an example. If you're using a Web browser and you're trying to troubleshoot if the Web browsers and working or if your entire Internet connection isn't working, you might drop down here to command line and run a ping command on a known host That, you know, is always gonna be up for instance, google dot com. And so that's exactly what we're gonna dio s. So I'm just gonna take in the command ping and then the address of what I want a ping and I'm getting a response and it tells us what Ah, what length of time each response is taking to return to us on so Yeah. I mean, that's It also shows other stuff, like the exact I p address, the Thea, the server that it's reaching and that good stuff. And this is gonna just go until you close it. So just control, see toe exit, and then it gives you a breakdown of what happened. So you could let this run for a while to see if you're getting any packet loss through your network card. And so that's what pinging does. So I'm gonna clear this up here. We're gonna talk about command I f can fake. So on Windows in command line, you have a command called I p config, and it spits out a whole bunch of information about your network configuration in Lennix. It's I f config unit does the same thing. So I'm just gonna make this a bit bigger here, and I'm gonna run that command again. All right, so this is going to link our addresses. Here are our network interfaces and also any i p addresses that it has and whatnot. So the 1st 1 is gonna be an Ethernet, which I don't have plugged in right now, and so it's going to be basically uh, not working. This is the name of that interface. This is our local Luke back. So this, like of virtual interface that runs that Ah, it has our local host address here, and it basically controls that. And then down here, we have our wireless Ethernet. Ah, which we can see. This is working as I've got received bytes. Um, so Iraq's basically means what you've received. TX basically means what you've transferred out. So that's how to read that. Ah, there's an I p sixth address right here and ah, my I p address. Sir, this is gonna be my not address. And, ah, it gives I bees and stuff of the network interface device. And so that's basically how to use I f config. Sometimes this might be useful to see if you, you know, you're getting ah, valid I p address from the router to see, you know, if it's actually working at all, which you can see here, mine is it's clear this and what we're going to go over now is a command called TCP dump. It's a really powerful command line packet sniffer eso it can analyze the packets that are , you know, going into now off your computer or your network. So first thing we need to do is install it if we don't already have it installed. Sudo apt, get install TCP dump. It's probably already installed, but just in case, make sure. And it is it's the newest version. So this is a big command line tool, and I was going to do more stuff in the video, but I think we're gonna cut it off after this command. So, uh, what we're gonna do is basically just run the command TCP dump. We don't have permission capture on that device. So we're going to run pseudo TCP don't. And this is capturing all packets that are coming in and out of my ah, my computer. And this is just gonna run until you cancel. So I'm just gonna cancel here now, As you can see, that was ah, pretty big output. And so what we can do is we can Onley capture a certain amount. So what we're gonna dio Is that so? What? How we do that is basically using the TCP dump command with a sea of capture 10. And that's good. All right, I've got a running a pseudo speed down dash C tense. This is gonna capture 10 packets and that's all it's gonna dio. 76. Practical Networking Commands Continued: right now, it's not capturing any. Let's go ahead and do some updates. Sledges captured 10 of the packets from my machine. Ah, that that was essentially coming into my machine. And so we can analyze them a bit. We can see where they're going to and where they're coming from, and so we can see here. Basically, eso The first column is a time stamp right over here. We've got the I p address that were sending from. So this is our machine here, as you recall. And it's sending this packet out to our router, which basically ends up here at this domain. And so that's how to use Ah, you know, TCP dump. Very, very minimally. There are some other options that we can go through a swell for this command so you can print the captured packets asking. So let's go ahead and do that TCP dump Gonna run, See? 10. We're just gonna capture islets Copter five and then we run. Ah, dash Capital A And this is gonna print out the actual packets and asking eso you can use this if you're trying to see you know what exactly you're getting and this just all looks like gibberish to me, but it's the packets that are actually coming through. So that's that's a neat way to use this command. So So, basically, if you only want to listen on one network interface, I'm gonna run. I have config again and we can see W l 01 is the name of this device. So what I'm gonna do is run TCP dump a pseudo the capture of five, and we're gonna use Dash I W l 01 And what that dash I does tells it to listen to a very specific interface that we define after that bash. I now, in addition to displaying the packets in asking format, we can also display them in hacks and asking. So this may make sense for you if you're looking for some hex hex response from these packets that are coming in and out. So what we're gonna do is run pseudo TCP dump dash capital X X stash I w l 01 this is gonna print out. I didn't use the C flag, so I'm just gonna cancel their. So this is gonna print out packets in hex and asking for Matt. Someone clear this year. One other anything is You can capture packets from specific ports, and so let's go ahead and do that. So let's run pseudo TCP dump. And I'm gonna show you guys why that's gonna make sense here in a moment, Dash, I w l 01 This is the name of my interface. And then porch 22. Now, right now, I don't think I have any port 20 two's going on here, And that's because port 22 is an ssh port eso. What I'm going to do is I'm going to connect to my server via ssh! We're going to see packet activity here, so she's gonna connect. And well, here we see a bunch packets happening. And each time you do something, you can see exactly what's happening here. You'd be able to parse through these, um, and, you know, basically see that there is activity. What kind of activity? And, ah, you know where it's happening between. So so that is a bit about the TCP dump command. This is gonna be good with troubleshooting network activity. There's not really many other uses that I can think for this, but if you ah have any uses for this that I don't know about. Leave a comment. I would like to know how you guys use this command if you do, or any any practical applications that you think this command would serve. 77. Using netstat to Track Detailed Network Statistics: Hey, guys, Welcome back. So last video, we looked at a way to really track packets and the packets that are actually being sent to and from this machine individually as packets, and that we're going to talk about a command called Net Stat, which is an abbreviated term for network statistics. So basically, the command that we're gonna be using throughout this video is Net stat and based on the flags that we pass, it is going to return difference statistics. So if I put ah Net stat dash and are the n option makes net stat front addresses as dots Ah , you know, dotted I p addresses rather than symbolic host network names. So this is going to make sense if you want to see the actual I P addresses rather than the domains that are connected to the machine. And so this is what I've got right now. It basically gives us the information that we're looking for regarding the i p. A routing table. And so the our flag in that command that I just put basically states that we're looking for the Colonel I p routing table and that basically shows what certain things are routed Teoh . So let's actually display in a network interface statistics themselves. And we're going to do that with the dash I command. So we're gonna take net stat Dash I and this shows us the usage of each of our devices and so we can see the local host here, which was configured Ah has sent this money packets right here. Ah, and it's received this money packets, uh, as as compared to our wireless interface, which so far has received that many. Ah, and actually, this is bites, not packets. Ah, and this money. So you can kind of see how this would be useful. We can actually display connections to our machine as well. And so I think my system update are still going. It is that this is gonna be good. What we're gonna do is run the nets stat with the flags dash T A and this is gonna look for active sockets, and it's going to print out the status of them. And basically, you know the foreign address in the local address. This obviously is our local machine here, uh, thes air. The foreign addresses that it's connecting Teoh. And so what? I'm gonna do is I'm going to run Net stat Dash t a and and it's gonna show I p addresses instead of the ah host names. And so you can see how that's gonna be useful because we can actually combine elements of the different flags that were passing to the nets stack man. And it's basically, you know, going to change the way that each of these outputs works. And so that is how you would use nets stat to, ah, to view active connections and active routes of I P addresses internally through through the command line here. And, you know, if you're not sure of any if you think your computer maybe connecting to a malicious host or something, What you can do is you can take these I p addresses, and you can actually look them up through, um, through a website like network dash tools. I think it's network dash tools dot com. It could be dot org's, I'm not sure, but you can find information about each one of these hosts if you're not sure where it came from, and just by looking at the easy, might be able to, you know, the actual host names themselves. You may, you may know what they are. I think these are all my updates that are happening through these software update or so that's Ah, I don't recognize any of these. So that's how to use Nets. Stat. I hope you guys enjoyed this video and found informative. I hope you guys can basically understand what Net stat does. It's a very simple command, but it's a very useful in a lot of circumstances. So thank you guys for watching this video. I'll see you guys soon. 78. An In-depth Look at the Linux Hosts File: Hey, guys, in this video, we're gonna talk about hosts briefly. So, uh, in terms of our local host, actually, So there's two parts to this video. The first we're going to cover is the hosts file. And we briefly touched on that in a previous video. I think when we were when we were deploying Ah, I think our meteor application with Apache two we went into our hosts file to create some routes for the for the application. So basically, the hosts file is in e t c slash hosts, so we can go ahead and open that up. Just type pseudo nano flash E D C slash hosts and hit Enter Put in your password. And this is our hosts file. So we actually did. Ah, we were in here for Abdel. Local host uh, subbed Amina Pythons to the virtual hosts and python deployment and meteor deployment. We were in here and I didn't really explain to what extent you can use this file. So, as I explained in the networking introduction video Ah, DNs server basically holds records of what domains point toe what I p addresses. Think of this file as an internal DNS look up functionality. So when I go to app dot local host the first place my computer checks for route is the hosts file. If it doesn't find an entry for a domain in the hosts file, then it goes out to the router and then you're I S p and then a DNS server, and it checks there if there's any records for it. So by adding entries here, we have actually override default behavior of known domains that we want to change. So what I'm gonna do is open up Firefox here for a moment, and I'm going to go to a website that will allow us to get the i p address of google dot com because we're gonna be using that. So I'm just gonna go to network dash tools dot com and I'm gonna tape in here google dot com and we can see that this I p address is the one we're looking for. Eso I'm gonna copy this here, and I'm going to jump back into this file now. This file can take three columns and we've only discussed two so far, so let's go ahead and ah, cover all the columns here in great detail. So the 1st 1 is the I P address that we want a route to the second column is gonna be the domain or the host name that we want a route to that. So let's just type in go dot com and then the third column is an alias. So we can just type g o. And so when we save this file, what we're gonna see when we go to go, it's going to go to google dot com and their their servers have actually, uh, they're not Okay, so they're doing a lot of internal routing there. Let's try YouTube. So, what we're gonna do again, we're going to get actually, let's try something that we know is going to work. So I'm gonna just type in my own server name here. I'm gonna grab that I p address Jim back into our hosts file. I'm gonna pace that there. Now, I'm gonna save this again and go to go dot com saying it's not found Schweer because this just worked 79. Linux Hosts File Continued: All right. So I just had to restart Firefox here. This is Thebes default server Page the route page for my server by we're gonna serve it up pointing bracket dot net and actually get the exact same page. And so what I can do, I believe, is access the routes on the server is normal, and it works. So what we're doing, as you can see, is we're just Ah, we're just setting DNS records internally for this machine that it looks at before it goes out to get the correct ah DNS information. So again, I'm gonna go to network dash tools we're going to try with, like, um, let's try and find ah, Joe's Pizza website for them. There we go. So let's see if this will work. This is the I. P. Address from getting so I'm going to check if that I p address for out to the website as well. No, but abouts to this page. So this is the page we should see after we paste this into our hosts file. So let's go ahead and save. And then it's gotta go forward. Flash. No, let's close this. There we go. And so you can see how this works is basically ah, it routes to whatever we want to route to so you could create shortcuts for your favorite websites. With the exception of Google Google, there's a lot of internal routing and stuff. Sometimes this will work. Sometimes it won't. It all depends on how the Web server set up. Usually, though, I just use the hosts file to set domains to go to my local host. And that's for what I'm developing. Something that I do are all needs to be set with. So if I'm developing a WordPress site on my local machine and I need to set ah, set a u R L in the WordPress configuration, I would configure a domain and then point that to my local host. So that is the hosts file. Let's exit out of here. Close this. Gonna clear that. So now our host name? Ah, host name is basically a name of machine, and in this instance, ours is called vulture on. And we can see that because we've got this right here so you can use the host name much like the same way you can use, you know, custom hosts that you sat so I could just go toe Ultron and it's gonna route to my Apache default page. Now you can also update the host name and we need to do Ah, a couple things in order to do that. So first, we're going to run the command. Pseudo host name CTO set, dash host Name than whatever host. We want to name it too. So, uh, Megazord now we need to edit the hosts file update our host name here. A swell. So we're gonna replace Votron with Megazord. I saved this and close it and then we're gonna run pseudo service host Name Restart. They're Ah! It said it failed to the restart the host name service, but it looks like it's working. Host name is now set to make a zord. And if I were to close the browser and reopen it, I should be able to go to Megazord forward Slash And it does in fact, redirect me to my default Apache two page. And so that's what a host name is and how to change it on a bun to you could also change it through the system settings, but we're not gonna go through a G A y way to do this right now. Ah, so thanks for watching. I hope you guys found this informative. If you have any questions, just leave a comment. Otherwise I'll see you guys soon. 80. Using traceroute to Track the Servers a Request Passes Through: Hey, guys, we're about to talk about the trace route command and what it does and why you use it. But first we need to install that program. So just ah, come along with me, Ron Sudo Apt Get install trace route and it's gonna fetch that from the ah repositories, and it's gonna install it for us. And when it's done, we can run the command. So run trace route all one word and then the domain that you want. Teoh trace the route to. And it's going to spit out every server that the request jumps from, ah, and to in order to get to Google's server. When you see three Asterix is it means that request this time dough on that server. So it's gonna try another one. There we go. Let me make this a bit bigger. So it might be easier to read here. All right, so Ah, we can basically trace Ah, what servers we are communicating with in order to get to google dot com. So when I, um when I typing google dot com into my browser, it doesn't just go from my router. The request doesn't get sent automatically right to Google servers. What happens is there's a lot of intermediary servers in between the two, including your I S P, the DNS servers and then other servers that that need to be hopped to in order to get to Google on. So this is what we're seeing here. The first request, if this is the I. P address of my router on this is the length of time that it took to get there. What happens then, is this address eyes where this goes and you can see each address as we go now gets a bit different because we're going to a different part of the world. And the host name will show its if it's available to with the i P address in ah brackets. So we can see this in my I S p ah, and this is one of their servers that my request has to hop from in order to get the information required to get to google dot com. So I'm gonna try with my own server here, so I'm just gonna type, uh, trace route. Ah, pointy bracket dot net and we can see that it's accessing different servers in order to get two out where it needs to be. So in here we can see two interesting things. First of all, my Internet service provider and second of all, my virtual private server provider. And I'm not gonna point those out, but we can see that. And then we can see also everything in between that holds information about the route that I request needs to take in order to get to that server. So that's how to use trace route. And that's why you would is just kind of to you, no trace the route of your requests to different servers. So thank you guys for watching this video, and I will see you guys again soon. 81. Using Network Mapper (nmap) to Track Activity on Your Network: Hey, guys, Welcome back. This is the last video in the networking module. I just want to give you guys the tools you need to further your knowledge of networking in general and how networking tasks would be performed on Lenox. And so there is one more tool that I want to introduce you guys to called end map. So end map is an abbreviation for the term network mapper, and it's an open source tool that can tell you what devices air on the network. What I P addresses Aaron Houston. What services each machine is offering eso Let's go ahead. We need to install the tool. So let's run Sudo apt get Install and Matt and it's going to download about three megabytes of, uh, data is going to expand 18 megabytes. All right, now that this installed the way we're going to use this is by simply typing and map, and then we can do a bunch of things after this. So the first thing we're gonna cover is how to scan Ah specific I p address. And so I want to get the I P address that I have. So I'm gonna run I f config and it's 0.100. So and Matt, 192.168 0.0 dot 100 and we can see Ah, what ports are open. Ah, well, we can see what ports are available there, state and then also the service that they provide by name. So I have Apache insulted on this machine. You guys should have it installed on yours as well if you went through the Apache videos and so you should see the same thing here. And so the pork is 80 with state is opened because we've got, uh, we've got Apache running right now. It automatically runs when you start up the machine. And the service that that port provides is each TTP. So if I were also running an ssh server on this machine, you would see another entry in this list for port 22. It would say state open and service as this age or something to that effect. Now, if we want more information, we can run and map dash V and then the i p address again. Succeed 0.0 dot 100 dash V means verbose. And what verbose mode does in most applications is it also, aside from the regular output, it also gives you more direction on what's happening in the application of provides MAWR information than you would then you would normally get. And so, in this instance, we see that it's doing a bunch of scans. It scans the I P address, then for 1000 ports, and it finds all these ports that are open and then also finds a bunch of, ah, a bunch of closed ports listed here, 996 closed ports and it, Ah, it gives us the same output as before. So that's me. I only have one device on my network, actually, except for my router. Now, my router, I believe, is Ah, 192.1680 dot wonder and start to 0.1 my Let's start zero. That one. All right, so that is three I p address from my router. So what we can dio is we can, um we can scan multiple I p addresses at a time in multiple ways. So the first way that we're going to do is by specifying each I p address. So let's go ahead. Run and map. 192.16 c 0.0 dot and then we're gonna add ah, the last values in here separated by comma. So first I'm going to stand my machine as well as the router. And if I had ah ah network address of 192.1680 dot 10. I could also do that, but I don't so not going Teoh. Now what we see here is Ah, this'll right here would be my router. We can see this is the i. P. Address for it. And this is what ports that offers on which or this was services offers on which ports. And then we get my machine right here. That that provides the same output is it does before, but this is how it would output multiple, um, machines scan results. Now, you can also scan a range of I P addresses. So let's go ahead and run and map Command again at 192.1680 dot 1-1 hundreds is going to go from one all the way to ah 100 it's going to scan all I P addresses within that range. So if I had a bunch of machines on my network, which I actually do. I have my phone on that network is well, and that's it, actually. So I've got my router, my computer and my phone. My phone is not Ah, it's now coming up. So I'm just Ah, I'm not doing anything on my computer. Right at the moment. I'm just checking what I p address I have on my phone here, if I can find out how. OK, so the I P address and my phone is 0.101 So what I'm gonna do is run the previous command and just have it scan from one toe, 101 We should see three machines come up. I don't think my phone has any Ah, has any services or open ports that it would list? But let's have a look here. And when you scan multiple I p addresses, the more you scan, the longer it takes. So no. Okay, so there's nothing available for my phone coming up now. You can also scan, uh, so So when we talked about i p addresses Whoa, 192.168 dot zero dot We discovered that you can use anything from zero 22 55. So if I were to want to scan all I P addresses that begin with 192.1680 I could then put this in here, right? Ah, but rather than doing that, we can actually use a wild card here. I'm actually gonna cancel about this because it's gonna take a while. 82. Nmap Continued: So now you don't only have to scan devices on your local network. You can also scan external I P addresses or host names. So I'm gonna scan my server here by typing and map and then the i r. A. While the host name of my server, it's gonna It's going to take a moment. And I've got, like, a lot of open ports Just because I have so many different things running I've got Ah, uh, it's there's a lot of things that run on it and some things that I just set up that I've never really used and I haven't bothered to shut them down. And so what we get here is my host and we can see that I've got ah ftp Ssh SMTP we've got standard domain in http pop three Ah, there's a bunch of stuff here and I'm not gonna go into what all those are. But we can see that these are everything that the server has Now you can also you can also set a file. So let me clear this. Let's open up g ETA. So we're gonna create a file of ah of hosts that we want to regularly scan and this can save time when we scan them. If you've got, like, a you know, a few hosts that you regularly check on so I'm going to put pointing bracket dot net $192. 60 does zeroed out one and 192.168 dot 0.100. And then we're gonna save this as, uh, network start txt. So what we can do there is We can type and map dash I l So it's the lower case I in a capital al and then the location of that file. So it was networks dot txt in my home directory, and it's going to scan each of the hosts that is in that networks file, and it returns in the order that they were scanned in. So that's pretty neat. Uh, I want to go over a few more things with you guys regarding this command. It does get pretty big. There's so much stuff that you can do with this. And so I really urge you guys to go and explore this. If networking is one of your interests, if you want to Really? Ah, you know, follow that One of the things that I want to show you guys is how we can turn on OS inversion detection during the scan. And so what we're gonna do is type and map dash capital A in 680 to 100 this is going to scan. Oh, there. I had a little typo in the I p address. There s so I had just fix that. So this should tell me the operating system and versions that are running on the device is on my network, and you can also find this information about other hosts. Aside from this, just while this is running, you can scan a network and find out which servers and devices are up and running by using the flag dash lower case as capital P, you can display the reason that a poor isn't a particular state state by adding the flag dash dash reason, you can choose to only show open ports, which appears to be the default functionality here. It doesn't show the closed ports. You can actually also show all of the, uh, host interfaces for a machine by typing dash dash I f list in the list of arguments for this command and I mean again, it's really big. So So go ahead. And Ah, look this up. Just Ah, you know, if you wanna type in google dot com and map commands, there's a bunch of different ones that you guys should probably play around with. This was more of an introduction on two, the most common or basic functionalities of this program. Actually, I'm gonna cancel this year, and I'm just going to restart this sort of go a bit faster. I'm just going to target my own I p address here so that we can get this done. And ah, you guys can see the example output that this is going to do when adding the dash a flag in here. So here you can see a lot of information about this machine. Let's go up to the top here. Ah, we've got the port sti in the service as well as the version of the service. So I have Apache 2.4 point 12 installed, and that's also the same one here. If we go down, we get more information about the host itself. So we have Os is UNIX. We've got the computer name the domain name, if any is Ah Phineas configured the fully qualified domain name. And ah, just a lot more information. So that is the end map command. And it would be useful if you're trying to just stand your network. Um, one of the examples that comes off the top of my head. That would be, you know, when you when I would use this command is if I noticed that the Internets Ah, you know, running a bit slow. Let's say I've got 10 people in my house and half of them may or may not be using the Internet, and I want to see how many people are online. Ah, this is what I would do in that instance. Or if you you know, if you want to check how many machines offer a certain service or what the I P address is that you need to use to access a certain service on another machine, this would help you figure that out. So thank you guys for watching this video. We'll see you guys again soon. 83. Using SSH to Access the Command Line of a Remote Host: the guys in this video, it's all about Ssh. So first, what is as as age? It's an abbreviation that stands for secure shell Andi. It basically allows you to access the shell or the command line of a remote host, That is, that has an ssh server set up. And so in the previous in one of the previous videos, I connected via ssh to my my own server. And so I'm gonna do that again, and I'm gonna explain exactly what I'm doing as I'm doing it. So the way to get connected to a remote host through command line is using the ssh command . And then the only argument it's gonna take is the, uh, connection string. So in this case, it's my user name on my remote host at and then the remote host. So I can use this or any other domain name that points that server, or I could use the servers I p. Address. And when I hit enter, it's gonna ask for my password on that machine. So we're gonna put it in, and you're going to see that the prompt is going to change. Ah, I have actually got this machine named the exact same things. I have my server name. So it's Ah, Nick ATV Ultron here. And I'm on my local machine. So if I were to go to ah Vier www html and then run the L s command, I'm going to see that have gone a lot of directories here, actually, and a lot of these air actually unused in old projects that I worked on. But anyway, basically, once get connected. All the commands are the exact same because it's essentially just a remote Lennix shell. So I could return to my home directory and then list of those files and you'll see that again. I've got just a bunch of random files. So that is how to connect to ssh. When you're done, just type exit and the connection will be closed. That was a really short video. Just to recap. How to get connected is type Ssh, your remote user name at the name of the remote host and hit Enter and it's gonna ask for your password. So thank you guys, for watching this video in the next video. We're gonna be going over some sftp, which is a bit bigger 84. Using SFTP to Transfer Files to and from Machines: Hey, guys, let's go over some sftp. So first, what is sftp? Ah, well, first, before we answer that question, let's ask a similar but different question. What is FTP? So FTP is an acronym for the term file transfer protocol, and it uses the 4 21 And basically what it does is it transfers files between two machines . So sftp because in regular ftp everything is transferred in clear text. So if anybody's sniffing packets on your network like we learned in a previous video, they would be able to read all those pockets basically, So we're not going to use FTP actually recommend Never use FTP sftp is just easier anyway And so we're just going to use sftp so similarly to the ssh command, you're gonna write sftp and then the connection string. So in my case, it's exactly the same as before. It's gonna then ask for my password for the remote host. So we're gonna put that in here and now I can list what's in what's on the remote host by typing ls. But we also have a few different commands. Teoh list what's on the local host. I'm actually gonna exit here I'm going to make a directory called Sftp Demo. I'm gonna change into sftp demo, and I'm going to touch a file called names dot txt. Now, I'm gonna reconnect while in this directory to my server. Now, if I run ls I get the remote directories current directory listing. If I type LLS, I get the local listing in of the directory that I'm in on the local host. And so here we can actually, uh, we can grab files and transfer them to and from both machines. So if I wanted to put names dot text onto the server in the current directory, what I would do is type put names dot txt and it's going to upload it to my remote, uh, host with the same name. So that's when you would use Put if you want to push a file from from your local machine to the remote host, Similarly, you'd use the command, get to get files, so I'm going Teoh, I'm I really don't recall any of these files. I'm just gonna get the composer Jason file, so I'm gonna type get composer dot Jason. And if I run LLS on my local machine I now see that I have that file there. So if I exit and then run ls I've got that file there. So that is how you would use sftp to transfer files to and from machines and also a few Ah , few the commands there that can help you see what files are available. So thank you guys. So much for watching. And I will see you guys again soon. 85. Setting up an SSH Host on our Local Machine: So the last video that we're doing he's setting up an ssh host on our local machine and it's really simple. So let's go ahead and open up terminal. Ah, we need to install open ssh server. So go ahead and run, Sudo apt, Get install open. Ssh! Dash server. I believe it is. We'll get an error message if that's not a It's been a while since I did this. So So now once we have it installed, you're basically good to go. However, we are going to make it a little more secure. We're gonna change the port that this runs on. And so there is an ssh de config file. Now let's go ahead And Ron Pseudo Nano, It's an e T c slash ssh slash s s h b underscore config. I believe it is. There is, so we can go ahead and make this more secure by changing the poor and also changing the authentication stuff. So let's go ahead and change the port to ah 2212 instead of the default 22 on. Then we're going to scroll down here a bit under authentication in your we're going to change. Ah, permit root log in to know. So nobody is going to be able to log in his route. We're going to scroll down a bit here as well. And we're going to add a line. This is allow users, and this is going to take basically a list of user names, uh, of users who are allowed to love and through. Ssh. So I'm going to make my user account ableto log in through ssh. And this is going to restrict all other users from connecting to this machine via ssh. So I'm going to save it and exit gonna clear this a bit. And then what we need to do is restart the ssh service. So run pseudo system control restart. Ssh! And you're good to go. And so now, if I were on a different machine here, actually, let's see if I can get my external I P address here. I don't think I could get it through here. No. All right, it's clear. This gonna open up network dash tools. I'm going to do something like if you guys have seen the movie inception, this concept that I'm about to do will feel a little, um, a little bit familiar to you this, By the way, when you go to network dash tools dot com, the i p address that pops into this input field by default is your external your public facing I p address. This is the I. P. Address that your Internet service provider gives to you now. Actually, in order for this to work, this would have to be the only machine, or I would have to set up ah through the router de mas port forwarding our host forwarding . But what we can try, we're gonna try it anyway. I'm going to ssh into my 20 bracket server and then from here, I'm going to ssh into this machine. Should let me. It probably won't forward that port, so I would have to go through my router at this point to configure port forwarding for that port 2 to 12 in order to be able to connect from an external host to this host if you only have one machine plug. So basically like the i p address of my server when I when I go to the I P address, it goes directly to my server. It's not configured through Nat addresses. My server actually has five I p addresses in those I p addresses go directly to my server. And that's why I can access as this each on that server without having to configure any routers or anything. I think actually, the the server provider managed that in some way. So eso anyway, you know, if I were to go into my router and configure de mas or port forwarding, what I was just doing would in fact work. So thank you guys so much for watching, and I will see you guys again soon. 86. Using the man Command to Learn About the Programs on Your Machine: Hey, guys, welcome back. So this is the actual last video of this course, and I'm doing it because I realized that I didn't cover this command when I had meant Teoh in previous videos. And so this command is gonna help you find information about all the different flags that you can use for different programs and, ah, different options that you can pass it as well. It's just general information about a program, and the command we're covering is called man. So you just tape that into terminal and then the program that you want information about So ah, for instance, if I wanted more information about the ssh command, I would type man space. Ssh! This is going to show a manual page about this ssh program. And so you can see in synopsis it kind of it shows you examples of flags that you can pass it. It has a description and then also has detailed information about each flag or option that you can pass through the command here and you can just hit queue to quit that. So if I wanted to, for example, look up chromium browser in the man pages, I would do that and it would load up this. You can actually launch chromium browser with a lot of different options as well. And so this this command here is going to help you guys out. There's a lot of times when people ask for help and the help that they need was right there on the computer the entire time. But they just ah, either they didn't know about it or they just didn't ah, think about checking the man page. And so that's why I wanted to let you guys know this. This is one of the best forms of assistance that you're going to get for a bun two or any other Lennix distribution that has man installed as well. So that's what I wanted to go over in this video. If you're confused with any commands or you want to know how far you can take that command , for instance, I'm gonna type man and map, and here it's going to give a description. You can really learn a lot about programs here and here. It's gonna give you examples of how you can run the run the command and also gives you on entire list of all the options that you can that you can pass this command us well. And so I also want to take the opportunity to congratulate you guys and let you know how awesome this experience has been for me as well. I'm so happy to be able to share my knowledge about about two Lennix with you guys and help you guys take that first step towards, you know, becoming a Lennox master. We've covered a lot of command line utilities in this program that you guys are gonna probably find really helpful later on. If you guys air going into Lennox administration career paths, hopefully this is the stepping stone that you can use to propel you into linen even deeper . There is a lot more when it comes to limits. This is been over seven hours of content, but in that over seven hours of content, we've only been able to really scratch the surface on Lenox. And so I hope you guys can use this to move forward. And so thank you guys so much for joining me. Hopefully I will see you guys again soon. And maybe another course