Master the Fundamentals of the Terminal | Jamie Gregg | Skillshare

Master the Fundamentals of the Terminal

Jamie Gregg, Software Engineer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
12 Lessons (18m)
    • 1. Master the Terminal

      0:29
    • 2. Why learn to use the Terminal?

      0:39
    • 3. Time to Get Started

      0:59
    • 4. Change Directory

      2:25
    • 5. List Files

      1:01
    • 6. Working Directory

      0:28
    • 7. Create Files

      2:18
    • 8. Create Folders

      1:07
    • 9. Removing Files

      1:30
    • 10. Removing Folders

      1:12
    • 11. Other Useful Commands

      1:39
    • 12. The Project - Test Yourself!

      3:44

About This Class

If you want to learn the terminal to add another computing skill under your belt, help your programming career, or even just to impress your friends this course is the one for you. Learning the terminal is not as hard as you think - it also makes you stand out to employers. 

You will learn the fundamentals alongside some other interesting, more complex tasks using only a command line interface. These skills will act as a building block to your road to mastering a terminal and linux based systems.

As a developer myselfm- mainly working on web development projects using node js, however I have lots of experience in other languages - there isn't a day goes by where I don't interact with the terminal. My most common uses are:

  1. Version control
  2. File navigation 
  3. Speed up tasks

Transcripts

