‫-: Hi, within this lecture
‫we are gonna start seeing the basic Linux commands.
‫So what we are gonna do, we're gonna run the terminal.
‫So within this terminal you might see your username
‫as a different thing rather than Kali.
‫So if you have installed the ISO,
‫you'll have already determined your own username.
‫If you're using the OVA created for this course,
‫you may see this as a root and it doesn't matter.
‫We're gonna see what difference can it make
‫in the upcoming lectures.
‫But right now you just have to worry about
‫what's coming next.
‫So you don't have to worry about this at all, okay?
‫So you have a different username,
‫maybe you have the same username.
‫It really doesn't matter.
‫What matters is that we need to understand
‫what this terminal does.
‫So within this terminal, we write commands
‫and it actually gets executed by Kali Linux.
‫And in fact, we have seen this
‫when I showed you how to change the keyboard, right?
‫So what we are gonna do next
‫is to open this file manager, okay?
‫So if you open the folder, you can see
‫that whether your username is Kali or something else
‫you can see all these documents, download,
‫desktop file system and everything.
‫So what we're gonna do next is to learn how to navigate
‫inside of the terminal.
‫So we can execute commands
‫in any of these folders and it can make a difference.
‫So first of all,
‫we need to understand how to navigate, okay?
‫Right now we are in some folder,
‫we are in some kind of place inside of our file manager,
‫and we don't know where.
‫So in order to find out, we need to write some commands.
‫We need to execute some commands and check the output.
‫And then we can navigate through as if we are clicking,
‫double clicking on any of this,
‫going into the documents, creating a folder here.
‫Okay, let me do that.
‫Let me create a folder, but not from here,
‫maybe from the terminal, okay?
‫Let me show you what I mean.
‫I'm inside of Kali right now and I'm writing PWD.
‫It stands for Print Working Directory, okay?
‫So it will show you where we are currently.
‫As it turns out that I'm inside of home Kali folder, okay?
‫So it's the same folder that I have seen
‫when I opened the file manager before.
‫Because I'm inside of the Kali user, okay?
‫And again, if you're inside of some other user
‫then you should be seeing that.
‫And it really doesn't matter where you are right now
‫because we are going to see how to navigate in a minute.
‫So over here, what I'm going to to do,
‫I'm going to try and see what kind of folders
‫and files are there inside of the home and Kali, okay?
‫So it turns out I'm inside of the Kali folder.
‫So maybe I want to go into some of the folders
‫like documents and downloads and stuff.
‫By the way, if you come over here to file preferences
‫you can change the fonts, you can change the appearances.
‫So my size is 20 right now.
‫If you want, you can make it bigger,
‫you can make it smaller.
‫I'm using it this big
‫so that you can see it in a better way, okay?
‫But you can change it in a way that you want.
‫Anyway, so we have printed out the working directory.
‫And again, I wonder what's inside of it.
‫So I can run this unless it's kind of listing.
‫It lists the folders and files
‫available in the current folder.
‫If I open that folder, you will actually see
‫that desktop, documents, downloads and stuff
‫are actually inside of this Kali folder, right?
‫So I see exactly those folders.
‫If I want to, I can double click into any of those.
‫I can change my folder, for example, into the documents,
‫and I can see what's inside of that as well.
‫The command to do that is CD.
‫And CD stands for change directory.
‫And you have to make sure that you are writing
‫exactly as it is, upper case D
‫and something like that, okay?
‫So you should exactly write like this, CD space documents
‫or CD space downloads.
‫And once I execute that
‫I'm inside of the documents right now, okay?
‫Now I have double clicked,
‫so it's exactly like double clicking.
‫Now if I run LS over here, as you can see,
‫I got nothing back
‫because there isn't anything inside of the documents.
‫If there was, I would've seen that.
‫Great, now I'm gonna right click
‫and create a folder over here, for example.
‫I'm gonna create a test folder, okay?
‫And once I do that, I can go back to the terminal
‫and run LS one more time to see test folder actually exists.
‫Right now I'm getting tests because it's there.
‫Of course, I could have created this test from here as well.
‫We're gonna see it, don't worry.
‫But the idea over here is that
‫you can see the available files and folders
‫and you can interact with them using the terminal.
‫And obviously we don't have to go over the file manager
‫and the right click and create folder
‫anytime we need to create a folder or create a document.
‫We can do that with the terminal as well.
‫Right now, I'm inside of the documents
‫and assume that I want to create a test two folder, okay?
‫If I'm sure that I'm inside of the documents,
‫inside of my terminal I mean,
‫I can run this command, mkdir.
‫So mkdir, it stands for Making Directory, okay?
‫So for example, if I write this, mkdir test2
‫then if I write LS,
‫I can see that test and test2 is actually over there.
‫As you can see, it's actually created the test2 folder
‫inside of the documents.
‫And the idea of the navigation between the folders
‫derives from this.
‫Because once I, by the way, if you write clear,
‫it just clears the screen.
‫Once I created that folder
‫it actually has been created inside of the documents, okay?
‫Right now, if I write LS, I can see it.
‫If I want to, I can go into that folder as well.
‫Writing CD test2.
‫Right now I'm inside of the documents and test2 folder.
‫If I create any file, or if I create any folder,
‫I can't just do it in the test2.
‫And if I write this cd ..
‫it'll just take me to the previous folder
‫which is the documents in this case, right?
‫It's exactly clicking on the back button over here.
‫So of course you can use this CD command, and LS command
‫in order to navigate throughout the terminal.
‫So for example, you can go back to the user,
‫the home Kali folder, you can go to the downloads,
‫you can go to the desktop, you can create folders,
‫you can create files if you want.
‫So depending on where you are
‫it may produce some different behavior, right?
‫For example, if you create a folder inside of desktop
‫it'll appear in the desktop, not in the documents.
‫So that is why it's important
‫for us to learn about this navigation first.
‫So right now I'm inside of the documents
‫and if I write LS, I can see the folders, right?
‫So there is test and test2.
‫So assume that I wanna create a file.
‫So the command for that is touch.
‫So if you write anything over here after the touch,
‫it will be created.
‫It can be a Python file, Java file, txt file, jpeg file,
‫whatever you may wanna think of, okay?
‫It doesn't create a folder, it creates a file for you.
‫And obviously we can use this to create some maybe, I dunno,
‫text files to have some notes inside of it.
‫For example notes.txt, okay?
‫And when I execute this,
‫this notes.txt is actually created
‫inside of the document's folder, as you can see.
‫Right now, I can double click on it,
‫I can write inside, I can write anything inside of it.
‫And by the way,
‫before double clicking, maybe you may want to right click it
‫and just select the thing that you may want
‫to open this bit.
‫But don't worry about the editors like Mousepad, Wim,
‫I'm just going to show you a better way to do that, okay?
‫So don't worry about opening
‫and writing something inside of it.
‫We're gonna use something called Nano in order to do that
‫for the upcoming lectures.
‫Right now, we are just seeing how to navigate through.
‫So assume that we have created this,
‫created this notes.txt.
‫Maybe I want to move that, maybe I want to delete that.
‫Maybe I want to see the difference
‫between those and the folders.
‫So if I write LS, as you can see,
‫notes.txt is written in white.
‫And this test are written in blue.
‫Of course, it depends on the team, it depends on the colors
‫but they are shown in different colors
‫so that we can understand
‫whether this is a file and folder.
‫And if I go to cd.., if I write LS,
‫as you can see everything is shown in blue right now
‫which makes me think that everything is folder right now.
‫So I can go back and I can see that if I write LS,
‫the Kali is again a folder.
‫There isn't any file inside over here.
‫So this home folder
‫is actually the folder for different users.
‫Of course, we can have multiple users when we use the Linux.
‫And right now I'm seeing Kali,
‫maybe you're seeing something else but it doesn't matter.
‫Right now, you know how to navigate between them, right?
‫You can write cd Kali, or cd,
‫whatever you see it over here.
‫And then you can come to that folder.
‫And you can run LS to see what's the content of it.
‫So make sure you run PWD before you do anything else
‫so that you can understand where you are.
‫And if you want, you can write make their touch,
‫LS, cd ...
‫And so all of this stuff will enable you
‫to navigate through the terminal.
‫But again, maybe I want to delete them,
‫maybe I want to move them.
‫And in order to do that
‫we need to learn all those commands as well.
‫That's exactly what we are gonna do within the next lecture.