 I'm going to demonstrate some very basic commands we can use on a Linux computer inside the terminal. To keep this short I'm going to give one or two quick examples of some of the commands, omit some of the details. Some more information can be found on this Linux reference card, which lists many of the commands at very short description. But really the best way to learn them is to try them yourself. So maybe look at these examples and then explore them yourself. So let's get started. First what we do, we type in commands and they're executed on our computer. We type those commands in at a prompt. And the prompt is shown by this dollar sign here. And the stuff before the dollar sign gives us some information about our computer and current user, saying I'm currently logged in as the user called network. The name of my computer is called node1. And this tutor character, the squiggly lion, tells us something about the directory we're currently in. Another way to tell us what directory I'm currently in on my computer is using the command pwd, the present working directory. And it tells me I'm in the directory called slash home slash network. And our directories are organized in a hierarchy, where the topmost or the root directory is referred to as simply a slash character. That's the root directory. There's a subdirectory of that called home. And a further subdirectory of that called network. We can see the contents of directories using LS. LS lists the contents of directories. And it tells me what's in my current directory slash home slash network. And in this case, LS tells me there's something called vertnet there. Now the contents are either files or other subdirectories. How do we know the difference? Sometimes the color coding can give you the hint. In my case, I see blue, the word vertnet. But to really know for sure, using the LS option, the LS command, there's an option minus L to show me the output in the long format. And it tells me that there's something called vertnet. It has some timestamp and some size. Of importance for us right now is this very first letter is a D, telling me vertnet is a directory. If it was a dash there, there was no D. You would tell me that it was a file. So that's the best way to determine whether something's a file or directory. That very first letter in the output of LS minus L. So vertnet is a directory. I can change into directories using CD. CD followed by the directory I want to change into. I want to change into the directory vertnet. PWD tells me I'm now in slash home slash network slash vertnet. If I want to go back up a level in the hierarchy to slash home slash network, there's a special case where we can do CD dot dot to go up and level. And we're back into slash home slash network and go up another level into slash home and up to the root directory. So dot dot means go up a level in the hierarchy. You should note also in the prompt now that this blue character before the dollar sign or the blue characters is giving me a shorthand version of the current directory. So it's saying where I currently am on the disk. So in fact sometimes we don't need to run PWD. We can use the prompt. But in some systems the prompt may display differently. So it's useful to know PWD. I'm currently in the root directory. I can change back to a specific directory. By typing the full path or slash home slash network slash vertnet if I want to go into that directory. And PWD tells me that I'm in slash home slash network slash vertnet. Slash home slash network. This portion is the home directory of the user called network. And that's a special directory and there's a shortcut for that. And the shortcut for your home directory is the tilde character. So really in this case the tilde character here replaces slash home slash network. So I could go to the root directory and I could go into the vertnet directory without having to type slash home slash network. I'll use the tilde character instead. And another shortcut to go home. Just type cd and it takes you to your home directory. With directories the other thing is the LS. We see there's already a directory called vertnet. We can make new directories. Let's call this new directory Steve. And we do it LS minus L. And we see now we have two things inside our current directory. They are both directories. Steve is the new one I created. I can change into Steve by LS. There's nothing in there at the moment. You go back up a level. And I can remove that directory assuming it's empty. LS. Steve is gone. We only have vertnet left. So that's some quick operations on directories. PWD, cd to change directories, make directory, remove directory and LS. And LS has a number of options. And some of them listed there. One we saw is to show the output in long format with the minus L option. And we saw some special directories, the root directory, the home directory and upper directory. Now let's look at some simple file operations. So let's go into the vertnet directory and do an LS. And we see inside four items. LS minus L tells me that three of those items, BIM, data and SRC or source are all sub directories. While something called readme.txt is a file, I know that because there's a dash there. It's not a directory. Therefore it's a file. And I'm guessing it's a text file. And one way to quickly view text files is to use the less command followed by the file name. I want to see the contents of that file, read the text file. I don't want to edit it, just view it. LS will show me that. I press enter. And now I can use my keyboard up and down or page up and down to scroll up and down through the file and read it. And when I finish reading it, I want to go back to the command prompt. I press Q to quit. So I press Q now and I'm back to the command prompt. LS shows us a file and allows us to explore a text file. Let's copy that file and copy it to a different directory. My current directory is in my home and the sub directory is called vertnet. I'm going to copy the readme.txt file and copy it up one level. Where up is the dot dot. And let's now change up a level and LS and we see readme.txt is there. So I've copied the file from one directory to another. And as you guessed, the file still exists in vertnet. So readme has been copied. We can view the contents of it using LS. Of course sometimes we may want to edit the contents of the text file. We can use nano. Nano is a very basic text editor we have available. Nano followed by the file name. We can go up and down with our keyboard and page up and down. We can edit and add some text in here. And down the bottom we have a simple menu The character means the control key. To save is called the write the file to the disk or write out. So control O will save. Control X will exit. If you press control X and you haven't saved it will prompt you. Do you want to save it? Yes, I do. Do you want to change the file name or keep it the same? I want to keep it the same. So I'll press enter. And just to check let's look readme and you can see the new text. The new file is there. Queue to quit less. So we can copy files. We can edit files with nano. We can view them with less. This is simply text files at the moment. We can rename files using move. We move the file to a new name. You can also use move to move a file to a different directory. So moving, copying and viewing are important operations on files. We can use RM to remove. Another operation to display the contents is cat. We can see the first few lines of the file using head. And the last few lines using tail. And you can create files which have nothing in them using touch. Let's simply remove the file that we've created. RMabc.txt. Unless it's gone. So some quick introduction to operations on directories and files. The best way to learn these commands is to try them. Have a look at the Linux reference card. Most of the commands have some syntax or some extra options. And you can usually find them in the help pages. And that's referred to as the manual page. To view the manual page for a command, we use man followed by the command. Manls shows us the help for the ls command. And we can scroll through and we see the many different options available. And they explain to you if you forget those options. Like less, if we want to get out, we press Q to quit. And we're back to the prompt.