1. Master the Terminal: right, I'm Jimmy. And then this course we're gonna be talking about the terminal. This courses into beginner double students who have no experience or those who've had experience a while ago and would just like a bit of a refresh. We will cover everything from navigation to file and folder creation on many other useful commands. You will use day today. By the end of the course, you have completed a short project to solidify all the knowledge that you've learned. By this point, you'll be a very confident user using the terminal on old command driven interfaces. 2. Why learn to use the Terminal?: What is the terminal on? What is the point in learning to use it? The terminal is a text or command based interface used to interact with your computer. When used in the right moments, it could be faster and much more efficient knowing the command line than using the graphical user interface, such as Windows or Macs. Operating system personally idea lot of Web development and doing the commanding is a massive help I ever. If you end up using a Lennox operating system or even owned a raspberry pi, knowing the command line is a massive help on sometimes even essential. It's a great way just to show off to your friends being able to pull it up. But in terms of employment, it's a massive skill tohave, and it looks great on any resume or C V. 3. Time to Get Started: So let's get started and jump into the course. So there is a difference to no Windows Command prompt on a Mac terminal on the Lennox operating system. So to keep everybody centralized, we're gonna use hyper. My hyper is a terminal much the same as you would get on lack and windows and is a lot more powerful than the Windows Command prompt on the face of it. So head over the hyper don't. I s undiluted here. If you're a Mark or Lennox, feel free to use the terminal. All the commands will do in this course will work on the command prompt. But as I said, this course is for all operating systems. So to keep things centralized, dine nude, hyper. Some of the other benefits of hyper are the themes, the E canoes. So I am going to use the hyper material theme. So once you've got it installed, click here on hit install and you'll see that it's suggesting that we write this command. So keep note of this command on. We will be using it at the start of the next lecture. 4. Change Directory: Okay, So once you've got hyper installed, open it up and you'll be greeted with a win to like this. Now you might notice that the color scheme isn't quite the same as mine. So if you remember back to the last lecture there was a command that I said to remember. But if you don't, this is it. Here isn't your terminal and hit Enter. It will change your theme to this. Others do function. I will be changed anything. So feel free to choose whatever theme you want. We're leaving as the default so into the content of this lecture. This is probably the most important lecture on the tool that you will use most. This is a basic level of review and things will get a lot easier after this. But I would encourage you to follow along with this and just to make sure that you understand this on a fundamental level. So the most important command on terminal, in my opinion, is CD not stands for change directory. This allows you didn't have to get through your computer's file system selecting different files, going through different folders on. It's basically the fundamental everything that you will do in the terminal. So, for example, if I type in CD and I type in desktop, it'll bring me as you can see to my desktop. My I want to go back 11. I've been CD. Go on, go on, clash. Don't bring me back. Not an important thing to understand is Scoop. You can't just CD and then name around them. File on your computer. So, for example, if there was a folder on my desktop I wanted to get to, I would see the desktop, and then I would see the to the fold Ernie. And that's all my desktop. The Home Directory is like a type in CD desktop slash and then the file name. That's another way of doing it. But it's all about scope. You can only direct into folders. Your computer is only looking at the director, you see, and if you don't tell it the fill navigation will, then it will know what today. There just to reinforce the point that I made there like going back surgical forward, we concluded desktop. I want to go back again, reaching to cooling cooling slash and then this will just bring us back a level. So if you're going in and out of folders, this is really handy. So things are gonna get a lot easier. For example, you do not have to remember the name on the order of all your files is that would be impossible. Nobody's expecting you to remember that sort of move onto the next lecture to find out how to make your life a whole lot easier. 5. List Files: So as I was saying in the last lecture, you're not expected to remember. Every single filed him. So, as you can see, I'm in my documents folder right nights. Why see deed into my documents from my home directory, where I could see my documents. It was in our scope. And from here, I'm gonna type in l s. So as you can see here, I can see all of my folders. So these are all the folders that we can move into noi on their in or scoop. So, for example, if I wanted to move into audacity, I can type in CD A You And if you hit top, it'll auto complete. And I'm not in audacity. I can do ls. And you can see some of the for file names that I've been using to record these sectors. So if I type in CD and I go back again, I'm trying to think of the folder name I want to go into, and I can't quite remember. Ls unders would give us a list of all the files we can move into 6. Working Directory: So in this lecture, it's just a short command that will really help you. So as you can see my documents and sometimes you're not really sure where you are in the file directory series I've been PW Day stands for print Working directory. It will give you a full list of where you are in your computer. So if I go back a level when I type in the WT, it gives me a list of where I am. This will get you to some sticky situations. And again, just help. You knew where you are in the file structure. 7. Create Files: so in this sector on alongside the next, when we're going to focus on making files and folders, respectively. It's another key part of using the computer on using the come online in the terminal. This is really easy, A much, much faster and using a graphical user interface a particular example. When I was making a Web development project, I had to make lots of folders for different debts. And it's so much quicker to make it on the command line rather than manually having to create folders on rename the So in our current working directory house. You remember the last one? That's where we currently are. I'm gonna head over to my desktop. So now we're here. I can dio ph. D print working directory to see exactly where we are. So we're gonna do is we're gonna create a tax file. So I'm gonna tight touch and I'm gonna say, this is, uh, file dot txt. I'm then gonna type in a less which, if you remember, it's displays all the fires and our current directory. We'll see. This is a text file dot txt. If we wanted to open this file, you type in open on. And remember, we can use top to Phyllis in if I would have end to right now, we could open the tax file, do whatever we needed. Save it close on. That would be at work and perfectly find Sonae under something pretty cool. If you want to create lots of files, say, for example, you're creating a new web development project and you've got a pile of different files you need to make. You could say touch and say index html Don't worry if you knew what these don't means and these for Web development But those have you done any web development will know. And when you got a project you go through and you create all this so you got whom each TML you can opt up. Js you've got log in dot Js yet after my ls, all of these files are being created. This is so handy when you come to building projects and it will save you so much time. So if you find some value in this lesson, we're gonna move on to the next. We're gonna be working more with creating file structures which will really put you on your way, Really understand In the terminal 8. Create Folders: so moving on from the last lecture in this lecture, we're going to focus on making folders and new directories so very similar to the last way we were doing things were in the desktop on I want to make a new folder Cold website. So I'm gonna type in m k d. I r followed by the name. So I have to say website, what is going to make a new folder called Website ls Just to check I'm will see website. Now you'll notice we don't automatically get moved in, so we have to and then I'm heading tab right now. It'll Mavis in the website that I can see the back and I'm gonna make a another folder. I'm gonna call the m k d. I are going to call it my up and again ls we will see its here, and I will cd into my but very simply that's it for this sector. And we'll move on to the next one to talk about removing files. Unfold er's 9. Removing Files: guys. And welcome to this next lecture. So today I'm just telling you to be careful with this one as we're gonna be removing files , which could be a little bit dangerous if you're not sure what you're doing. The thing you learn about the charm will is there isn't any flashy warnings. Or are you sure, like you would get with it the interface? And when does our mark, they say, is your town what the computer to do? It will do it. So it against a I'm still in my app. So I'm just going to go back right of it here, using our CD command, and I'm going to remove up dot Js. So ls you remember that we created these the last time, So I'm gonna type in our hand. Uh, don't Js It was on. You'll see the file is gone. Now you understand why this could be a bit of an issue, because when you do this on Windows or market says, are you sure it's moved to the trash and you can be very careful with fire recovery and whatever, But for example, I'm gonna type in our end who know each team outlets. The fire that have been working on all day all week is gone. So take this one with a bit of warning, especially when to move on to the next room, which is right, removing files and folders. So stick around for that one. And again make sure you keep practicing. This stuff was, I'm doing as it's the only way it's gonna stick. It's very simple. It's only short command, so a little bit of practice on you will have. It's just I'll see you guys in the next section. 10. Removing Folders: this one commissioning another warning to not practice this with important files as again, just like the Windows and Mark GI's. There is new warnings for when things get deleted, they just go. So I'm on the desktop here. You see, I am in the desktop. I've still got some of our ops and our folders even sorry that we need from the last time. So this time we're gonna talk about removing the leading folders so very simple. Very simply well, you have to do is type or an de ir for removed directory onto the name so high up on you'll see that it's not gone so I can type in FAM or RM d I r on I can type in and hit top. So I was used and I just started to type the start of the folder there hit top Animal Auto complete. If there's a unique name which in this case there is website like like enter on athletes. So again, just be careful with files. It could be really quick if you're trying to quickly just clear things like if you know what you're doing, you can see it yourself a lot of time. Hopefully, you find this one useful again and I will see in the next one 11. Other Useful Commands: to this Lecter's all by two useful commands that you might find very helpful. So by using the up arrow, you're able to go through all of your last commands that you've typed in. So if I type in history, this will bring back all of the projects on commands that we've typed in in the history of our terminal. So as you can see, I have some get projects in that I was doing another tutorial with. We can see our theme that we typed in all of our CDs. If you're ever doing lots of repetitive tasks and you can't think of what the last command was and you're heading the up, borrow when you can't find it, just type in history on you'll be able to see it pop up in here now. Another one that's very helpful is the word help chronically, and it gives you lots of commands you can use. If you ever stuck. You can usually find what you need in here, and I'll try and give you the most relevant name for that. See, it gives you help me in defined by different things. So if I were to tape in and help CD, You know, it talks about the change directory, and it gives you all of little and bonuses that you can put on just to make your life a whole lot easier. No, I said to you, but I wasn't recording this. I think this is one that will be very helpful. Is that clear? So if you write clear, it'll clear your terminal. But I can scroll up and still see. But this will just give me a nice clean sleep, which is really helpful because things could get a little bit messy after a while. So again, hopefully you find this useful. And then the next lecture, we're going to move on to the project where you can help solidify the knowledge that you've learned. It's right, this course. 12. The Project - Test Yourself!: Okay, guys, unwelcome to the project, this is probably the most important lecture of the whole talk. This is a point. Solidifying your knowledge and see if you can do it yourself. If not, just go back and click on the appropriate lecture on you'll find out what today. So I'm gonna break a dine into two parts. So what I want you to do is I'll give you two or three instructions pulse of it. You see if you can do it and then I'll show you had to do it. And then I'll do the second part. Will just repeat that again. So firstly, I'm going. Teoh, go to my home directory. Right? So the three things I would like you to your I would like you to move to the desktop. I would then, like you don't create a folder on the desktop. And they were there like you create a tax file. So if you want to do that and I paused the video, I will wait for five seconds and then I will give you the answer to that, and then we'll move on to the next. Okay, so first thing we need to move to the desktop, so I type in CD desktop. Then we need to make a folder. So I am k the hour and I'm gonna call it Folder. We then need to move into our folder CD. I'm gonna use the top in there. I know we need to create a tax file, right touch, and I'm gonna go text dog T ax D. So that's why you go to their congratulations, if you will, to do that. If not, it's a great learning experience to get things rolling yourself and end or corrected. So see, if you compose a video, undo it, and I So for the next bit, I would like you to then delete the text file, delete the folder and go back to your home directory. So one past the desktop. So I will ask you to pause the video and see if you do that night away for five seconds against. Okay, Perfect. It's what we need to take night is to remove the text file. So we're gonna type are am text txt and and if I do ls, you'll see that it's gone. Then we need to move back a folder and then we need to type are an de ir we're gonna take in a folder. One Ellis. We'll see that that's gone. And then we need to move back once again. Night, if you want you. That congratulations on what I would say is, too There was your doing this and let me think that it feels very basic or whatever it is basic. But if you imagine at the start of this video, if you had no experience being able to open up the terminal on the Enel due to be able to do all these tasks were like even going on to on interferes whatever. You'd be very impressed. You know, you learn quickly and then you're Brean adopts to a new level of normal and so be proud of being able to do all this on. Hopefully, it will make your life a whole lot easier. This is the end of the course, so hopefully enjoyed. I'll potentially do a further course with more advanced topics and using your computer on terminal for a little bit more powerful. But this is the foundation of any any interaction evil home with a command line, interviews. So thank you. Very much for listening. If you enjoy the courts, please give it a positive written. I'll hopefully see. And one of my other courses. Thank you.