4:47:02
2025-02-19 09:20:08
2:39
2025-02-19 21:55:33
4:40
2025-02-19 22:23:21
2:58
2025-02-19 23:09:29
20:58
2025-02-19 23:48:16
3:00
2025-02-20 05:21:32
2:29
2025-02-20 05:53:02
5:18
2025-02-20 06:35:37
4:07
2025-02-20 07:47:51
1:15:07
2025-02-20 09:31:43
1:28:23
2025-02-20 11:13:37
1:16:38
2025-02-20 13:43:10
Visit the Network Engineers Programme course recordings page
WEBVTT--> All right, well, I can see everybody is in and we'll wait for you to come in as well. --> Anyway, so meanwhile, as we do that, let's just take a very quick look at what we are --> doing today. --> And again, this is just the fundamentals. --> So I'll just quickly fire this up. --> As this is on Linux command line basics, as I said, we are almost seeing this as --> the first look at Linux. --> You guys are comfortable with it. --> So we'll probably accelerate through some of that. --> However, there is something that I would like you to know, which is we can always --> work on a system on our own. --> But there are some ideas or concepts that should be clear for us to probably --> troubleshoot when things go wrong. --> Sorry, I'm going to start recording now. --> Yes, go ahead. --> I thought that was going on. --> If not, go ahead. --> Are we all good? --> Yes. --> All right. --> Lovely. --> So we look at the Linux fundamentals from the operating system concepts. --> Just a super quick history, understanding different Linux distributions and then start --> working on the Linux command line. --> And as we work on the command line, the absolute fundamentals of the file system, --> how it works, how do we interact with the operating system, what are the different --> file types, many core commands that will work across most of the Linux --> distributions. --> We're going to have a look at those. --> Pretty much everything that we are doing will be done hands on. --> I would be sharing with you some just like a lab file as well, and the --> content of this as well. --> I would say the starting point on working on any operating system is just the absolute --> basics in terms of the concepts. --> And you guys have already been interacting with the operating system, so we'll just --> keep it very, very quick. --> The core here is that the core of your operating system is what we call as a kernel. --> And we interface with this kernel, typically through a graphical interface or --> through some sort of a command line or a shell environment. --> As you guys already know, right now Linux, we have fantastic graphical --> interfaces available, also for administration. --> And at the same time, we have the shell available. --> If you go back in the day, yeah, I think the only thing available was a --> shell, I'm saying, 20, 30 years ago. --> Graphical interfaces were not so common. --> Today we have the choice of both. --> There are a few things you can literally do more efficiently only through the --> shell itself. --> A quick question. --> Are you aware of different types of shells? --> You have a choice. --> Not on my site. --> No. --> So I think the comparison that I could have is that if you go to Windows, --> for instance, we have one graphical interface, right? --> Like one environment, one type of graphical interface. --> And then you open a command prompt. --> That's your command line, maybe a PowerShell. --> Linux Unix systems are known for flexibility. --> So you can have different types of graphical environments. --> And we also have different types of shells. --> And they give like different capabilities or different feature sets, for instance. --> So it's just nice to know that when we look at the OS concepts, that there are --> different types of graphical environments and shells available. --> Typically, when we use a platform like Ubuntu or any other platform, we can --> customize some of this during the installation as well. --> So today, when you work on a shell, you're working on a certain type. --> When you're looking at a graphical interface, it's a certain type of graphical interface. --> And that depends on what type of Linux distribution you are working on. --> On a fundamental level, the shell is your interface to work with the system --> through the kernel, which is your absolute core. --> Maybe the very first thing we want to do is just get started having a terminal --> in our environment. --> Maybe we can do exactly that. --> You can see that in the online lab environment as well. --> But let me just share exactly that. --> Since you all are users of the Linux as well, what's the quick --> shortcut to open a terminal? --> Keyboard shortcut. --> Let's try Control-Alt-T. --> And get a terminal up and running. --> Let's give that a try. --> Control-Alt-T. --> Let's just get a terminal up and running. --> We like shortcuts. --> Shortcuts are good. --> Many ways to get the terminal up and running. --> Let's try the keyboard shortcut. --> I can see it error-wise, got it up and running. --> Control-Alt-T. --> Yeah, we have the terminal up and running. --> And Austin is up and running with the terminal as well. --> Of course, the other way to get a terminal up and running is you can right --> click on many of the Linux distributions. --> You can do that. --> You can just right click the desktop, open a terminal. --> And I can also maybe go into my applications, the menu and search --> for terminal. --> I see another terminal here. --> Here we go. --> So I have three terminals up and running, but they're all --> started in a different manner. --> One with the help of a shortcut, the other one with the right --> click on the desktop, and the third one from the menu. --> Can I request you to do the same, please? --> Let's fire up three different terminals through the menu, from the right --> click and from Control-Alt-T. --> On the menu, where do I go? --> So in the menu, you can just type to search. --> Easiest thing to do would be to just type terminal. --> And you might see this terminal, made terminal for this GUI available there. --> You might see multiple types of terminals. --> We'll look into that. --> But you might see, again, depending honestly on the different Linux --> platforms, they might be in different places. --> They might be arranged and organized under system tools. --> And then when in doubt, just search the fastest way of getting into the --> terminal itself. --> So in other words, we are working in a terminal. --> This is a cell which provides us access into the OS, and then we can --> do all kinds of things from here. --> And as I said, once upon a time, a terminal is a terminal. --> And a terminal was the only way to work. --> So as we work on that, quick question. --> What are our privileges in the operating system right now? --> Just by looking at the terminal, what are our privileges into the --> operating system? --> What does that dollar indicate on the shell? --> You can, you can take a guess, please don't worry about right or wrong. --> You can just take a guess. --> Okay. --> Is it not the rate and, and right? --> So a dollar. --> No, yeah, go ahead, please. --> Yeah. --> I mean, I can't go with the rate because I understand what you mean by --> I can execute a command. --> So you can execute commands on all the terminals. --> However, you are a normal. --> You don't have what we call as the root privileges. --> In other words, you're not the administrator. --> So certain commands that require admin privileges just won't work. --> You are a normal user. --> If you have root privileges, what does the terminal look like? --> What does the prompt look like? --> What changes? --> So let's try that on one of these terminals. --> We have three terminals in front of us. --> I'll explain the commands. --> Of course, as we go in, I'm going to do. --> If I do pseudo bash and logic in a bit, I want you to notice if your --> terminal changes the prompt, the last character changes. --> I believe changes in changes into a hash. --> You please try the same pseudo bash. --> So now we have one terminal where we have all the privileges. --> And current limited privileges as a normal user. --> Okay, so are we doing that on all of those three terminals? --> Just one, just to show the difference, just visually how it looks. --> Does that work, Austin? --> Yes, it did. --> Yes, it did. --> Yeah, go ahead. --> Oh, no, just saying that I have to find teams to unmute. --> If I'm open, this might be a little bit delayed. --> Yeah. --> So you wanted to say. --> No, what I'm saying is there is another name for a terminal where you --> have root privilege privileges. --> Do you know the name of that terminal? --> What's the name of that terminal? --> Yeah, it is. --> It is called as the CV updater because this is where you make a mess and --> you start looking for another job with great power comes great responsibilities. --> The moment you see the hash sign on a terminal, think twice and do --> nothing. --> What that means is we work as a normal user as much as we can till we need to --> actually perform some system administration. --> We wear the hat of the system administrator as long as needed. --> And then we get out of that and back into the normal user. --> Can I request all of you here just to type exit into the terminal, which --> is running under root privileges. --> Okay. --> What changes onto the prompt and go back to the last time. --> Yeah, we are back to the safe job because here you can't mess up --> everything into the system. --> Probably the very first thing I want to tell people is when you are --> working on the shell, how to recognize if you have higher privileges or not. --> And if you have higher privileges as root, the prompt changes. --> And maybe we ask ourselves a question saying, do I really need those --> privileges for what I intend to do on the system right now, or is a normal --> user enough for me to carry on my will get more into the pseudo and the --> other commands a little bit later on, but just wanted to bring that point --> across. --> Are we clear? --> Any doubts, questions, thoughts? --> Okay. --> I take that as a sign. --> I'm going to do exactly the same. --> Exit and just come back to a normal terminal, which ends with that dollar. --> All right. --> Just a little bit very quickly on Linux. --> I really don't want to turn this into a history lesson, but I think it's --> worth mentioning this when we work with Linux, we normally hear the --> distribution Linux distribution and fancy people use the word distro, right? --> Which Linux distro are you working on? --> What that fundamentally means is that there are many flavors of --> Linux as it is open source. --> A lot of modifications have been done and Linux has been adopted and --> adapted for various reasons by different organizations and individuals. --> And all of these are considered as distributions, very popular --> distributions will be something like Susie, like Debian, like Fedora, --> Ubuntu, like we have. --> There are many, many, many distributions around and each has --> certain advantages, disadvantages, specific purposes that we've got. --> First question. --> How do we know what kind of Linux system are we working on? --> What is the distribution? --> What is the kernel that we have? --> How would we know what that is like? --> Anyone? --> Let's give it a try. --> Please try this out as you see on my screen. --> If not, let me just share it with you right away. --> So I try this command lsb underscore release dash a should give you a --> little bit of information. --> What kind of distribution you're on lsb underscore release dash a. --> Now not to make your life a little bit difficult, but different --> Linux distributions have their own unique ways of getting things done. --> Which in simple English translates to the commands, the way they work on --> one distribution may not work the same way on the other. --> It can be a little bit challenging if you jump from distribution to --> distribution and you might say, oh, on one distribution I used to do --> this command or this tool. --> Yeah, there could be some differences as you jump across them. --> And there are certain things which are kind of common across all the --> different distributions. --> So maybe it's nice to know, hey, what kind of distribution I am currently --> on in terms of the Linux operating system? --> What is the distribution that I'm working on can be quite handy as well. --> Let's try some very basic things right now. --> We mentioned I'm back to my terminal. --> I will minimize the other terminals. --> I'm happy with just one at the moment. --> If you're going to make your user experience a little bit better, you --> can always zoom in a little bit. --> I do the control with the plus. --> Just to zoom in a little bit. --> So yeah, just take one. --> I'm struggling with audio. --> Hang on. --> Is everybody else able to hear me? --> No, you go away and then you come back and then it goes back again. --> Okay. --> Yeah. --> Well, that's not good. --> I shouldn't be going away. --> Let me just make some adjustments. --> I've just moved into a new home like three days ago. --> So still finding that sweet spot. --> I think now it should be better. --> Is the audio a little bit better now? --> Yeah, much better. --> So you believe that I'm a network engineer? --> No, you're a new house owner trying to find the sweet spot. --> Yes, I hope that the audio works just fine. --> So you said control plus. --> Yeah, control with the shift and the plus, of course. --> Yeah, that should help you zoom in a little bit. --> Let me keep a ping up and running to the gateway. --> Okay, one and three milliseconds. --> You can see beyond that. --> No, sorry, GP. --> The same thing is happening now. --> I see no challenges with my network connections. --> It's got to be teams. --> Let's just see how it goes because from my point of view, --> I just see a very happy connectivity. --> I'm able to ping remote network systems with eight milliseconds --> and I have one gig and my upload speeds around 250 MB. --> We can just do one thing. --> I'll just drop out and join back in. --> See if that makes a difference. --> Okay. --> Yeah, always worth trying. --> Let me just leave. --> Okay. --> Okay. --> You guys don't know much. --> How's it now? --> Just wondering. --> Going and then. --> Even now. --> Okay, so I'll keep talking and you can just let me know if it works. --> Is the mouthpiece next to your mouth? --> Or is it facing the sky? --> But now you sound fine. --> Okay, hang on. --> We can always find a setup that works. --> Wait a second. --> We're just testing out my audio. --> It seems they have some challenges. --> So I think every time I have to do a couple of pull-ups --> and push-ups and I come back. --> Is it better now? --> Let's carry on and then again just let me know on the chat --> if there is any challenges with the audio. --> We'll try a different setup. --> But frankly from the network perspective, --> I don't see much in terms of the challenges. --> Okay, if you are with me, let's carry on --> and let's head back to the shell that we are in. --> So we'll continue on just discovering a little bit more about our system. --> And we do that. --> Let's share my screen and I'm here. --> Back here on my environment. --> So we did this lsb-release-a tells us we are on Ubuntu. --> There is a specific release. --> You can look at documentation. --> Let's try uname minus a. --> It gives kind of a scary output. --> There is a lot happening there. --> What do we get from uname minus a? --> It tells a lot about the system but more specifically --> helps us learn about which exact kernel is running in the system. --> That might also make a difference to the way some commands execute --> or what capabilities of the system are available to us. --> From the basic command line perspective, it shouldn't matter. --> Interacting with the file system and doing basic system administration. --> Yeah, this doesn't really matter a whole lot. --> Let's see if we can find out how long our system has been up and running. --> We can try a simple command uptime. --> So what do you reckon that uptime is on? --> So it hasn't been up and running for too long. --> Those are seconds, minutes, hours. --> Kindly try the same. --> We try uname minus a, give some details of the kernel. --> We try uptime, tells us how long the system has been up and running. --> All of us will be almost identical. --> I've worked on systems where the uptime goes in years. --> Many mission-critical systems literally just don't go down unless it's planned maintenance. --> So we're just discovering a little bit about our system. --> What's the distribution? --> What's the specific kernel release or kernel version? --> How long the system's been up and running? --> The architecture, just some basic commands about our system. --> Just discovering it, what's going on. --> We might also on most environments just like to quickly know how the system is performing. --> Let's give that a try. --> Let me fire up my shell. --> All right, this will be easier to share. --> Anything new for you till now? --> A command that you haven't tried before? --> Everything that you just did. --> Okay, listen, how about the others? --> Just check the things you've tried before, things you've never tried before. --> Yeah, maybe for me that has been. --> Let me share my screen again. --> So a very typical command just to understand how the system is performing is the command top. --> And as I said in Linux, there are many ways to go about something. --> Top is one of the common commands that gives you a live snapshot of system's performance. --> If I just write top and press enter, it kind of fills up your screen, runs constantly. --> You can almost think of it like the Windows performance monitor. --> And we can see --> which application. --> This is the remote connection. --> VNC is taking around 10, 11% of the CPU. --> The overall CPU utilization, overall load of the system, the number of tasks running, --> amount of memory, how much is free. --> This kind of gives you a quick snapshot into, --> again, in troubleshooting. --> Is there anything eating up the system's resources at this point in time? --> Top command itself has a lot of details. --> If I press Q, it will quit the top command. --> And I'll get back to my top. --> Give that a go. --> You run the command top. --> You see some summary of system utilization. --> You can see, yes, go ahead. --> What command is it? --> The running command, top, T-O-V, top. --> Just run top and press enter. --> Thank you. --> So we can see now which applications are taking the most resources --> or which processes are taking the most resources, 10, 12% of CPU utilization. --> Our system seems to be okay. --> It's doing all right. --> Austin, you can try the same as well. --> Top command itself has many things that we can do with it. --> No, wait. --> Didn't you just use top alone? --> Yeah. --> I got confused a bit there because I said, oh, --> it's copied with us. --> Does it realize you're only using the environment to do the same? --> Okay. --> We just run the command top. --> And if you press Q to quit, this is for everybody else. --> It will exit the tool and you'll come back onto the command line. --> All right. --> A quick look at the very basic architecture of Linux. --> Commands, obviously, is one aspect of it. --> But understanding the OS helps in understanding what the commands do. --> So as we saw earlier, we have the operating system kernel --> which manages the hardware resources and we interact with the kernel. --> So the kernel itself is here. --> It works with the drivers. --> For example, when you run the command top, --> basically, you are asking kernel, hey, please give me the details of the running processes. --> So that's what the command is doing. --> The command is asking the kernel and the kernel is going and fetching all the details. --> As I did mention, there are different types of shells available. --> We have the original shell, born shell, C shell, T shell. --> There are so many different variants of these shells. --> Typically, most Linux environments have what we call as a born again shell, --> but it can be different from environment to environment. --> And there are many different graphical environments that the different Linux --> distributions you work with will have possibly different graphical environments. --> And the good part is potentially you can choose also what you like. --> In terms of the architecture, there are plenty of different system tools. --> We're going to try those tools. --> Again, we will learn not only how to execute one tool or one command, --> but the power comes from connecting the commands together. --> And we're going to have a look at that today. --> Can I tell you this? --> This is a very important slide. --> And the first point is the most important. --> Anyone coming from Windows, if I ask you what is a file, what's your answer to Windows --> when you think of a file? --> What do you think about? --> Something you can read or type into. --> So you're thinking about data, right? --> Awesome. --> Yes. --> Okay. Anybody else? --> What's the file? --> Karam, I can see you are unmuted. --> We don't hear you. --> So I think this is the thinking, right? --> I see the bubbles up the head. --> Yeah, I wanted to answer, but I'm like, is that my people? --> That's fine. --> I encourage any and every response. --> It's fine. --> No, I thought of a folder. --> Yes, fair enough. --> See, in Windows, we associate files with storage. --> In Linux, that's a mistake. --> Because in Linux and Unix, everything is a file. --> And I'll prove it to you as we work on the system. --> Your hard disk is a file. --> Your keyboard is a file. --> Your memory is a file. --> Your user account is a file. --> The screen you are looking at is a file. --> The terminal you're working in is a file. --> And that can kind of make your head spin a little bit --> when you come from Windows because you're like, hey, --> the file is for data. --> No, here, a file is a pointer to a resource. --> And it's a very broad open definition, --> like a pointer to some sort of a resource. --> The resource could be anything. --> Let's give that a little bit of a try. --> I'm going to go to my network environment. --> I'm back onto the shell, as you can see. --> The very first thing I'm going to do here --> is try a very basic command ls. --> Take a list. --> What do I see? --> Well, I see some resources. --> But I can't tell if this is a file or a folder. --> There are many ways to take a list. --> We're going to try them all. --> The command ls itself, just to showcase, --> has many ways to doing things. --> What I want to do here first --> let me try this command. --> And it's a very interesting command that I'm writing. --> tty, which terminal is this? --> I hope you remember we also have other terminals. --> I've minimized them. --> I find them at the bottom. --> And in the other terminal, --> I'm going to say tty, which terminal is this? --> And what we notice is when I say, hey, --> what terminal is this? --> It gives me a location, slash dev, slash pts, slash one. --> It's literally a file system hierarchy. --> So what the system is telling me --> is that this terminal that I'm looking at --> is represented as a file here. --> And this terminal that I see on the left-hand side --> is also represented in the system as a file. --> Do you notice that there are different pointers? --> This is number one and this is number two. --> Is that based on which one you opened first? --> Yes, absolutely. --> Just one question. --> Just one question again. --> I assume the one that you're on with the desktop --> is the one that you opened via desktop. --> Is there a reason why it's named differently? --> No, no, no. --> This is just numbering. --> They're both dev, pts. --> The type of terminal is the same. --> How do you do that? --> Also, I was just asking the question of where is the slash desktop? --> Ah, you're being different. --> Yeah, I was just a matter of identifying. --> Oh, you come to it. --> Okay, okay, no problem. --> But anyways, the quick-shot answer is --> right now the prompt is reflecting the current location you are in. --> Yes, this is just they are being very helpful to you --> because they know we are all lazy people. --> They're like, hey, guess what? --> You are in that folder. --> Okay, thank you. --> One of the most common mistakes in the Linux Unix world --> is right command but in the wrong location. --> So they're kind of helping you out --> and we'll come to that just in a short bit. --> Okay, one and two we can see. --> I do have my third terminal here as well. --> I have zoomed everything else other than the terminal in --> and I do the same thing. --> Hey, what terminal is this? --> This is terminal zero. --> So there is some numbering starting from zero. --> This is device zero. --> This is device one. --> This is device two. --> Let me try something. --> Let me try a very simple command. --> I'm going to say echo hello. --> Any guesses what it's going to do? --> It's going to show hello. --> So it literally just takes this input --> and the output is on the current device. --> So hello comes out on my terminal. --> What if I did that --> and I said this dev vts two. --> What am I trying to do here? --> I'm trying to put it in that vt. --> Hello to input net file. --> Oh, since you have to a file. --> But is that is that file really a file how we think about it? --> No, it's not. --> So what's going to happen when I do this? --> Where does the hello go? --> I was in that directory. --> Maybe just the same thing. --> The hello showed up in the other terminal. --> Wait, oh, is it? --> I just saw that. --> Can you guys try this out? --> I just saw that you actually listed a different path --> and you see that it was on zero. --> But yeah, okay. --> Now I just saw that. --> Can we try this please? --> Send a hello from one terminal to another terminal. --> Mention the file that represents that terminal --> and just writing tty will tell you --> what is the identity of that terminal. --> The example is in front of you. --> Just give it a try. --> Guys, I hope you don't mind us doing these things --> because all of you have said --> you are a bit comfortable with Linux. --> So I'm just expanding beyond the little bit of comfort --> that you have with Linux with some core concepts. --> No, we are good. --> You want us to follow you also? --> Yes, yes, yes. --> Okay. --> So arrange your three terminals. --> Find out their identity, which file represents them --> and try the echo command just as you see. --> We should redirect it to two, even though I don't have it. --> Oh, I can do one. --> Yeah, any other terminal is fine. --> So normally we just click right. --> We right-click when we want to paste something. --> Does it work here? --> Sorry, could you repeat that? --> When we want to say you've copied something, --> you want to paste it. --> Normally we just right-click. --> So I wanted to find out for this. --> You can try that out. --> Depends on the terminal --> and the type of terminal application as well. --> All right, quick question. --> Do we understand everything is a file? --> File is not just data storage. --> Very important in the Linux world, --> even devices are files, physical or logical. --> I might say Unix by mistake, but I mean the same thing. --> Basic principles are the same. --> So we answer a very fundamental question. --> What is a file? --> And the answer is this. --> So what we would like to know, --> so let's have a look at what is a file. --> And then we'll explore it in our operating system --> exactly the same way. --> I'm just going to look at the file types. --> Here we go and let me just share. --> So files that contain data, we call them as ordinary files. --> Even folders are considered as files. --> Then we have files that represent devices or drivers. --> We call them as device files. --> The example we saw right now was for terminal. --> And we have shortcuts in the Windows world. --> We call them as links. --> And we have different kinds of shortcuts, --> soft links and hard links. --> And we're going to have a look at those. --> So let's just see the file types --> and have a quick look at what we call as the directory structure. --> Here is what we need to know about the directory structure. --> And I would say like this is the starting point --> for your journey in the Linux world. --> Let me share my whiteboard here with you. --> And let's just take a closer look at the Linux file system. --> And obviously the starting of the Linux file system --> is what we consider as the root. --> Don't confuse the word root. --> Root can be a term used to describe the file system --> and root can be used to describe the user --> who is the super user. --> The super user is super chill. --> Here we are referencing the root --> in terms of our file system, how things are laid out. --> And the root of the Linux file system --> is represented by that forward slash. --> This is the top of the hierarchy. --> Every resource in the system is somewhere down there. --> So for instance, under slash, I see a folder etc. --> This contains all kinds of configuration files. --> Similarly under slash, I'm gonna see a lot of other folders --> and learning Linux is half learning this hierarchy. --> What is where? --> The important thing is what is the top of the tree --> or the root, depending on how you want to look at it. --> So if we go to our live environment, --> let's try some things out. --> The very first thing we would like to do, --> I'm just happy in any one of these terminals, --> the very first command is writing pwd. --> And I think many of you know that. --> It means print my working directly. --> Where am I? --> The thing to note here is what is the starting point --> on the left hand side is that forward slash. --> Under the root, there is the home folder. --> Under that is the student folder. --> This is where I am currently at this point in time. --> If I write cd backslash, this is literally --> going to the start of the file system. --> Everything is under this structure. --> And if I say, hey, print my working directory, --> it says, well, you are at the start. --> Everything is under this hierarchy. --> So this is the root of the file system --> and everything is under this root as a file system. --> And part of learning Linux is learning navigation. --> Does anyone know if I just write cd and press enter, --> what will happen? --> Here is a command. --> Many commands would need a parameter. --> What happens if this command, I don't give any parameters. --> Change the directory, but I don't tell you where. --> It doesn't do anything. --> Just put the same directory. --> It takes you to your home directory. --> Can you try out exactly what you see in front of you? --> Go to the root cd slash, verify that you are in the root --> with a print working directory. --> Just write cd and press enter --> and you are magically transported to your home directory. --> What character represents the home directory? --> Look at your prompt carefully. --> Okay. --> Can you guys still hear me? --> Yeah, we can hear you. --> Can you hear us? --> Yeah, all well, all well. --> You know why I like Linux? --> It makes you realize we don't know our keyboard. --> You just know where to place it. --> That's all that matters. --> Never mind the names. --> Do you know the story of the Q, W, E, R, T, Y? --> Why those characters are up there --> on the first line of the keyboard? --> If you pay attention, --> you can type the word typewriter --> from the first line on the top. --> So back in the day when typewriters --> were becoming popular, they designed it this way --> so that the salespeople could go and pitch to everybody, --> look how quickly we can type on a typewriter. --> And they would type typewriter --> and people would be impressed. --> And people would be like, wow, yeah, that's so fast. --> They didn't realize that typewriter --> could be typed just on a single line. --> All right. --> I hope this works for everyone, right? --> So the character tilde represents your home directory --> and pwd kind of tells you what is your current directory. --> And what that means is --> when you're working on the command line, --> you need to know three things. --> Commands have parameters and options. --> Let's take a look. --> What do I mean by commands have parameters and options? --> Okay, I'm gonna just share my environment just a little bit. --> And we'll take a break shortly, --> I think around 15 odd minutes from here. --> We'll just stick to your regular break size --> and happy to take any suggestions as well. --> Okay, here, a quick one. --> So here is a command cal, prints out calendar. --> Now, in this case, it says, hey, you don't have calendar. --> Here is a command date. --> What does date give me? --> Let me clear the screen. --> Well, date does a lot beyond date, right? --> It actually tells you time. --> And what does the command time do? --> Just to pre-qual on that. --> Sure. --> So the time zone, it takes it away from the system. --> Yes. --> System, okay. --> Yeah, it's got nothing to do with your time zone. --> It's the time zone set --> during the installation of the system. --> And in these cases, these are virtual machines --> running on a hypervisor. --> So typically, they borrow it from the hypervisor. --> Okay, I will take it. --> So this would represent which part of the world --> the infrastructure is running on, for instance. --> All right, so a very interesting operating system. --> I say date. --> It tells me date and time. --> I run the command time. --> It tells me something I don't understand. --> With the command date, --> what happens if I do dash dash help? --> Some of these helps are a few pages long. --> But the important thing here is --> how it's supposed to be used. --> So it's saying there is a date --> and then you can mention the options. --> Options can be short --> or options can be long. --> But the important thing is the options begin with a dash. --> And there are many options available. --> So let's try something. --> We're gonna make sure you are in your home directory. --> If not, just type cd and press enter. --> You can obviously verify that --> that you're in your home directory. --> Let's try the command ls. --> That gives us a list of resources without. --> And in my home directory, --> there is desktop, music, public picture. --> Many of these look like these are folders. --> But I would like to learn a little bit more --> about how to use the command ls. --> I'll try some help. --> I do a quick dash dash help. --> A long list of help shows up. --> Basically it tells us all the options available. --> And as an argument, --> I can mention which folder I would like to see --> or which file I would like to see more about. --> Couple of interesting options that we see there. --> Minus f, minus g. --> Human readable minus h. --> So there are plenty of them as well. --> We have the long list format. --> I'm sorry, how do you zoom in on the terminal? --> Control with the plus, with the shift. --> Or plus with the shift? --> Or with the view. --> Okay, that's better. --> Okay, thanks. --> First thing that you wanna do is customize it. --> Make it easier. --> So let me run the command ls minus l. --> When you do ls minus l, --> pay attention to the very first character. --> This is the long list. --> And you're looking at the very first character. --> So what does d represent here? --> All of these are --> directories or folders. --> In Windows, you can see that --> you use the word folders. --> Typically in Linux, you use the word directory. --> These are all folders. --> Okay, let's very quickly create a file. --> What is the command to quickly create a file? --> Which has nothing in it. --> The command to do what? --> To create a file, an empty file. --> It's m, k, d, i, r. --> That would make a folder. --> I want to create a file. --> Let's have a look at the long list again. --> What's different about my file? --> By the way, everything I'm doing, --> I'm expecting you to repeat along with me, please. --> And now. --> Okay, what's different is the size and also the rights. --> Look at the first character. --> Yes, it doesn't have a d. --> So that dash indicates an ordinary file. --> Just a file that contains data. --> Do you remember the file that represents a terminal? --> Ls minus l, give me the details of that file. --> What is the first character? --> It is not a minus, isn't it? --> It's some other character, and it's not a d either. --> So if it starts with a c or a b, --> we call it as a device file. --> A file that represents a device. --> So the very first command --> that you probably would like to learn --> when you're working on file system is simple. --> Ls minus l, what am I looking at? --> Is it a folder? --> Is it a regular file? --> Is it some special kind of file? --> Is it a link to something? --> Ls minus l gets us that answer. --> For instance. --> Yes, go ahead. --> So you said the words that means represent what? --> A device file. --> There are character and block. --> What about o and t? --> I thought you said directory. --> A directory or a folder. --> Oh, direct, okay, okay, it was back. --> And a dash is an ordinary file. --> I think, see, writing commands on Linux --> is not so difficult, --> but understanding the logic behind it helps. --> Makes us more comfortable with the platform. --> Linux can be a bit complicated as well. --> All right, before we go any further, --> just a quick check. --> Are we all good so far? --> Is Andre, Austin, Karamal, Faith. --> Oh, color fellow, we just saw you, sorry. --> Just happy morning. --> Yeah, it's all good on my side. --> Yes, what I wanted to know is that this dash dash help --> brings up what? --> I know it brings up a lot of info, --> but like what would the show description be? --> So yeah, so dash dash help. --> You're asking what does it do? --> Are you looking for something? --> Yes, yes, no. --> Okay, yeah. --> So dash dash help tells you about the command --> and tells you about all the options --> for that particular command. --> Okay. --> Some of the commands, if you ask for help, --> you get a book as a response. --> Oh. --> And then we just Google the option there, --> like I'm not reading this, thank you. --> I'll just Google how to do something. --> And of course, these are the chat GPT, --> your deep mind will work just as well. --> There are commands like tar --> for which you can actually read a book. --> Yeah, but it does give you help on that. --> How about the other space? --> Too much, too little, we know all this. --> I just need to know. --> There are. --> I'm here on my side. --> However, I think maybe when we come back, --> I just wanted to know more about the list --> because I just wanted to know the difference --> between the Ls minus Ltr and that one Ls. --> Sure. --> Yes. --> So different options and what happens --> when you combine different options? --> We're gonna have a look at that. --> I'm really proud. --> Let's do that. --> Okay. --> All right. --> So maybe a good time for a short break. --> A long break, yes. --> Okay. --> How about 20 minutes? --> I'm very generous. --> See you guys. --> No, no, I'm kidding. --> 15 is fine. --> Oh, fair enough. --> After lunch. --> Now we have. --> All right. --> All right, then a short 15 minutes break. --> See you guys in a bit. --> Okay. --> Thank you. --> Okay, cool. --> Okay. --> Okay. --> Yeah. --> Cool. --> All right. --> All right. --> All right, all right, back with all of you, --> if you're around. --> All right, here we get a big thumbs up from Carl O'Fellow. --> Hey, all right, Carol Mung is back as well --> with the second cup of coffee, I assume. --> Not yet. --> You're saving it for later. --> Yes, maybe in about six minutes, --> because I had it later, like half night. --> We have to be careful with the caffeine dose, --> right amount, right time. --> Yes, and the thing is I don't drink coffee --> for the next three months, --> so I'm not enjoying this tea, like coffee. --> Of course, you're not. --> I can live with it without it two hours or three hours away. --> Any particular reason for giving up coffee --> for three months? --> I'm on a diet. --> Didn't know coffee was part of any of this, --> but good to know. --> Yeah, you know, I don't know. --> My dietitian said that. --> The dietitian has to say something, right? --> So they have to be creative as well. --> What else can we ask this person to not do? --> How about coffee? --> Yeah, let's go with that one. --> Yeah, no, I also don't trust her, --> but she's a producer. --> She's the best in the game. --> Welcome back. --> Hopefully you survive without a bit of caffeine. --> Yeah, no, I have my water here. --> All right, that works. --> I once gave a break and someone came back with a kale juice --> and I said, you win. --> Anyone who can come back with a kale juice just wins. --> I know. --> They're on another mission. --> It's a different level when you're on kale juice. --> Faith, Lissandra, welcome back. --> Hopefully you're around. --> Austin? --> I'm here. --> I see Austin and Faith and you. --> I'm in front of the whole building. --> Hopefully they'll be back soon. --> Just give them a few minutes. --> So just talking about what we were doing earlier, --> as I said, I would highly encourage you --> to try things out along as well. --> I once said to some group, --> Linux is not a spectator sport. --> It's the easiest operating system --> to watch somebody else do things --> and when you do it, nothing works. --> Sometimes, you know, uppercase, lowercase, spaces, --> and you're like, well, when that guy was doing it, --> everything was working, what was going on. --> So you do need to try it to make your own mistakes --> and then learn from it. --> Yeah, true. --> Would encourage you to do the same as well. --> Hopefully the others just join us just in a bit. --> Let's see where we are at. --> So we're looking at different file types as such. --> Ordinary files start with a dash, --> directories start with a D. --> We saw the devices start with a C --> or there is a B as well, block device, --> and we will get into the links as well shortly. --> We're just familiarizing ourselves right now --> with the directory structure as well --> and some of the basics on the commands as well. --> And I think part of that is just over a period of time, --> you kind of create a memory map --> of which folders are important, --> why they are important, --> and that's mostly true for administrative side. --> If you're working in your own home directory as a user, --> working on some, we'll answer some of the questions --> in terms of LS and a few other basic commands. --> First, let's just take a quick look --> at the typical directories. --> I'm gonna share my screen in just a bit. --> All right, I'm gonna get back to my terminal. --> Let's share this. --> So we looked at the root as such --> and we were looking at the command LS. --> We were looking at the options of the command LS --> and I will dive into that shortly --> as we get back into the commands bit. --> The important thing I wanted as a message to come across --> is the idea that we have commands, --> we have options, --> and we have parameters. --> So in this case, LS is the command, --> minus L is an option. --> I have a long list. --> And then maybe the location. --> Are you moving away again? --> Sorry, can you hear me? --> Very fast. --> I can promise you I'm right where I was. --> Let's just see if the audio is okay. --> No, no, I'm getting the same idea. --> I can hardly hear what you're saying. --> All right, so let me leave and come back. --> Okay. --> All right. --> All right, let's see if this is any better than earlier. --> I don't know if it is the same. --> That is definitely better for my end. --> All right, let me also try another trick. --> Wait, wait. --> I'm super far away. --> Okay, how about now? --> It's soft, but I think we can hear. --> I don't know if the other guys, --> it's softer than where before, but we can still hear. --> It's all right, I can always try something --> to make it better in terms of the audio. --> Could just be a setting in Teams. --> You can always give that a try. --> All right, I'll just keep on talking --> and just let me know if any better or worse. --> Yeah, definitely better now. --> Yeah. --> All right, lovely. --> Hopefully since we are spending time on the command line, --> it kind of helps seeing what I'm doing. --> All right, so back to the idea of command, --> options, and argument. --> LS is the command, minus L is the option, --> and the root file system is the argument. --> I want to see a long list of the root. --> And I kind of get something like this. --> We can also see here, --> there are a couple of files that begin with an L. --> This is the fourth type of file. --> Shortcuts, or what we call in the Linux Unix world, --> as links, begins with an L. --> So we have D for a directory. --> We have dash for a regular file. --> We have C or a B for devices, --> and we have L for the links. --> This is how you know what is the type of file --> you are looking at. --> Just to take a quick note. --> What happens if I swap this? --> If I say LS slash minus L, would that work? --> Command, argument, options. --> Any guess? --> I'm guessing it won't work, because like you said, --> argument, options, ah, okay, it's time to correct it. --> And guess what? --> If you try the same thing on older Linuxes --> or older Unix environments, it just won't work. --> So Linux has become friendlier and friendlier --> and friendlier. --> For instance, you have some color coding in a terminal. --> I don't remember seeing this in the 90s. --> It was nothing like this. --> So the operating systems, especially Linux, --> is a bit more friendly than typical Unix, --> which is a bit more hardcore, --> and it is the way it is with very little flexibility. --> Your comfort and ease of use was not the top priority. --> But here it is. --> Coming at the other file. --> Go ahead. --> Can you help me with the improvements? --> Why not? --> That's progress. --> There's no need to be a snob about it. --> There are a lot of people like that. --> They're like, no, no, no, they're making it easy for us. --> They don't want anything. --> It needs to be very hard to do all of those things. --> Yeah, absolutely. --> They're loyalists. --> So a lot of people will have that snobby attitude. --> You know, the elitist, ah, if you don't know VI, --> you are not a Unix guy, --> and if you cannot compile the kernel. --> Yeah, well, it doesn't matter. --> Most of those people are irrelevant now. --> It's getting the job done, --> understanding the architecture is always helpful, --> no doubt. --> Especially in troubleshooting. --> That's where I make a distinction between a user, --> an administrator, and an engineer. --> So user is just using the system, --> administrator is managing it, --> and engineer understands under the hood. --> In the olden days, I really sound old saying that, --> but you couldn't be an administrator --> if you were not an engineer, --> if you didn't know how it worked. --> These days, not so much. --> You don't need to look under the hood. --> You can just do the system administration --> without taking deep dives. --> This just means more productivity --> from an organization perspective. --> As long as you can produce faster, --> that's all that matters. --> So cloud automation, all of this, --> I mean, it's a result of that drive. --> Okay, so we see a lot of folders here. --> And again, we see slash home. --> This was where the user's home directory was. --> ETC is where a lot of configuration files are, --> almost like the registry of Windows. --> MNT is where you get mount points, --> basically access to any storage or other volume, --> like my computer, C drive, D drive, and others. --> We have the bin. --> This is where the actual applications --> or executables are located. --> And many others are where log files --> and other structures are. --> Over a period of time, as I did mention earlier, --> you get more and more comfortable --> with kind of what is where. --> Just to show you a reasonable mind map of that. --> It's not easy to memorize everything all at once. --> The more you work with the system, --> you kind of figure out, --> ah, this location contains ETC is configuration. --> Boot is where the kernel is. --> Bin is where the typical executables are. --> S bin is where the system administrative tools are. --> And other locations. --> You kind of discover them over a period of time. --> And this is more, again, for administrative purposes. --> You kind of get used to them as well. --> And then over a period of time, --> the more you use the system, --> the more you start realizing what is where. --> That's part of learning Linux and Unix. --> That has not changed. --> The exact structure of the file system --> could be slightly different depending on the distribution --> and other variants within the Linux world. --> Fundamentally, it remains similar, --> but not always the same. --> So yeah, there are certain directory structures --> that you kind of get. --> Let's look at some basic commands, --> but before that, also look at the, --> how do you work with the files. --> Let's go back to the commands bit. --> And we start our journey very quickly --> with the command ls. --> So here, take a list. --> The implied argument is the current directory. --> We saw dash dash help. --> Minus r, give me a reverse order if I'm sorting. --> l, give me a long. --> List, because it's case-sensitive, --> it's not always the same parameters. --> So minus i lowercase is not the same as i uppercase. --> rst, I am sorting by time, the newest first. --> So. --> This is my home directory. --> This option, I can do two ways. --> I can separate the options out. --> Minus l minus r. --> I can also just combine them together. --> So. --> A quick bit of help might come in handy. --> And of course, there are detailed helps available, --> which we will get into. --> This is what we call as the man page. --> Basically, man is short for manual. --> And the man page is quite handy. --> I can go enter. --> Can you please get to the manual? --> Sorry, go ahead please. --> Oh, man. --> No, I was asking how did you get to the manual, --> but I see now. --> Man? --> Yeah. --> Yes. --> Okay. --> So any command typically you want, --> we can open the manual page for it --> for a quick reference. --> What is the difference between the manual and the help? --> Some commands don't have that detailed dash dash help. --> Most would have a manual page. --> And man page is literally like opening a book. --> So it's easy to jump from topic to topic. --> A dash dash help is just a quick output on the screen. --> Man itself is a tool. --> Yeah, would we be able to jump from topic to topic? --> So if you look at the help for man, --> we will talk about this as well towards the end. --> But man page itself has a lot of commands. --> You can find what is related, --> the pattern search. --> You can generate an index. --> So there are many ways to use. --> So man is a powerful tool all on its own. --> So for example, while I'm reading the help, --> I can actually execute a command. --> While I'm reading help. --> So it is very interactive, very useful. --> Maybe towards the end of the session, --> we'll have a quick look at man in depth. --> Once we have seen all of these different commands, --> we can see how man pages can be helpful as well. --> It's almost the cornerstone of Linux Unix environment, --> which is going through the man page --> and looking for what you want. --> Again, remember, this is before Google and all that. --> So it's just the built in into the system. --> But man is big. --> It's got a lot of commands built into it. --> And it's not the only help system on automation. --> This is the code that you will find --> on most examples of these platforms. --> So man is something you expect --> in every Linux Unix platform. --> All right. --> We'll dive into man as well. --> You'll see some examples of how it could be useful. --> Maybe I'll give you some small challenges as well --> along the lines. --> As we start to work within the file system, --> maybe it's good to start with understanding paths --> and what we mean by absolute path and relative path. --> So let me explain that. --> First thing, I recommend that everybody --> is in their home directory. --> And let's create a quick file. --> Let's create a folder. --> So just a simple file that contains hello --> and an empty folder. --> Right now, when I have mentioned the path of file one, --> this is what we will consider as a relative path. --> I have not mentioned the exact location of file one. --> So the system assumes in the current location. --> When I'm making a folder also, --> I've mentioned the system assumes current location. --> The only reason for that is very simple. --> And you need to pay attention to this one. --> Anytime you mention a path, --> if the path begins with that slash, --> then it doesn't matter where you are in this function. --> Your current location is not very important. --> What matters is you are giving the system --> the absolute location based on the hierarchy. --> You are mentioning the full location, the full path. --> In other words, if I go here in my current directory, --> one way to create a file is just say echo hello file one. --> What if I want to do this with the absolute way? --> I'm gonna say echo hello. --> But now I'm going to mention the absolute path. --> That means starting from slash home, --> slash file two. --> The end result in this case is the same. --> There is a file in my home directory. --> The only difference is here when I mentioned file one, --> I did not start with the root. --> This is relative to where I am. --> And here I mentioned the exact location. --> Anytime you want to be sure about the location --> of file system object, you can start with slash. --> Then you know for a fact exactly where that resource is. --> So for instance, right now if I say --> I want to see what is in file one, --> very simple command cat to catalog to read a text file. --> And it works. --> If I change my location to another folder, --> and if I say cat file one, --> that's probably not going to work --> unless there is a file called as file one --> in that folder. --> It is able, I don't know where that is. --> I can always mention the exact path, the full path. --> So in that case, my current location has no meaning --> since I have mentioned what the path begins with. --> So this is called as absolute path. --> And there are many other ways to mention the path --> relative to where you are. --> So other way to think of that, --> I'll give you some time to now try this out. --> But the other way to look at this would be, --> yeah, Colorful, please go ahead. --> Hi, good morning. --> You added a file that already says, --> oh, no, no, can you change the path? --> Sorry, I missed the path. --> Can you change the path to ETC? --> Okay, makes sense. --> Good. --> All right, done. --> Anybody else? --> What you're looking at is very important --> in the Linux Unix world. --> Where something is located. --> How do I mention where something is located? --> Recommendation is simple. --> When in doubt, start from the slash. --> Start from the root. --> Let's have a look at the whiteboard --> and understand that better. --> So let's say, can you see my whiteboard? --> Can I get a quick thumbs up? --> All right, thank you. --> So let's say under the root, we have a folder. --> Under the folder home is the folder date. --> Under the root is also the folder var. --> And under var is a folder log. --> If my current working directory is home, --> how do I refer to the other locations? --> First of all, I can refer to home, --> which is my current location, with a dot. --> I'll explain that in a bit. --> That's your current location. --> If I want to refer to a directory under home, --> I can just say, for example, CD data. --> Where does it assume data is? --> It assumes data is under my current location. --> That works. --> I can also say CD slash home slash data. --> That will always work, --> because I'm giving the full absolute path. --> How do I change to the log directory? --> If I want to give the absolute path, --> I can just say CD slash var slash log. --> That works, correct? --> Important thing is I started with that. --> What if I don't want to give a full path --> starting from the root? --> I want to give it relative to where I am. --> How do I tell on the file system --> that from here we need to go up and then go down? --> For example, how do I go from home to the root? --> Let's try this out. --> We're going to do this right now. --> We're gonna create a simple structure, --> and we will try just maneuvering and moving around. --> Can I request everybody to make sure --> you are in your home directory, please? --> Just type CD. --> Make sure you're in a home directory. --> Slash home slash student. --> Any of you know this? --> How do I go one step up --> in the hierarchy? --> It's CD dot dot slash var slash. --> So if I do nothing else, --> CD dot dot simply means go one level up, correct? --> Yes. --> So I'm here in the home directory, slash home. --> From here, how do I go one level up? --> I should be in the root. --> There is no further up to climb. --> This is it. --> Let's go to our home directory. --> From here, how do we go --> to the var folder, which is under root? --> Remember, we are two levels below root, right? --> Where will that take us? --> From here to here. --> So let me first of all just do a quick --> print working directory to prove that I am --> in the student folder under home. --> What happens if I do this? --> What does that mean? --> Two spaces are in the folder. --> So that will take me to the root, correct? --> And then slash var. --> Now I'm climbing down the hill. --> And all the way up to the root. --> And now I'm going down into slash var. --> Let's have a look. --> From slash var, exactly the same way. --> How do I go into the home student folder? --> Not giving the full absolute path, --> starting from slash. --> So what do I start with? --> What do I say? --> One level up. --> That will take me to the root. --> And then down. --> Can you please try this out on your own? --> Make sure you're comfortable navigating. --> Let's try exactly what we have done. --> Please move around a bit. --> Once we are comfortable with navigating, --> then we're gonna move into all sorts of commands --> and working on the system. --> But this is the basics. --> And you will realize what happens when you do --> or give spaces. --> No spaces in the path. --> Keramang, as you do cd dot dot. --> No space. --> Now you know why I said this is not a spectator sport. --> When you watch it, everything works. --> When you do it, nothing works. --> Great. --> I can see that works. --> Austin, are you back with us? --> Is Andrea just checking? --> Yes, I'm here. --> Yeah, yeah. --> Give it a try, please. --> Exactly what we are trying. --> I think I did. --> Yeah. --> I was following. --> Really nice. --> An old trick. --> Let me see if that works, cd dash. --> It just takes you to the last folder you were in. --> Just cd dash. --> Just takes you wherever you were earlier. --> It's a quick way of jumping. --> All right. --> Could you please come back to your home directory? --> Let me also show you the use of dot. --> I wanna copy something. --> Let's say I wanna copy some file. --> What's missing? --> If I just say, hey, I wanna copy this file. --> It's not happy. --> It says one parameter is not enough. --> I need two parameters. --> You wanna copy it where? --> I just wanna say I wanna copy it here, where I am. --> One way of saying where I am is just a single dot. --> I hope that's clear. --> Dot dot is the directory above. --> Dot is the current directory. --> So when you do this, --> in your home directory now, --> there should be a hosts file. --> Could you please try this in? --> Copy the etc hosts file into the current folder. --> That should work. --> You should have a hosts file in your --> current home directory. --> Please give it a try. --> Here dot means current directory. --> And take a list wherever you are. --> You should have that file. --> Brilliant. --> I can see it works for Austin. --> Works for Keramon as well. --> Faith, give it a try as well. --> Faith says she's coming back home. --> I can see her working. --> Maybe it's the spirit waking up. --> The body's also in. --> Works for Faith. --> Works for Austin. --> Brilliant. --> Works for me too. --> Lovely. --> Don't forget, what if I was, --> again, this is just a demonstration. --> If I wanna copy that hosts file, --> what happens if I just put that tilde? --> What does it do? --> That represents the home directory. --> Yeah, that represents my home directory. --> But that would fail because of the file like that. --> Did it say that? --> No, no, just take it on your site. --> Yeah, yeah. --> I'm glad it will say that. --> Do you see it saying that here in my terminal? --> No, it didn't. --> Linux generally, and Unix in particular, --> doesn't question you a lot. --> You are responsible for your actions. --> If you want that friendly option, --> please try this one. --> Minus I. --> What's the difference when I do minus I? --> Now it cares. --> Otherwise, it just does what you ask it to do. --> Now it asks the question. --> Hey, do you wanna overwrite? --> Imagine doing that under the root privileges. --> I told you why we call that as the CV updater. --> You can wipe a system clean with one wrong command. --> No, what's done is done. --> The fallback is update your CV, sir. --> Sometimes, and we will see this later on, --> we will create aliases that make it a little bit easier. --> You can try this on the terminal, --> and I'm gonna talk about this --> because it's a very important point as well --> related to commands. --> Do you see some aliases here? --> LL is the same as this. --> So maybe I can create an alias that says --> CP is the same as CP minus I. --> Now, if I repeat that command. --> Oh, sorry. --> If I repeat the simple CP command. --> Ooh, it's doing something helpful. --> How long does it keep the alias for? --> This is temporary. --> It's a temporary environment --> unless you put it in some files which make it permanent. --> It then forgets. --> The shell is a programming environment. --> You can program it either temporarily or permanent. --> Can I recommend all of you to try this out? --> Check the current aliases, --> create a new alias, --> and then try the regular CP command, --> and see that it is automatically adding the minus I. --> Even if you don't do it, --> the system's doing it for you. --> Pay attention to the quotations. --> Quotations, spaces, cases, these are all very critical. --> Sorry, GP. --> Yeah, minus I. --> CP minus I, go ahead, please. --> Okay, just a question. --> That up arrow and the C, --> why does that happen? --> It happens to me a lot, --> and I don't always know why, why in this timeline. --> Not sure if I follow the question. --> Third line from the bottom, right? --> With the CP override, home student dose, --> and then at the end of it, --> it's an arrow up and the C. --> Why does it do that? --> Let me just look at your screen. --> No, it's on your screen, actually. --> Ah, okay, hang on. --> Yeah, at the bottom, the third row at the end. --> The up arrow and the C. --> Ah, that is me interrupting the process, control C. --> So what happens is, --> so what happens is when you're reading documentation --> about Linux online, --> you might see a screenshot like this --> with a control C or a control C. --> So control C is your best friend. --> When in doubt, if you're stuck somewhere on a terminal, --> just press control C. --> And then what, what, what do you do? --> It basically interrupts that process --> if you're stuck somewhere. --> Here is an example. --> I don't know if it's gonna work. --> Let's say sleep for 100. --> Literally, I'm asking the terminal --> to go to sleep for 100 seconds. --> Okay. --> Or I could just do control C --> to break that process. --> Take 100 seconds of sleep, basically. --> Lissandra, is it clear? --> If you're stuck in a loop or a process --> is taking very long, then you can, --> it's like end task of the windows work. --> Okay, I see, okay. --> So you get back to your terminal. --> I lost you at the beginning when we did- --> The alias? --> Yes, before we got the alias, --> when we were asking to overwrite those. --> Yes. --> That overwrite. Sure, I can show you. --> So after that, I lost you. --> That's all right. --> Let's just quickly have a look. --> Oh yeah, I could die. --> So when you- --> Go ahead, Austin. --> No, I was asking the comment that you just made. --> Are you then reversing the alias? --> Yeah, I'm reversing it. --> Is it only gonna focus on --> all of the only aliases or can you specify which one? --> I specify the exact one. --> Oh, okay. --> Okay, so Lissandra, this is what we were trying to do. --> We copied some file from the ETC folder --> into the current location. --> Now, if we repeat the command again, --> it seems to not care. --> It is just overwriting the file again and again, --> which is typical of Linux. --> They don't always question you a lot. --> If we use command like minus i as an option, --> it seems that it prevents us from overwriting. --> That sounds like a good idea, saying hey, --> this is going to accidentally overwrite the file. --> Would you like to do this? --> Yes or no? --> So maybe we want to replace that every time --> we type the command cp, it actually executes this one --> with this option. --> For example, I always like to do ls ltr. --> This is my favorite way of taking a list. --> If I just type the command list, --> it says, well, there is no such thing. --> What I can do is I can make an alias --> where I can say list equals to ls minus ltr. --> I'm just making a shortcut for a command. --> Do keep in mind, as I mentioned to Austin, --> right now, this is just temporary on this table. --> Now, if I type the command list, --> it should execute that alias, --> and I can also double check the aliases currently --> on that system. --> You can try this out, please. --> And that should work. --> I'm sorry, I just want to see the alias list. --> The same command, just try exactly the same thing, Austin. --> Just type an alias, and the alias you created. --> An alias, and the alias you created was list, right? --> No, and then the list, yes, it was just. --> Ah, okay, yeah. --> The last one I did was just the copy one. --> Then you just say cp, right? --> An alias cp. --> Oh, an alias cp, oh, okay. --> That's the one you created. --> Yeah, okay. --> So cp will be replaced with the cp minus i. --> Mm, okay, okay, no, that's fine. --> I'll do the list now. --> Try it out. --> Aliases just make your life a little bit easier. --> So Keramong, you're experiencing something on the shelf. --> You started a quotation, --> but you did not close the quotation. --> When you pressed enter, --> you started seeing weird new lines coming up, --> and you said, let me get out of here with a control c. --> Yes. --> Which is fine. --> So that's a perfect example of when to use control c. --> Oh, and I made a mistake again. --> You might have to un-alias it. --> I think that the alias never got created, right? --> Because you did control c. --> Yes, but then I just have to. --> You tried it again, alias. --> Ah, too many spaces, Keramong. --> If you love spaces, get rid of the spaces. --> After list, that's why you have to --> look a bit more carefully. --> Hey, the screen is small. --> I meant in general. --> Yeah. --> There is a space after list as well --> that you wanna get rid of. --> Oh. --> Now you know. --> Watching it is the easiest thing to do. --> There is a T missing before you press enter. --> Missing windows already. --> I'm just out of curiosity. --> Yes. --> Can you un-descript just using alias --> to indicate that this alias will actually --> un-descript? --> You can just mention the path of anything. --> So that will kick off that particular script. --> It doesn't matter what you're executing. --> Change any time. --> Are we all good? --> So that's alias can be handy. --> However, this ties into a very important concept, --> which is when we are executing commands, --> where are they actually located as executables? --> Let's have a quick look at that. --> Give me a quick second. --> Hello. --> Yes. --> After you, boss. --> Wrong? --> Sir, bye, bye, I'm in a meeting. --> Thank you, boss. --> Thank you. --> So there is an interesting command called as which. --> And what it shows is that the command ls --> that you're executing on the file system, --> where is it found? --> And turns out it is found in the bin --> or the binary folder. --> What if I look at tools which are meant for, --> let's say, the administrator. --> System administration tool. --> This system administration tool --> is in another location called as sbin. --> Basically, this tool sits in a folder --> which contains management tools or administrative tools. --> Now why does it matter where something is located? --> Well, one is that it gives you an indication --> that this is not an average system shell, --> but this is mostly a command --> for the administrator to manage the system. --> Also, sometimes, if there is an alias, --> you can ignore it by directly executing the command --> from where it is. --> Let me show you what do I mean. --> I'm gonna show two quick demonstrations here to get. --> The first thing that I'm going to do --> is I'll just keep two terminals just side by side. --> Just let me zoom out a bit. --> Okay. --> In the first terminal, first up, --> let me look at the aliases. --> Let me create an alias like we did earlier. --> CP equals to CP minus I. --> And I can prove this that now if I copy --> something into my current directory, --> you can see that it is asking, --> hey, do you wanna override? --> So clearly the replacement of the command has worked. --> But watch this. --> I want to know where this command actually is --> and directly run it like this. --> I mentioned the full location of. --> What happens when I directly run the command --> from a location? --> Let's see. --> Does it care about the alias anymore? --> No, it doesn't. --> But if I run the command CP again, --> the alias is working. --> What have we learned? --> If you want to be 100% sure --> that you're not using any shortcuts or aliases, --> you can always mention the full location --> of the application that you're executing. --> Because sometimes these aliases can be annoying, --> but we want to temporarily avoid them. --> Does that make sense? --> This is temporarily avoiding the alias. --> If I just run CP, it will be replaced. --> But if I want to run CP without this alias, --> often I don't have to unalias it. --> I can keep the alias, just temporarily run. --> But how do I know where does the binary exist? --> So guess what? --> All you have to do is this command. --> Can you try this out, please? --> Just to ask this, just one thing. --> So most of the commands that you want to use, --> like your list, copy, and all of those, --> they are all sitting in that path. --> And bin, in binary directly. --> That's correct. --> In bin. --> That's correct. --> Okay, okay, now note it. --> And the administrative tools are in SB. --> Okay, note it, please. --> Please give it a try. --> I'll be back in just a minute. --> Someone over there. --> And back with you all. --> Let me check out how things are. --> So a very nice command, which. --> Where is this command located? --> In which folder is the command located? --> And quick short summary. --> Typical system tools are in the user bin directory. --> And administrative tools are in the user SB. --> And again, at any point in time, --> if something is not clear, please ask. --> We explore a little bit more of the fundamentals --> and move into the other aspects of managing --> or working with the command line. --> Okay, I can see this is working for most of us. --> All right, back to my terminal. --> A few other quick basics on working on the system itself. --> Maybe we have seen already --> how to identify some basic parameters. --> Maybe one of the other things we wanna know is --> who are we? --> And there is a very nice command. --> Who am I? --> And it says you are a student. --> If I write the command ID, --> it tells me a little bit more about my user. --> What is the ID of my user? --> And what is my main group and other groups --> that I am part of? --> So it gives a little bit more details --> about the current user account that I am in. --> Very handy command. --> I can't wait till you show us if you are root, --> if somebody is suited as root, right? --> And yes, can you, if you are suited as root, --> can I still run the command that will show me my home? --> No, not home account. --> If I'm suited as root, --> can I remember what my original username is? --> I'm looking forward to learning about that command. --> Sure, let's just take it out right now. --> So right now, who am I says I am student, correct? --> And my ID shows 1000 as my current ID. --> And if I try to run some tool to manage the hard disk, --> say it's okay, that's the tool. --> And if I try to actually work on the disk. --> Let's try something. --> I'm gonna switch using the pseudo tool. --> I'm gonna run the shell, --> and that shell will have the privileges of the root user. --> Now, if you do pseudo bash, --> I think we can notice first up --> that in the profile, the way the prompt shows --> on the terminal gives me an indication. --> Also it tells me I am root, --> at the rate, the name of that system, --> that's another indicator. --> What if I say, who am I? --> It says, well, right now, you are root. --> If I type the command ID, --> it says, you are root. --> The question that you had was like, who I really am. --> Try this one. --> This is like literally shouting at the system, --> who am I? --> And it says, fine, you are student. --> Give that a try. --> Linux is fun, isn't it? --> So you might shout if you want that. --> Yeah, please don't tell to others, --> what did you learn in the class today? --> You have to really shout at the system, --> and then it'll give you the real information. --> Yes. --> I mean, that's one way of remembering it. --> You literally have to shout at the system. --> Hopefully that answers the question. --> Yes, it does. --> Yes, it does. --> Can it be used in scripts? --> Anything. --> Who's writing the script? --> Anything and everything can be run in script. --> Script is just a shell environment --> which is programmed to execute. --> Anything and everything can be in a script. --> Then I'm happy if we can continue. --> Yeah, there are many things you can do in the system. --> Linux is still programmable. --> Yeah, so hopefully this tells us again --> who we are and what we are executing the command as. --> We know a little bit about now the options, --> the idea of commands and options --> and printing our identity. --> Let's try a few other simple commands. --> It's just working on Linux as well. --> Just familiarizing ourselves, so to speak. --> Since we are still working on the file system, --> let's just also have a look at --> just the idea of creating links. --> I think this might be a bit handy. --> Let's have a look at that. --> Then we look at the file system like copy and move --> and all of that. --> We can quickly try this out --> since we are already onto the file system --> and a little bit comfortable --> working with the commands themselves. --> So some basics. --> Let me switch back to where I was. --> So I have a file here. --> First of all, I can just make sure --> that I am exiting out of root. --> Just making sure I'm back as a normal user. --> I'm happily sitting in my home directory. --> I can exit the file. --> I can execute, as we saw, different commands --> and I can create some files. --> So for instance, if I have --> a quick look at this file --> and I think we currently have a hosts file already --> in our home directory. --> Yeah, perfect. --> So I already have a file in my home directory. --> So what I can do here is --> I can create what we consider as links --> and we can create links. --> We have to be careful when we use the word links --> because it's not exactly how we imagine it works --> in the Windows world. --> Let's give that a try. --> I'm gonna use the command --> ln --> and ln says make links between files. --> Careful, folders are also links, yeah. --> So when it says files, don't just think of store. --> Couple of options. --> I'm gonna try them out. --> And here is an option that says minus s, symbolic links. --> Let me explain. --> So I'm saying there is a file hosts already --> and I would like to create a link to it. --> I will just put a little asterisk. --> So any and everything that starts from hosts will show up. --> I can also put it in. --> You may not be very happy with that, but that works. --> So if you just do what I have done right now, --> which is make a link from hosts to new hosts. --> And you can kind of see that here. --> It actually says this one points to that one. --> If I read this file, cat or more or any of these tools will work. --> But if I read this file, it displays the content. --> So that means we can say that or we can argue that the shortcut is working. --> When I work on this, it reads from there. --> Just a quick question as you try this. --> What happens if I delete the original file, the hosts file? --> The link will still be there, but there will be no source. --> So it wouldn't work, isn't it? --> Yeah, it wouldn't work, yeah. --> I'll just wait for you guys to try this part out first. --> Make sure you are a student, not as root, not as root. --> Call a fellow. --> Thank you. --> Thank you. --> Hey, it's not a fire. --> Maybe it's just looking for a promotion. --> We do need to scare people away from root. --> So I believe the shortcut kind of works, right? --> It just works. --> And Faith, I did the star host star because anything it starts with --> and in the middle is hosts. --> So that will give you both the files. --> LN minus S. --> So you made a mistake with the source host Faith. --> You mentioned the source as host, not hosts. --> It still followed your order. --> It said, sir, yes, sir. --> But the trouble is the original file doesn't exist. --> The terminal is very kind to you, showing in red. --> I wish things were like this 30 years ago, green and red. --> But it doesn't exist. --> You can repeat the command again or just pick another file. --> Yeah, so if you try, Faith, you're going to get an error. --> Try to read that file. --> It's fine. --> It's just the perfect example of what we want to show. --> So here I have the host file. --> I have the new host file, which is a link, starts with an N. --> What happens if I remove the host file? --> It's not very happy. --> Of course, if I try to read it, it doesn't work. --> So there is another concept, which we call as hard links. --> Let me explain what is a hard link. --> Suddenly, you won't have to read too much about it. --> The idea of the hard link is something like think of the file as a room. --> So let's take a room. --> And let's take a room and paint it blue. --> Now, if I create two doors in this room, does it matter which door do I enter from? --> What color am I going to choose? --> It doesn't matter, right? --> So I enter the same room, isn't it? --> It just has two doors. --> This idea is called as hard link. --> If I close one door, do I have another? --> What if I create many doors? --> How many doors I need working to access the room? --> Minimum one. --> As long as there is one door, you are in, isn't it? --> This is the idea of what we call as a hard link. --> Let me show you. --> I'm going to copy the original host file into the current directory. --> I'm going to make a link, but this time I will not use the option minus S. --> I will just say host, host one. --> Do you notice there is a number here which is incrementing? --> Now it is two. --> What do you guess that number two is? --> Think of my analogy I just gave you right now. --> Two doors? --> Absolutely. --> These are two doors. --> What if I keep saying Ellen, host one to host two? --> Look at the original file. --> Three. --> If I get rid of that first file, that's okay. --> We still have two more doors. --> And it will still work. --> Can you please try this out? --> This is called as hard links. --> You can do that in Windows as well, just to show you the concept. --> Please give it a try. --> CPE slash host. --> I got it right. --> It's important that we try things out. --> So if you make mistakes, we learn from it. --> It's under LS minus L host star. --> So you see all the files where the name begins with hosts. --> I'm not sure if I was supposed to press enter, because I did. --> And then all of these came up. --> After cat there's one. --> Right. --> Just looking at what you. --> Yeah, yeah. --> So this is the content of that file. --> So cat is just a command to read a text file. --> So one command that generally comes in very handy. --> We will have this. --> Just this file. --> If you want to know what type of file something is. --> Have you noticed in Linux, we don't really have extensions. --> In Linux, there is nothing called as file extension. --> So I can literally create a file like this. --> The only trouble with that is. --> If there is a file, we don't know what is in it. --> Here is an example. --> What type of file is this? --> This is an executable. --> What type of file is ETC host? --> That's a text file. --> What type of file is my file is so cool, it's empty. --> So the file command is very handy in knowing what is the file. --> What type of file it is. --> Is it a PDF? --> Is it an image? --> Is it text? --> Since extensions are not really a thing. --> I like that people are creating the file exactly as I said. --> My file is so cool. --> Appreciate that. --> Okay, we managed to stop. --> That's fine. --> Now, can we create it without owning? --> Yeah. --> No need for extension. --> There is nothing called as extension. --> So if you are looking at something and you don't know what it is. --> Use the file command. --> Of course, please use the tab to autocomplete. --> If you are writing the path, if you are writing a command, just use the tab. --> It will autocomplete. --> And it reduces the number of errors. --> Just under file and extensions there, right? --> So if you want to create a file for PDF as an example. --> How would you go about creating that since you are not including the extensions? --> Because most of the time I've noticed that. --> For me, I always just take a shortcut. --> I just find a file with the same format and then just copy it to use it. --> But I've never, I don't think I've ever actually created a file with a different file extension there. --> Yeah, so the only thing we can create is just an empty file or a text file. --> Other files you will create using applications. --> Nothing different there. --> But these are the basic things that can make it very confusing when you work on Linux operating system, right? --> It's very different than the OS windows that you're comfortable with. --> Yeah, that's true. --> The extensions are a very big thing on Windows. --> So now if you don't have them, yeah. --> Sometimes you will have them, sometimes you may not. --> So that's cool. --> All right, so that was a little bit about the links and a little bit about just navigation, generally speaking. --> Let's just work on the command line a little bit more so that we can do like copy paste, just move things around a bit. --> Manipulate the contents a bit beyond what we have just seen right now. --> So we'll just have a quick look at the copy, the rename and other things so that we feel comfortable with that process. --> All right, back to my terminal. --> So we are comfortable moving around. --> Again, I'm making sure I'm a student. --> I'm in my current directory. --> First, let me very quickly handle renaming and moving because the command is same. --> What does that mean? --> Let me create a file. --> Data one. --> If I say move data one to data two. --> MV is not moving it because there is nothing called as data two right now. --> So MV says, OK, in that case, you want me to rename it. --> I'll rename it. --> If I say MV data two to data three. --> It does the same thing. --> It says there is nothing called as data three here. --> So most likely you want me to rename it. --> I will rename it. --> Wait a second. --> What if I create a folder called as data five or data four? --> And I say let's MV data three to data four. --> Something is different now. --> The command is the same. --> But what is different is what I have mentioned as a destination actually exists as a folder. --> In Linux, a file or a folder cannot have the same name in the same location. --> So if I do this. --> What it has done. --> It has taken this. --> Where is my data four. --> You can see that that folder now contains this file. --> So it's the same command is for renaming and the same command is for a move. --> The key here is does the destination already exist? --> If it doesn't, it just doesn't. --> If it doesn't, then it's a move. --> Because the fundamental idea is that you cannot have a file or a folder which has the same name. --> Here is an example. --> I'm going to create a file. --> I'm sorry. --> So you say you moved that file into the folder. --> But if you already had a file or had a folder with the same name, what would have happened? --> For example, if you are moving the data three right into into data four and I need a data four folder. --> You already have a folder named data three. --> Same as before. --> It won't it won't bother unless you do the minus i. --> It just won't bother. --> It will overwrite happily. --> So minus i is your friend. --> So let's say I create a file called as July. --> This is a file. --> I can verify that. --> Right. --> There is a dash here. --> It's a file. --> What if I want to create a folder called as July? --> Should it allow you to do this or not? --> No, it shouldn't. --> Because a folder is also a file. --> In the Linux, everything is fine. --> So you get a very confusing message, right? --> Cannot create a directory because the file exists. --> And then you'll be listening and not seeing it. --> And you're like, where is this file July? --> I don't see it. --> There's no other folder called as July. --> It's just that we cannot have the same name because the system treats them as the same. --> It's just something for you to notice. --> So that's MV can be used for the name, can be used for a move. --> You can also obviously use commands like CP. --> Colorful, please go ahead. --> Before we move on. --> So what if I touch July dot extension like maybe CSV and I make a folder called July will still be the same. --> Yeah. --> Yeah. --> So the idea here is good that you mentioned it. --> If a folder already exists. --> Let's take an example. --> So this is my current home directory. --> I see there is a folder called as the data for. --> And I have a file here as well. --> So let's take an example. --> You can see this. --> I'm going to start scratch. --> I will just do something very quickly. --> I will get the host file in the current folder. --> Ls minus L this host file works all is well. --> What would happen if I touch this file right now? --> The file already exists and it has some content. --> Any guess? --> Overwrite this file? --> Not really. --> It will only update the date and time stamp. --> That is a non destructive command. --> What happens if I touch a folder that exists? --> Same thing. --> It is only going to update the timestamp. --> If you create a file first. --> It won't let you create a folder with the same name. --> Because another file exists. --> Does that answer your question? --> Yes. --> I think. --> Let me try it out. --> Try exactly what you see. --> Same for the others. --> Feel free to try. --> And I appreciate the questions coming in. --> I know you can't see me. --> But I'm shaking my head vigorously. --> Linux is fun. --> It takes a while for you to warm up to it. --> But it's fun. --> All right. --> Let's try a little bit more. --> Just on the file system. --> Similarly, let's just have a super quick look at how you will copy things. --> We have already seen CP. --> But as we work on CP again, I'm making sure I'm in the current location. --> By the way, you can make an entire directory structure with a minus P. --> For example, in the current folder. --> I want backup. --> Slash. --> Files slash generally. --> So what that does. --> Is this. --> It just creates the whole path for me. --> I don't have to do it step by step. --> It's kind of nice. --> But I'm doing a copy. --> Of course, I can use the wild cards. --> Can be useful. --> For example, I can say let's copy from ETC. --> Anything that ends with the dot com. --> So multiple files might match this filter. --> Where do I want them to go? --> I want them to go into my backup files. --> Jen folder. --> Just a quick copy. --> What if I want to copy the whole folder? --> It says I don't like copying folders till you mention minus R. --> We will mention minus R recursive. --> Now I have two folders in there. --> So that's a simple example of copying files and folders. --> Please try both. --> Can you please go up a bit? --> Let's see if. --> I didn't miss anything. --> Yeah, there's one folder path that we created. --> Yeah, we should. --> That's one. --> Good works for this Andre. --> Call a fellow. --> I appreciate you guys doing everything with me live. --> Yeah, Mohammed trained us well. --> He'll be back with you. --> Don't worry. --> Just not complaining. --> That as well. --> If you see any errors, just revisit. --> And one more suggestion. --> Use the tab to auto complete, especially if there is a path file names backup files. --> Is there a folder like that? --> Yeah, it should be done. --> And then later on, you're copying that folder to another. --> I'm just wondering what it costs. --> When you're in the training room, I'm struggling to see your screen anymore. --> I think we still see connecting and connecting. --> But it's not showing up. --> You know, I still didn't get one. --> That's true. --> That might be a little bit of an issue, right? --> How about you? --> Refresh. --> Yeah, I did that. --> They can fall. --> I mean, if you think to a different browser, sometimes could just do the trick. --> Okay. --> I can see it works for everybody else. --> So minus R is forcing it to do it for a folder as well or directory. --> Yeah. --> Austin, let me know if it works. --> Got back now. --> Yeah, let's switch sometimes. --> All right. --> Let's copy and move a little bit. --> Some other file system level tricks. --> What if you want to get rid of things? --> So we have the command RM. --> Thankfully, it does not assume anything. --> It says if you want to remove, well, what do you want to remove? --> Maybe I want to remove a file. --> No questions asked. --> Maybe I want to remove all the files that begin with hosts. --> No questions asked. --> What if I want to get rid of the folder? --> Doesn't like it. --> Hey, it's a directory. --> Okay. --> How about now? --> Well, that is fine. --> If you insist, we'll get rid of that. --> There we go. --> And it can't remove what you don't have. --> So you can just do LS minus L to see what files you have. --> You can remove something that exists that you created. --> You have data 3, file 1, file 2. --> Good for most of you. --> That's frankly more on the file system. --> And then obviously there are lots of tips and tricks in terms of reading the files. --> We're going to try those out as well. --> There are some other just I would say shell related tricks. --> Simple things that you probably can try out. --> If you remember, that was the command date. --> This was the who am I. --> What happens if I do this? --> Date and who am I. --> Executes multiple commands at once. --> Nice to get many things done at the same time. --> You can execute multiple commands. --> And there are other interesting ways to kind of chain the commands together. --> Do the second one only if the first one works. --> Or do the second one only if the second one or the first one doesn't work. --> There are many ways to chain these together. --> But that's the easiest of all. --> Just in terms of executing kind of commands together. --> And I may have executed many commands earlier. --> I can have a look at the history. --> And it's a long history. --> And maybe I can repeat some command from the history. --> Let's say my command number 174. --> Then I copied a file. --> So I check the history. --> Just do that. --> I write the command history. --> Figure out a command I would like to repeat. --> I can just do exclamation mark and put that command number. --> Saves time. --> Nice one. --> But first please check your history before you execute. --> Type the command history first. --> You guys are getting nothing when you do history. --> Next. --> Can you not hear me? --> Now we are back. --> I said write the command history first. --> To get the list of all the commands. --> And I picked one of the commands where I was copying a file. --> So I executed that command again. --> Just by writing exclamation mark. --> Don't do that. --> Because it's your history that you need to follow. --> I think she wrote line 144444. --> That's a very long training course. --> Just have a look at my output. --> I just did a bit of history. --> Any command. --> Let's say there is a command that says who am I. --> I can just repeat any command with an exclamation mark. --> And the command number. --> Pick a command of your choice from your history. --> Okay. --> I got it. --> Thanks. --> So that's kind of handy. --> Again just repeating. --> Anything that you might have done before. --> And saves us time. --> So there's a bit on the file system. --> It's also a little bit also on just working with the history itself. --> And then comes in working with the text command and so on and so forth. --> What's a good time for your lunch break? --> Typically is it now? --> I think it is around now. --> But we still want to go through certain things before. --> I don't know how the other guys feel. --> I'm happy to have them. --> You want to carry on for another half an hour? --> Half an hour is too long. --> 25 minutes. --> Oh, that's such a big difference between 25 minutes and half an hour. --> I'm learning things about South Africa. --> I thought I didn't know. --> Five minutes is a lot. --> Five minutes is a lot. --> Yeah, yeah. --> It's a mind being. --> Don't tell us the two minutes. --> Five minutes. --> Between a meeting happening and being cancelled. --> Yeah, that is very true. --> And I have clients I work with and there are amazing people sometimes I work with. --> There is a meeting invite that they send you. --> They send me like a meeting invite three weeks from now. --> And between now and then I'll receive at least 10 changes of the schedule time. --> Up until like a day before it. --> I'm not entirely sure what the purpose of sending the invite out was. --> It's just to make sure all the resources invited have that exact opening. --> Yeah, you can't say I didn't know. --> That's it. --> Yeah, we told you a month ago we're going to meet sometime. --> That's it. --> That's good enough. --> Work with it. --> Well, that's fine. --> Happy to carry on. --> So that was a little bit on just in terms of tips and tricks. --> On the cell, we're going to see a bit. --> Hopefully we are comfortable with the navigation of the file system itself. --> And frankly, every single command has many options that you can explore. --> And that's part of as you work with the system. --> We learn based on what we need. --> So we don't open the man page and read the 10 million options. --> We go based on the task at hand. --> If needed, then we look into the options and we learn more about the option. --> So this is more about just familiarizing yourself with the file system. --> With the cell, the way to move around and so on and so forth. --> OK, a few more. --> Go ahead, please. --> What is the command that you screened at the machine there? --> Because whoever I am typing is not going through. --> Are you writing it? --> No, not that one. --> The shouting one. --> The who, M, I. --> Who, space, M, space, I. --> That's it. --> Don't type that. --> Let me check. --> OK, thanks. --> The one we equated as shouting at the system. --> Wouldn't do much if you're already signed in here that you're not going to see anything. --> It didn't show anything. --> What is this? --> Would make it like that. --> When you are switched to another user using Sulu and other tools, then it will show you the original user ID. --> OK, now I'll look at that. --> All right. --> Working with, as we are currently on the file system, just a quick look at how do you work with text files. --> First quick reminder, the command file can tell you that you are working with what type of file. --> In this case, a text file. --> We have many commands. --> So let's check out, for example, this file. --> ETC password, which contains everything except passwords. --> If I want to look at that file, I can get it. --> Basically, it reads the text file and shows it to me. --> But if it's the long file, it just kind of runs through the screen instead of cat, which is good for small output. --> I can use the command more. --> Which allows me to read the file kind of step by step. --> I can press enter or space. --> Here I'm pressing enter. --> Line by line or press space page by page. --> And this is just an example of reading a text file. --> So we have cat for things that fit in a page. --> If it's a much bigger file, you can use the command more. --> If you want to read the, let me try this out. --> If you want to start reading from the bottom up, you can sort it out differently. --> We have cat, we have tack. --> This is literally the opposite. --> So here tack reads from the bottom. --> Cat reads from the top. --> Each has its own advantages, what you want to read. --> Sometimes, for example, if I say cat slash hosts. --> Or if I say tack slash ETC slash hosts. --> I start from what was the last entry. --> Maybe that's what I want to see. --> In many Linux configuration files, we make changes by editing the file and making some entry into it. --> So for instance, let's take an example. --> You can try all of these commands, cat, tack, more. --> One of the very useful commands is the one that counts how many lines are in a file. --> Here is WC, word count. --> If I just press enter and I write some, for example, this is sentence one. --> This is second one. --> There are 12 words. --> And if I do like control C or control D here, end of file. --> Control D is end of file. --> You don't see the control D that I am doing. --> What word count is doing is taking the text and saying there is one line, four words, 18 characters. --> So what if I do word count for an existing file? --> Let's say ETC hosts. --> I just want to see how many lines. --> And it says there are 14 lines in that file. --> In Linux, many commands on their own don't make a lot of sense. --> Like why would you care about this till a day you care about? --> There is some use and you're like, oh, I wish I could count the number of lines. --> For example, how many users in this system? --> Well, I know that this file has one line for every user. --> So this tells me that there are 50 users defined in the operating system. --> So counting can be very handy. --> If I want to read the file, I can use the command more or the cat. --> Remember, this is for text files, not PDFs, not executables. --> We are looking at text only. --> You can try this out. --> It doesn't work on executables. --> The word count, because this is for asking. --> So executables like binary files. --> This won't work. --> You will see a gibberish. --> Your terminal will kind of freeze. --> Happy to show you that. --> Let's try to cat. --> Don't do this. --> Sorry, could you could you say it again? --> It won't work on binary files very well. --> It's for text, ASCII text. --> Faith, after you write a couple of lines, press control D. --> Control D is the character for end of five. --> OK, thank you. --> That's OK. --> Back in a quick second. --> How are you? --> Those numbers? --> What are those for? --> Because I know how many characters are there. --> But the one in the four, what are you? --> Hello. --> That's true. --> Anyone? --> Sir, I'll ask again, please. --> What was it? --> On the WC, right? --> And then there's that sentence. --> I get we do the control to count the number of characters. --> And the total of it is 18. --> So what does the one in the four actually represent? --> Because that's where I'm lost now. --> Oh, the WC dash L. --> Or the one, the one. --> I don't know. --> The one in the four. --> That's what I want to understand. --> Because 18 I get is the number of characters. --> I think it's one line. --> It's one line. --> Four words. --> 18 characters. --> Oh, four words. --> Oh, OK. --> So if you do it again, and maybe have multiple lines, --> it might return. --> Because I didn't get one thing. --> It gave me five lines. --> One, two, three, four, five. --> Oh, yeah, it should write. --> Because it didn't complete the other sentences. --> I hate it. --> OK. --> Thanks. --> I don't know, hey? --> OK. --> So I WC then wrote two lines. --> I get it. --> It seems to only count the last line. --> But I'm going to take a seat. --> Thank you, sir. --> Look. --> It's like a solution for the two. --> Cool. --> Hello. --> Yes. --> No, it's OK. --> What were you saying you counted? --> OK. --> So I ran the command. --> And I wrote two lines of what not. --> Two lines of data. --> And then the count only returns the last line. --> Is it? --> All right. --> So back with you guys. --> OK. --> It says one line, seven words, which is the total number of words. --> And then 39 characters. --> So I don't put on one line. --> I put on two lines. --> So I don't know what the one is. --> He's back. --> Maybe he will explain it better. --> Yes. --> Press Enter. --> Press Enter. --> Go to a third line. --> And then do the control D. --> What is the definition of a line? --> Anything after that. --> Anything after that. --> Anything after that. --> There is a carriage return. --> CR, IBM terminology. --> We need a carriage return. --> We need an enter for it to be registered as a line. --> So guess back in the Unix days. --> Administrators will edit a configuration file. --> Type a new line at the end of it. --> Save it. --> And the system later on will generate an error. --> Incomplete file. --> And you will read the file through the cat command. --> And you're like, what is incomplete about it? --> What it won't tell you in simple English is, hey man, just go press Enter. --> Now try control D. --> So I mean, it's improved quite a bit in the new generation of operating systems. --> But back in the day, this enter was... --> Let's put it this way. --> There were 10 million ways of me. --> So that's why often, you know, Unix administrators will look down upon the Windows administrators. --> And you guys are just clicky clacky. --> You don't know anything. --> So I just want to suffer. --> Let me suffer. --> Unless you know the true hierarchy of how the kernel works. --> You're not a true admin. --> Yeah, that's... --> Look, there is some truth to it. --> But then it's about being productive as well. --> Hopefully that answers the question. --> If there was a question in the first place. --> Yeah, I see Windows Shift Enter also get recognized. --> Right. So that's a little bit of cat and more and word count and all of that. --> Just from the file system and working from or working with text. --> Now, why we care so much about working with text? --> It's because a lot of... --> Not a lot. --> Pretty much the system configuration is spread across in text files. --> So back in the day, you would have to know every text file, where it is and for what purpose. --> What changes have to be made into it. --> Today, you use graphical tools to do administration. --> But behind the scene, many of them will go and update the actual files. --> Hence, you need to know how to work with the text file was an important bit. --> Still, to some extent, still very true. --> So for instance, let's have a look at this file. --> And this file simply has a mapping for your network engineers. --> So I have the IP address and the host name. --> Right. --> And if I do, let's say... --> I could do... --> Let's try the current host name that I have. --> Let me see if we look at the existing... --> Host file. --> That works. --> And if I ping DD node... --> That host name works as well. --> If I want to add another local host name entry, for that I'll have to edit that file. --> So working on text files is kind of an important aspect, at least from the configuration perspective. --> For instance, these days you're going to find some graphical editors. --> So let's choose like... --> Nano. --> I think it disappeared again. --> Is it the audio or the interface? --> No, it was only the audio. The interface is still there. --> But I can hear you again now. --> Okay. --> So I hope you can still hear me. --> Let me know if I am audible. A quick thumbs up would work. --> Yes. Yes, I can. --> Just a quick one. --> Since you access the GNU there, what did you do? --> The graphical editor? --> Yeah. --> Yeah, I'll just show it again. --> So let's say I create just an empty file. --> File X. --> I can use a graphical editor like nano. --> Let's say I mention nano file X. --> I type a few things in this. --> And again for others, that character means control. --> So control X is exit. --> Control K. --> And all of these are shortcuts. --> Here is a control X. Do you want to save? --> Yes. --> What's the file name? File X. --> And let me read that file. --> Okay, there's gibberish in there. --> But can you just do exactly what I did? --> Just create a blank file. --> Use the editor nano to open that file. --> Type something in. --> Use control X to exit save. --> Once you are back, just verify that the file contains that content. --> The nano is a friendly tool. --> There are many such friendly text editors. --> I have to be honest. --> I am not used to the friendly text editors. --> All I know is the super old school V.I. --> I am also not very familiar with friendly V.I. --> V.I.M. --> I feel uncomfortable in friendly editors. --> I am much more comfortable with V.I. --> But it's a matter of what do you start. --> Can you do like a line count with nano? --> There's a lot you can do with V.I. as well. --> Set, colon, set, N, U. --> Million things you can do with it. --> Again, V.I. --> The only reason someone like me would prefer V.I. --> Because that kind of works in every distribution that I work on. --> So when I used to work on Solaris, it worked there. --> HPUX, it worked there. --> Every flavor, every distribution of everything. --> I know that that classic tool just works. --> How do you save? --> Control X. --> Control X. --> I did that and it said people want to write their file there. --> And you can just say yes. --> Because... --> I don't want to overwrite it. --> I don't want to rename it. --> I didn't want to rename it. --> You can save buffer as an option as well. --> As you're working an existing file. --> You can just say I want to save it. --> Don't just tell Genevieve to try it. --> Just save modified file. --> Yes or no? --> I don't know why I did that. --> Give me that option. --> Yeah. --> I don't know why I did that. --> But it's fine. --> All right. --> That works for you. --> How about the others? --> Please give Nano a quick try. --> If you're already used to it and you use it on a daily basis then it's fine. --> But showing you that there are text editors nonetheless. --> Depending on the distribution that you're on. --> You might find some tool that does that for you. --> I suppose this is better if you're working with a file that has a lot of data, right? --> Yeah. --> You have Nano. --> You have Gedit. --> There are many tools out there. --> Again, they all range in the level of friendliness and then the commands that they support. --> So if I... --> Yeah. --> Go ahead. --> Which one would you recommend? --> Just pick the one that works for you. --> If you don't want to deal with a million commands, something like Nano and Gedit will be just fine. --> I can give you an example. --> If I work on... --> I don't know if you can see my screen. --> If I work on VI. --> First I have to type I to insert something, right? --> Yeah. --> Let's say I accidentally said today is 91st. --> But what I wanted to say was today is 19th. --> Here I can easily work. --> Go here. --> Escape. --> XP. --> I can just quickly transpose if I need to. --> How many people need to switch the two characters? --> I want to make this 32. --> Yeah, I can. --> I have many tricks in VI. --> But then, well, not everybody needs those tricks. --> So let's get out of here. --> First command. --> So please pick a text editor that you are comfortable with. --> I'm not sure that this is a Gedit. --> But you can install some of these. --> But because Nano is already there, that kind of fits the bill. --> So various different text editors can come in. --> Is this the time for lunch? --> Or we are on the 26th or 27th minute? --> On that note, it's 30 minutes. --> I can see you guys enjoy meetings quite a bit. --> So we take a break now. --> I think by now we have a fundamental level of comfort just working around in the system. --> We come back, we look at more commands, --> other things on the command line that make our life a little bit easier. --> Please ask me as I will not be coming back. --> Hopefully I will, but it's not looking good. --> So enjoy guys. --> All right. --> When are we coming back in typically? --> Is it 45 minutes? --> Usually an hour. --> All right. --> Nobody's saying anything, so it's 45 minutes. --> No, I said usually an hour. --> I said usually an hour. --> Ah, fair enough. --> Are you taking advantage of the fact that I don't know? --> No. --> We do that with us. --> Oh, my goodness. --> It's in the SLA, is it? --> Okay. --> All right. --> It's part of our KPIs. --> It all goes on. --> I get it. --> I get it. --> Okay. --> See you in an hour. --> I live and breathe in the same space that you guys do. --> All right. --> See you guys. --> See you in an hour. --> I'll probably sign in again later. --> Yep. --> Make sense. --> I'll be correct. --> I'll be correct. --> I'll be correct. --> All right. --> All right. --> All right. --> Oh, my goodness. --> I --> The delivery and installation press one. --> The follow-up press two. --> The request for repair press one. --> The delivery and installation press two. --> How did it come so fast? --> It was our film trip today. --> But now it comes on its own, so it's not fast to bring it. --> Where is the dresser? --> Is it in the washroom? --> Yes. --> Oh, it's cold. --> Surprise? --> Surprise? --> And there were only four children in the bus. --> Really? --> What do you mean? --> Like, there were only four children. --> There were four children in the film trip? --> No, there were four children in the bus. --> I have to take you guys there. --> Yeah, that's fine. --> Can you please wash your face? --> I need water. --> Good job. --> The most funny and insane thing in the history happened to me. --> And everyone had it in their heads. --> It was practically three for the whole day. --> She was not to make a study and she was outside and she didn't care. --> Like, me, Ethan and Pernika were playing ball in the corridor. --> She didn't go in the corridor because in the fourth grade, I think some teachers had to meet him. --> So we weren't allowed to go there. --> No. --> I don't want to go to the park. --> Will you come? --> Can I take auntie in? --> Yeah, put auntie in. --> She also needs to know. --> But you won't come first, you'll eat and then go. --> So Pernika and Ethan were playing in the corridor. --> So Pernika threw it and it hit Ethan's head. --> It hit here. --> It was so high that it bounced off. --> And it hit Roy sir, the sixth grade super white. --> It hit his ear. --> And they were like, who did that? --> And he went down to pick up the ball and his trousers split. --> It was so hilarious that his trousers split. --> Then we ran. --> We went to the staff room and we couldn't stop laughing and laughing. --> And then when we came back to class, I was like, why are you in the same grade class? --> I was like, why are you laughing so much? --> Till you wash and come, I'm not discussing anything. --> So I have to do my night right now. --> Then you promise I can go to the park before eating. --> Before eating? --> Yeah. --> Did you eat anything? --> Did you take anything with you? --> Yes. --> What did you take? --> I didn't take anything with me. --> And I also had to go to the park with the staff. --> Okay. --> Do one thing. --> Wash your hands. --> I'm not following you. --> Wash your hands. --> Take auntie and play. --> Come and take a bath. --> Okay. --> First, you check if auntie is free or not. --> Until then auntie will eat and then you can take it. --> You go change your clothes. --> Okay. --> Listen. --> Let auntie eat first. --> You go after 10 minutes. --> Let her have her food. --> Okay. --> Hmm. --> Okay. --> Yes, kid? --> What is this? --> To change clothes? --> To change clothes? --> I'll be back in a little while. --> Give me five minutes. --> I need a little gap. --> Okay. --> I'll be back in a little while. --> Just two days after placing my order on Amazon, --> a friend membership expedited the delivery of the Samsung's latest masterpiece, --> the 2024 65-inch frame TV. --> The best part? --> I got it for $2,000 Canadian, saving a cool $499. --> The One Connect box is a game changer. --> By moving all the ports and connections to this external box, --> Samsung has slimmed down the TV to a mere 24.9 millimeter. --> It has four HDMI 2.1 ports for the latest gaming consoles like PS5 and Xbox Series S. --> An ethernet port, a quarantine input, an optical audio out for connecting a soundbar, --> and two USB ports. --> The included fiber optic cable is only five meters long and isn't rated for in-wall use. --> For in-wall installation, Samsung sells a longer and in-wall rated cable. --> Next we have the SlimFit wall mount. --> Mounting it isn't the most exciting part, but Samsung makes it easy. --> First, attach the brackets to the back of the TV with the provided screws. --> They are too long. --> Longer screw for the use with the spacers if your wall isn't flush, --> and the shorter screws for flush walls. --> The bracket might seem loose, but that's intentional for flexibility. --> Mount the wall bracket using the provided template. --> Connect T1 and T2 based on your TV sizes, --> tip it to the wall, and mark the start point. --> Use a start finder if necessary. --> Drill pilot holes, ensuring they are level, --> and attach the wall bracket with the provided screws. --> In my case, I used a magnetic laser level to make sure that the bracket was leveled. --> The end-to-end bracket length for a 65-inch TV is 42 inches, --> which you can confirm from using the template or by measuring the TV bracket. --> I also installed a 14-inch structured media enclosure from Leviton --> behind the TV to house the One Connect box, --> with power and two ethernet cables for a wired connection. --> I prefer admiring my devices whenever possible. --> Before mounting, I placed the One Connect box in the recessed enclosure, --> connected all the wires, and installed my Apple TV box. --> I also ran an HDMI cable through a PVC flex for easy future connections without removing the TV. --> Then we mounted the TV. --> The bracket works like a picture frame. --> Without these two people, lift the TV, align the wall and the TV bracket, --> connect the power cable, and place the hook into the wall bracket. --> There's a magnetic piece between the wall bracket and the TV --> that ensures that the TV sits flush against the wall. --> So you sit there and... --> I'm trying to do a video of that, but you don't remember that. --> So you step on it, and you have to just... --> And then you look at it, and say, I'm gonna do this one. --> Oh, these are literally all the people falling over. --> Oh, that's perfect. --> I tried to do a video and... --> No, it's like you want to go around and mess it up. --> It's so... --> Oh, video, video, video, video. --> Like you just sit around this, and then you go... --> Let's do it again. --> Falling over. --> And then... --> Yeah. --> Sir? --> Hello? --> Sir? --> Hello? --> Okay. --> Brand new tiles, son. --> You have some sense of responsibility towards your house, right? --> The general recommendation for TV mounting eyes --> is at the center of the screen at eye level. --> When... --> You'll tie your hair up. --> This won't work. --> Last time, we already went to play one, --> but that day, I didn't want to stick it on them. --> I had to pull it. --> That's why I didn't want to pull it. --> You know why I love you, when you hold me in your arms? --> Because you told us when I was younger, --> when I was young, you were only five. --> Now you're even five. --> You're only five. --> I'm five years old. --> But I'm six. --> Is it? --> Okay. --> Okay. --> It's not always a term used in the right sense --> as it could be considered as rude. --> It's like a girl who's a little bit more boyish in behavior. --> Yeah, because if my friend told me that I was a tomboy, --> I would like to take football and basketball --> and keep on getting hurt. --> That's it. --> We need to learn how to just ignore... --> In the morning, in the morning. --> 11 o'clock in the morning. --> What have I told you about touching anybody's screen now? --> He was trying to get out of there, on the top. --> Blue color. --> And she's calling others. --> Come, come, come. --> And in that circle, another one came. --> It was such a poor thing to come out. --> She was so disappointed when it came down. --> Why is it disappointed or disappointed? --> It would be like... --> Disappointed. --> It would be like this. Look. --> See, like this. --> And then you see the second one join the first one. --> One and two. --> Look at them. --> One, two, three, four. --> And he was a reflection. --> It's the funniest thing I ever saw. --> They were sitting together. --> This one took off. --> And the girl took it from the back and went down. --> The video from the back. --> Try going up and down. The door is open. --> I said, brother. --> Look down a little. --> It won't come down. --> Both of them kept trying to go from the top. --> Like a human being. --> But it could've been smarter than us, to be honest. --> But it could've been better. --> He sat down from the top. --> Did you give them water? --> I gave them water. --> It's not coming down only. --> Look at both of them. --> I wonder how we get out. --> Well... --> It's 30 centimeters down. --> And the door is completely open. --> He's been sitting inside for three hours. --> How do we get out? --> How do we get out? --> What do we do? How do we get out? --> He's gone. --> The meeting has started. --> You have to charge your phone and then go out on your own. --> That's not happening. --> Will you go with your auntie? --> You can charge your phone and then go. --> Dad! --> I'll tell you a funny thing that happened in my school. --> Suri went to the real park. --> Huh? --> How do you walk the floor? --> He's OK. --> He's lying down. --> Damn it. --> Lovely, thanks for letting me in. --> Welcome back. --> Hello. --> Welcome back. --> So, welcome you guys. --> So, welcome guys. --> Uh so, you're the one who's letting us in. --> Yes, I'm thinking, the whole people that think was come to me. --> I don't see KG, I think maybe he should be joining in a while, Nishu. --> Just give a few minutes for others to be here. --> I recorded, but need to drop for a while. --> Okay. --> We can give just a few minutes. --> So now we are left with Faith and Austin. --> Faith, you're around. --> Yes, I'm here. --> Is everyone here from Cape Town, Joburg, where are you from? --> I'm from Joburg. --> Is that the one? --> From Cape Town. --> Coffee time, Faith, coffee time. --> We just came from lunch. --> I was busy with some work, I didn't get a chance to go on lunch. --> Lunch breaks are for meetings without eating. --> Yeah, they're for meetings without eating. --> It's literally the time to just get work done, I can imagine. --> It's when you are in that matrix, right? --> You're in a call while you're on another call and now you can't keep track of which calls you're in. --> I can relate. --> What was for lunch? --> For those who ate, Austin? --> Lunch is just the name of the time. --> There's no contract, is it? --> The contract is lunch break will be provided. --> Lunch is not guaranteed. --> Terms and conditions apply. --> Yes. --> You have that one hour. --> Like people say, that one hour you don't even enjoy it. --> It's just time to get other things done with people running after you. --> It's always difficult, I understand that, because nobody cares, you're in a training. --> You're not at home. --> I think you should be joining in a few minutes. --> Sure, lovely. --> That sounds good. --> Share my environment. --> Let's see as people come in. --> All right, Karamang is back. --> Welcome back. --> Thank you, thank you. --> That's all right. --> We'll just give everybody a few minutes. --> We might get one more. --> Give me a second. --> Hold on, hold on. --> Yes. --> I can't see right now. --> What's your name? --> I'll be back. --> Give me five seconds. --> All right. --> Hopefully others will just join in. --> Let me share a couple of tips and tricks. --> Where is my screen? --> Hopefully this one. --> Okay. --> If you could confirm that you can see the screen. --> We were looking at, you know, the different ways to interact with the command line. --> And what I want to share now is actually some of the common tricks on the command line that generally help when you're working onto the system. --> We saw earlier that we could like take multiple commands. --> Let's take date. --> Who am I? --> That was great. --> We could take multiple commands and run them together. --> But there are a few other things related to how to work on the command line. --> And this might come in very handy. --> Probably the very first concept is running things in the foreground and background. --> And there are many tricks around it. --> Let's just give it a try. --> If I run the command jobs right now, it kind of tells me that there are currently no jobs running. --> What it is talking about is in the background. --> Typically what might happen is some commands that take long time to execute something. --> For example, if I use the command find and I'm looking for a file. --> Now, this command can take quite some time to execute, right? --> Because I'm doing a search across the entire system. --> Now, while the command is going on, I don't have access to my terminal. --> Because the system itself is keeping the terminal busy. --> Anyone knows? --> How do you deal with such a situation? --> So which situation? --> So you want to execute a command, but you want to keep the terminal available to you to do other things while that command is working in the background. --> I'm going to say, are you executing it using a script or what? --> Yeah, not even as a script, just on a normal command line. --> So let me explain what do I mean. --> One way to explain this is to use a simple command like sleep. --> Because as I mentioned earlier, literally all it does is just sleep. --> You use this in script sometimes to just pause for a while. --> So for instance, if I ask the terminal to sleep for five seconds, you can see it keeps the terminal busy for five seconds. --> Now, this could be any command. --> Doesn't matter. --> But here the command took five seconds, for instance, to complete. --> If I did ten and replace with any other command that takes some time. --> Now, right now, the terminal is not really available to me. --> The terminal is available to me once the command is done. --> So let's say if I say a command that takes forever. --> At this point in time, if I write who am I has entered, nothing is going to happen. --> Because it's busy executing that command first. --> So some cases where we don't want to wait, we can abort. --> We saw control C earlier. --> But that's not the ideal situation. --> I don't want to abort the running command. --> So what I want to explain to you is there are things running in the foreground. --> There are things that could be running in the background. --> And I want to help you understand how to work with that. --> Step number one, just keeping a command running as you execute it, running it in the background. --> So what do I mean by that? --> I take a command like this. --> And if I know that this is going to take time and I need my terminal, I put an M percent sign. --> I want you to notice that now when I did the sleep command, the terminal is available to me right now. --> I can continue to work. --> And if I write the command jobs, you notice something is in the background and it is running. --> And whatever is running in the background might finish someday at some point in time, depending on what that is. --> In my case, I have set sleep for 50 seconds. --> At some point in time, that command will complete. --> And let's see if the job is still there. --> Can I request you to please try this out? --> This is running a command in the background, making sure the terminal is available to us. --> You might notice now the job is done and now it's clean. --> This is exactly what I want you to see. --> And Austin, if you just say five years, it's going to disappear very quickly. --> The command itself won't. --> No, that was the point. --> I just wanted to check something. --> So I'm thinking now, in what instance would you need this to be sleeping? --> Unless you're running a very long command. --> Yes, so the point here is not to you. --> The point is not of the command sleep. --> Actually, the command sleep here is just simulating here for us something that takes time to execute. --> That's it. --> So the idea is you could be running any command that just takes long, long time. --> And for me to simulate a command that takes long time is a command sleep because it literally does nothing but just take time. --> So which parameters would you use if you are running a different procedure or something? --> Would you still have to specify the time and the end? --> Any command that you execute, just put M percent at the back of it. --> The command will execute, but in the background. --> So your terminal is free for you. --> Oh, OK. --> OK, now that's fine. --> That's not it. --> You know, sometimes you'll be using commands for so long whenever you want to do something, but not necessarily understanding exactly what that actually is. --> This is one of the pieces that I've used multiple times. --> I can see it's working for others, Keruman. --> So the job kind of sleeps, sleeps and then, you know, it just disappears. --> So this is if you knew when you started the command that you wanted it to run in the background. --> But that's not always the case. --> Sometimes we just execute a command. --> And then we sit there waiting and we're like, ah, now I don't want to kill this. --> If I wanted to kill it, I'll just do control C. --> So instead of that, I'm going to do control Z. --> The difference here is it has sent the command that was running. --> It has sent it to the background. --> The foreground is available to me to do whatever I want. --> But actually, in the background, that process isn't running. --> It's just been sent back and paused. --> So I can continue to work. --> I have the terminal available to me, but I probably at some point in time want to run what's what's sitting there in the background. --> So I can use the command BG. --> I'm hoping it works the same way on Ubuntu as well. --> And you see that number one job number one. --> I can just mention percentage one. --> Run this command in the back. --> The difference now is in the jobs, it's actually running in the back. --> So in this scenario, we started a command normally. --> We changed our mind. --> We threw it to the background with a control Z. --> Keep that in mind. --> The terminal is available to us. --> We can verify something is in the background, but not running. --> Then we made it run, continue to run in the background. --> Basically, we resumed it. --> Please try this out. --> If you have multiple jobs in the background, that number will simply increment. --> It stopped. --> We run jobs to see. --> There is something in the background we can run. --> So you have a lot of jobs already done. --> Now that is number one, which has stopped their faith. --> Check jobs again. --> And it will be cleaned up. --> If you run multiple background jobs, you will see many. --> Yeah, it's gone instantly after that done. --> So now when you see number one, it's another number one. --> Few seconds, then it's gone. --> It's not going to show you the history of terminal jobs. --> It's just right here right now. --> So you will only see pretty much the current status at this point. --> All good? --> So we have seen two things at this point in time. --> Just a quick recap. --> We started by running things in the background directly. --> We also did run in the foreground and change your mind and send it to the background. --> What if there is something running in the background and I want to bring it to the foreground? --> So let's say if I say sleep on 300. --> And one way or the other, it has gone into the background. --> And the terminal is available to me. --> What if I want to do the reverse? --> Something is in the background. --> I want to bring it into the foreground. --> You can generally do the opposite. --> And now you notice my terminal is not available to me again because that command has taken. --> I can again change my mind and do control Z and punch it back. --> Do keep in mind though it stopped. --> If I want to run it in the background, I can do that. --> If I want to get rid of. --> Please try that. --> Should we please check something? --> I've been writing the background and forward. --> This would teach there, but that's what is happening. --> Back with you. --> Tell me, go ahead, please. --> Yeah, I was saying that I've been running the sleep. --> It's the part of the background. --> But now whatever under command percentage one or that does not. --> Yeah. First, write the command jobs, please. --> Are there any jobs at all? --> Two and three. --> So you need to bring that one back, sir. --> With the same idea. --> FG percentage two or three. --> Look at the number on the left side. --> Yeah. --> Yeah. --> Yes. --> Yes. --> We have to refer to the job ID. --> Oh, that's why. --> I've been wondering. --> What's going on? --> Why is it not showing? --> Okay. --> Same for faith as well. --> The jobs and then mention the job ID. --> No, no. --> Thanks. --> I asked for a bit there. --> Yeah, just do first around the command jobs. --> This is for everybody. --> Yeah. --> So you have no jobs. --> There are no jobs. --> There is nothing to kill in the background. --> You run something in the background. --> Just like the sleep with the M percent sign. --> Lead for long, like 200 or 300. --> It simulates something that takes time. --> And do that with an M percent sign. --> If you don't do that. --> Yes. --> And Caravan, that's fine. --> We can do control Z for you. --> It will run the command. --> It will stop the command. --> Throw it in the background. --> And if you want, you can kill it now. --> Okay. --> Try that out, please. --> Yeah, that works. --> And then, yeah, and terminated. --> As you can see on Caravan and also for faith. --> And for Austin, it's been terminated. --> There we go. --> So that's one trick. --> And this usually helps as well. --> So I think this is handy when working on the command. --> All right. --> Some of the others. --> Yeah, this will be very useful. --> Especially if you're adding scripts. --> Sometimes you realize that you forgot to write it out. --> Maybe into a file. --> So now it will be hiding in the background. --> Yeah. --> To make things easier for us. --> And a little bit quickly on just a few other tips and tricks. --> Also working on scripts and otherwise as well. --> Which is redirection. --> And also working on what we call as piping. --> These are, I would say, almost essential skills on the command line. --> Rather instead of, I mean, not just about what commands. --> But how do we connect the commands together? --> So what do I mean by that? --> Here is let's have a look. --> For instance, earlier we did the command, let's say, cat of etcho. --> So this is one command. --> It produces an output. --> We also know that there is another command like word count, wc. --> What if I was to do this and use a pipe. --> And then do a word count. --> Now word count normally is waiting for an input. --> Would you agree? --> If I just did word count minus l and I press enter. --> What is it waiting for? --> It says, well, what do I count? --> Give me something to count. --> If I say line one, line two, and then I do control D. --> Then it says, aha, these are two lines. --> So the point is the command is waiting for an input. --> What if I did this? --> This command produces an output. --> What if I pipe this into the next one? --> That means the output of this becomes the input of the next. --> This piping becomes very, very useful with a very specific command on the shell, which is to filter out the text, a command called as grep. --> Here is an example of what grep can do. --> Let's have a look at this file. --> We looked at the file that contains all the users. --> And there are a lot of users in this file. --> I want to filter out any user which has no login. --> That means these are not normal user logins. --> These are for service accounts, so they can't interact with the login. --> In any output, I can pipe and give it to the command grep. --> What do you want to filter out? --> What if I say I want to filter out no login? --> What it does is in the output, it only shows me those lines which contain that specific set of characters. --> Think of it like a simple filter. --> It takes the output and filters something in that output. --> What if I want the other way around? --> A reverse filter. --> What do you notice now? --> It does not show me any user who doesn't have the no login. --> It's the opposite filter, the inverse filter. --> Piping is very useful because you can chain the commands together. --> One of the very nice things to pipe is the command grep because it can filter things out. --> Show me all the users which don't contain the no login. --> Here is a beautiful part. --> Watch this. --> How many such users are there? --> So what am I doing now? --> Taking the output of this text file, giving it to the grep which is filtering out and giving that to the account. --> And what the account is going to tell me is that there are 10 such users. --> Please give it a try. --> This is a quick history of my commands. --> It's not just about executing the command. --> It's also you checking out what the output looks like. --> Let's see if that works. --> Where are the other people who are joining in some time? --> I see Austin, Faith and Karaman. --> We are missing a couple of the others. --> You are low again. --> I was saying that you are low again. --> I think you are asking us about people who are going to join. --> Liz did say that she will join later. --> And I think probably before she did say that she might not join the afternoon session. --> Can you hear me better now? --> Yeah, now you are better. --> Have you guys tried this out? --> Does it make sense what we have done? --> Yes, I have tried it out. --> So piping one command output into the other. --> And then one of the nice things to do is to use grep as a filter. --> Which is very very handy. --> Some simple examples of the same. --> Let's say ls slash etc star dot com. --> Give me a list of all these files. --> It's a long list. --> Do you notice there are some months here? --> Feb, July, April, August, June. --> So I can simply say, okay, I would like to see all of these files. --> Grep. --> If you don't care about the upper case or lower case, just you can do minus i to ignore. --> In Jan, there is only one. --> In Feb, there are quite a few. --> How many? --> Let's do that. --> Two. --> Give that a try please. --> So obviously as your use case, you will start to figure out. --> I think learning linux fundamentals is the same thing. --> You don't have the recipe. --> You have the different ingredients. --> And then as you spend more and more time. --> Then you have your own use case. --> What do you want to achieve? --> And then you use a combination of these commands together. --> You just go piece by piece. --> And then you kind of string it together for your purpose. --> So it's more about like what do I want to do? --> And what's the way to get it done? --> Cat slash etc slash password. --> Grep. --> Maybe you can just do minus i. --> Austin, if you don't care about upper case or lower case long. --> And no need for wild cards for that. --> It's not taking it as a word. --> It's just taking as a string of characters. --> You want a word, you use minus w. --> If you're looking for like spaces around it. --> Oh, okay. --> There's a long story. --> There is grep. --> There is e-grep. --> There is f-grep. --> And if you read the help of these commands, it's carried. --> Yep. --> That's the simplest way of using that. --> Very nice. --> So I'm hoping that as we are diving through this. --> Like in the morning you guys said you are. --> You have worked on Linux. --> You are comfortable with the command line. --> I'm hoping that some of these tricks are just helping maybe close a bit of those gaps. --> Or just make us a bit more productive. --> Yeah, no. --> This will help you because some of these commands, some of them will find you. --> It's been running for years, but didn't really understand to an extent of how you can manipulate it better also. --> So this is it. --> It's nice. --> It's for us. --> Yeah. --> And also if there are scripts with existing commands in it, it helps to interpret those better as well. --> And we always have the case of it's always the case of somebody did something and then you are dealing with work done by somebody else. --> And since we're all network engineers here, you know how much we love documentation. --> So. --> It's not always that. --> Yeah. --> Yes. --> You don't comment that was used 30 years ago. --> Do this. --> Well, that happens. --> Do this. --> Yeah. --> Yeah. --> Is that control? --> Which button? --> Which button to press? --> Press this button. --> Don't ask questions. --> And then you wonder like what exactly does this thing do? --> Sometimes it looks so mysterious. --> And then once you learn what it is, you're like, that's that's what it does. --> That's something amazing. --> Could be quite simple as well. --> All right. --> So yeah. --> So this again goes into the extension of your ability to be more productive onto the command line. --> Now you saw redirection a little bit. --> I'll just touch upon that as well and see how it can be handy as well. --> Earlier, what we did was, for instance, we took any command and redirected the outputs to a file. --> So, for example, I can say let's take the output of date and put it into the file. --> Now, that's a simple example of a redirection. --> But when we do a redirection, we have to think it in a different input as well as output. --> And maybe we want to split a good output from the bad output. --> Let me explain. --> I'm going to run this command ls slash mnt. --> There is nothing there right now, but the folder exists. --> If I say ls slash opt, there is nothing in there as well. --> If I say ls slash etc, there is a lot of things out there. --> ls slash var, a couple of things there as well. --> Now watch this. --> ls slash var 1. --> Does such a folder exist by default? --> It doesn't. --> What am I going to get when I execute this command? --> No big surprise. --> I'm going to get an error, isn't it? --> What happens if I do this? --> What will this command produce? --> You have a space between the var and that parameter. --> Yes, so there are two parameters. --> One command with two parameters. --> By the way, I can show you. --> What's inside both of them? --> Yeah, I'm just saying both of them. --> But the question is, is it going to execute one and ignore the error? --> Is it going to say because there is an error, I'll do nothing? --> Or is it going to give me both the outputs? --> I think it's going to give you both. --> If there is nothing on the other one, then it will go to the next one. --> So what do I get? --> I get the error. --> As well as I get the good output. --> Correct? --> Yeah, correct. --> Now let me do exactly the same thing and redirect this. --> Into a file called as output log. --> What do you expect to see in the output log? --> It will just be what you just showed there. --> Error? --> You cannot access that error. --> It was inside var. --> Okay. --> Just one question. --> Yes. --> Redirect, right? --> Yes. --> If you are using two greater sizes, what's the difference between that one and the other? --> We'll show you that as well. --> That will just append to the end of the file rather than overwriting and creating a new one. --> Oh, okay. --> I'll show you that in a bit as well. --> Just a quick one. --> Faith, Carol Wang, still with me? --> They call it as show me a sign of life after lunch. --> Same as a hostage situation, right? --> Where they demand sign of life. --> It's after lunch and I am demanding a sign of life. --> I think Faith was running to get that coffee there. --> Did you get it, Faith? --> No, I just went to plug on water. --> Electricity just came back now. --> That will be fresh in a few minutes, I know. --> Yeah, I know. --> I'll be good. --> Mine left. --> That's before too. --> Oh, yeah. --> But we are here. --> I appreciate it. --> Please ask questions or just slow me down if it is too fast. --> Yeah, I know. --> I think I was going to get it right because I wanted to answer this one that you were going to get the contents of the first part. --> Yes. --> Because it's there. --> But something interesting happened. --> Please. --> The output log only contains the good news. --> Where did the bad news go? --> On the terminal. --> Oh, that's lovely. --> I run a script. --> I capture the output of that script. --> Everything looks amazing when I look at the log file. --> Because the errors that happened just showed up on a terminal. --> They were never recorded in this log. --> Okay. --> So if you want it to be locked also, what would be the hard comment to use? --> Yes. --> You are just a step ahead of me. --> So we're going to now break it down. --> Let me stop the questions. --> No, please go ahead. --> It's good. --> So what we're going to do is I'm going to run exactly the same command in which we know that it produces a good output as well as the bad output, isn't it? --> But what I'm going to do now is I'm going to do this. --> I'm going to use the sign one greater than file one, two greater than file two. --> Okay. --> And now let's see what's supposed. --> First of all, did you notice that no errors showed up onto the terminal this time? --> Yeah. --> Okay. --> I think it's because of you. --> We have two files. --> So this is file one. --> What does it contain? --> The loud information. --> This is the good, good out. --> That's called a standard output. --> And this is called a standard error. --> Okay. --> So one is a specific identifier for standard output and two is the identifier for the errors. --> I can split and redirect the standard output and the standard error differently. --> Can I recommend you please try this out? --> Yeah, go ahead. --> I was trying the other one. --> This one redirecting it to what? --> Can you repeat that? --> Is it possible that you can run your history so that I see that? --> That's true. --> Yeah. --> Yeah, that's correct. --> So I'm just looking at your screen. --> Right. --> Lsvar var log output. --> We saw that earlier that the errors will show up on the terminal. --> Yes. --> And the good output is going into the log file. --> Yeah. --> Now if you look at my screen, I'm splitting the standard output and I'm splitting the error. --> By looking at look at my screen, my terminal, you saw one greater than and two greater than. --> So this one and two are standard identifiers. --> One means the good output. --> Two means the errors. --> Okay. --> Let me run the time. --> So do what you see on my screen. --> I'm here with you. --> Give me just one sec. --> How possible? --> Oh yeah. --> It's fine. --> So the error is on the terminal. --> Yeah, it's on the terminal. --> So that's why I can't find it. --> So that the error can be specified somewhere, can be written somewhere instead of just the terminal. --> Oh, okay. --> Austin, you can be my translator tomorrow as well. --> That's all right. --> Happy if it is clear. --> Yeah, I know. --> I appreciate that. --> So one of the things that we do sometimes when we are scripting is that we simply want to ignore the errors. --> Okay, so let's have a look. --> We saw that there are all kinds of interesting devices, right? --> Your terminal is a device. --> Everything is a device. --> There is another device. --> It's still there. --> And any idea what this device does? --> Take a wild guess. --> Look at the name. --> Dev Null. --> It is quite literally a black hole. --> Anything you send there just disappears. --> So I could run that command. --> Any command. --> Here we know that this command has a standard output as well as a standard error. --> What if I run the command and saying I'm not in a mood to seeing the errors? --> By the way, that's not how you should run every command on Linux. --> But what happened now? --> And try this out. --> What happened to the errors? --> Are they recorded anywhere? --> Are they on the screen? --> Are they in a log file? --> Or they are simply sent to a black hole where they disappear forever? --> Give that a try. --> So basically you are sending that to indicate that we are using true to send whatever information you get away into the black hole. --> Yep. --> Okay. --> Because sometimes we don't want to see all the errors coming up on a terminal. --> Like we expect to see some errors. --> We know that there are certain files which will not be found or there will be some errors. --> Which is known. --> So we simply want to ignore all of them. --> So this command you only use if you know exactly that the response from that one is going to be an error? --> Yeah, or you simply do not care. --> Generally this is done when we have known challenges with a certain script. --> We know there are some outputs. --> You know, one of the most difficult things in the Linux world in my experience is knowing which error is really critical. --> And some errors sound like it's the end of the world. --> And then the experts tell you, yeah, that one, yeah, that you can ignore. --> And there are other errors which sound just harmless. --> And then they're like, oh, my God, how could you ignore this? --> And you're like, well, how am I supposed to know, like, which error is the end of the world and which one isn't? --> And that frankly comes from from experience. --> So something sounds like, oh, my God, that's it. --> And then the experts come and say, yeah, that you can ignore. --> This is normal. This happens all the time. --> So you can retrieve them if they're there. --> Sorry. --> No, I'm saying you can retrieve them. --> Or maybe GP can stipulate. --> It's like you've recycled or recycled. --> Empty. --> Not restoring anything anymore. --> Yeah. --> OK, that one, it takes a person who understands the error, because I would want to keep all the errors. --> So that it guides me to where the issue is. --> Yes, you can always refer back to it. --> So at least now you know how to do that. --> Like, how do you take the output, any errors in the output and then, you know, keep them somewhere for the safekeeping and then go back and look at it? --> Your system on its own itself maintains tremendous logging capability as well. --> All kinds of logs exist. --> Every component, every service typically has its own logs. --> So there are all kinds of, you know, logging capabilities, which are part of the system. --> And that's part of learning as well. --> All available through the logging demons. --> So I think many different ways to see that. --> Let me see if I can show you especially on the reason I mentioned this is that there are different kind of logging. --> I would say mechanisms across different distributions. --> But generally, and also the path is unfortunately sometimes different. --> I want to show you something. --> Log, I think in these, it might be in var ADM. --> We have the var log itself and you can see all kinds of logs are here. --> For the graphical interface, authentication, kernel logs, all kinds of that as well. --> We have syslog can also be used, as you guys already know, to centralize any logging. --> So we have a couple of these different logs for different systems available as well. --> There's a lot you can do here in basic shooting. --> There are some commands that we can use and there are some log files that we have. --> So your syslog would be your starting point. --> So in terms of practical, how do you see the log? --> I will show you now. --> There's something we can just try. --> So there is this is like the main log file into an Ubuntu system. --> Some Unix machines will have var log messages. --> This is the main log file. --> As you can see here, I can't access it and I think you know the reason why. --> It's a normal user. --> As root, I'm going to try the same. --> This is the main log file. --> Now it can be a bit scary if you look at the size of this log file. --> So maybe what I want to do is the opposite of cat or more as tail. --> So tail shows you, as the name suggests, the tail of that file. --> I'm looking at the last few entries. --> If you can look at those timestamps. --> So very handy. --> I can just say show me the last five entries into that log file. --> Besides this, there are other tricks, but this is one. --> So can you try this please? --> Let's switch to root, sudo bash, and look at the last few errors into your log file. --> Again, different Linux distributions. --> Maintain logging slightly differently at times. --> I can see everybody is trying it out. --> And besides this, if you do know which log file you want to look at, and that happens. --> Different components have different log files as well. --> There's another little nifty little trick, which is this. --> I'm just going to exit back. --> I have two terminals as the same user. --> I'm a student in both of these. --> And what I'm going to do here, I'll just make sure I'm in the home directory. --> Just to make it easier, frankly, the actual path doesn't really matter. --> So let's say I create, or there is a log file. --> Right now the log file is empty. --> And let's say some errors are coming into the log file. --> And can you just try this bit? --> Then we will see the double arrow as well. --> So that's one thing. --> Did you do something that I'm not aware of? --> Are you getting an error while trying to check the file? --> Hello? --> Everybody. --> Right here, right here, sir. --> Does that work? --> No, I was asking what did you do? --> Where are you getting an error now while trying to access the log file? --> Did you change something on it or what? --> So what I'm trying to showcase here. --> Let me just switch to my screen. --> So I have a log file. --> And what we are simulating is that some error is getting recorded into that log file. --> So you might have logs for specific applications. --> Or it might just be the main file that we saw, the var log, syslog itself. --> The trouble is, any file that I want to look at. --> Oh, yes. --> Yeah, so I just realized that on the other terminal you sent that error into it. --> I didn't see that part. --> I didn't see that part. --> But I was surprised. --> You cut it. --> All of a sudden there's an error. --> I didn't see that part. --> So we're just simulating some errors coming into the log file. --> But the trouble is I am not looking at the log file in real time. --> So what we normally do is this. --> What am I doing? --> And what we're going to do now, if you look at the tail in the options, it says F, follow the file. --> So tail minus F, the log file. --> What it is going to do now, you notice that the terminal is busy. --> It's keeping that file open. --> So as new errors pop up, I'm doing this from the second terminal. --> You watch that happening there. --> And what I'm going to do, Austin, is I'm going to add to that file. --> I'm not going to overwrite that file. --> Here is a new error. --> Here is one more new error. --> And one more. --> Do you notice that on this terminal it's keeping the file open? --> I'm watching it live. --> As new events happen, I can watch it happen. --> So minus F keeps the file open, the log file open, that you can keep watching. --> So if you're running a script and you're taking all the errors into a log file, you can watch that log file live. --> Also here when you're redirecting, just keep in mind that I don't want to overwrite it. --> I want to keep what is there and just add something to it. --> Can you try this out? --> Yes, boss. --> And keep the two terminals. --> Make sure you are in the same home directory. --> Make sure you're just a student. --> Just to keep things as simple as possible. --> Austin, on one, you are as root in a completely different folder maybe. --> Just make sure you don't have to be in the same root. --> But I'm just saying just easier. --> Don't talk. --> I'm in the workshop. --> Quickly. --> What is it? --> Try that out. --> Get two terminals up and running. --> And see if that works. --> So in one, you are in the backup folder. --> Austin. --> Yeah. --> Always make sure you know where you are at. --> Karamang, are you trying this out? --> Austin, can you hear me? --> Just confirming. --> Yes, I can. --> And now from the second terminal. --> I think KG did mention that about electricity issues. --> I see she's not on the call now. --> Just give us some time. --> This is also on hold. --> For now, for the time being, it's just me and Liz here. --> A bit of a challenge. --> Is this common, power issues? --> We haven't had it in a long time. --> So, yeah, the problem is starting to get out of time. --> Austin, you're clear on what's happening now? --> Yeah, I'm clear on what's happening. --> It was actually my fault. --> You gave us instruction and I kept on ignoring you then. --> That's the price I paid for ignoring you. --> No, that's fine. --> You need to experiment also because sometimes when you make a mistake and then you realize why, then you tend to remember it. --> So it's OK. --> That is, yeah, OK. --> Experimentation is highly encouraged. --> Initially, when you're learning sometimes, then we recommend that you follow precisely what we are doing so you can see it exactly as it is. --> But it's OK. --> Because part of that, then you learn like why this is not working. --> The other guy is doing it. --> It's working for him. --> Why is it not working for me? --> And then you realize, oh, I'm in the wrong location or my syntax not correct, whatever it is. --> Just a question on this. --> Just check on this on this screen of mine here on this terminal here. --> I see it says tail lock file. --> Thank you. --> That's the same thing for you. --> Yeah, because what happened on the on the terminal on the right hand side? --> You did greater than right. --> So it kind of closed the old file and created a new one. --> Yes. --> The liberty. --> OK, let me just do this quickly. --> Now it's OK. --> OK, thanks. --> I think these guys are gone. --> Liz, is it Lizzie? --> I just from my side, I'm trying to catch up because I got a call from the office. --> Such a drop of a bit, but. --> No, I'm. --> Yeah, I'm also not not will be supposed to be. --> I just got back my laptop. --> That's all right. --> So just open two terminals as you can simply see on my screen. --> And I'll just take you through it. --> Hang on. --> Give us. --> Check. --> I'm a. --> I'm. --> You're bad. --> I'm. --> I'm. --> I'm. --> I'm. --> I'm. --> I'm. --> OK. --> OK. --> OK. --> OK. --> Take care. --> OK. --> OK. --> OK. --> OK. --> As you see two different terminals, open them side to side. --> What we are really trying out is the command tail that shows the end of a file. --> The trick here is the option minus F. --> So you can literally watch a file live as errors or data comes into that. --> You can see it. --> So on one terminal, you're keeping a log file open. --> Create that log file, please. --> If it doesn't exist, use the command touch to create that log file on one terminal and then watch it with a minus F. --> Faith, you're also in the backup folder on the terminal that you are in. --> Please take a note of your current directory. --> I'm sorry. --> I didn't get that. --> I think in one terminal, you are in the backup folder in the home directory. --> Keep the two terminals side by side if you can. --> So it's easier just the way you see it on my screen. --> OK. --> Just make this easier. --> Just restore the window, arrange it side by side. --> Hi, I'm JP. --> Welcome back. --> I just wanted to know that shortcut we did this morning to open up a terminal. --> What is the first one? --> Control alt T. --> Control alt T, OK. --> I like that we are ending with where we started. --> Life come full circle. --> Yes. --> Looks like you guys are struggling with power issues. --> I'll take there will be a Word document which contains many of what we have seen today as well as the deck, the slide deck, which summarizes the core commands and some of these core tools that we have seen. --> It will be in the same folder that could be normally shares with you through his cloud storage. --> I'll just make sure that the same link is active for you. --> So you can use that as a reference if you want to go back to these documents. --> The other recommendation I have is that you can just take the history that you have. --> Like in my case, let me go to the third terminal. --> Bad idea here. --> One nice thing is you can also open tabs now. --> You could if you want just take your entire history in the terminal where you have been doing everything you can save that as well. --> But this is just an example of. --> Watching a log file. --> Since we are. --> In Ubuntu in this particular case, there are specific commands like general control. --> These will also print out any errors onto the system as well. --> So that's a little bit of a trick on how do we operate onto the command line? --> How do we operate with lock files? --> Just keeping an eye on the errors which are going on. --> And obviously there are a lot of tools, a lot of options and over a period of time. --> Just a bit of practice and you're all good. --> Of course, we have some ways to get some help. --> As I said, manual pages is one way. --> Many Linux distributions also have something called as info pages. --> I think man pages can be a little bit intimidating just because of the detailed nature. --> Right. So if I look at the tail command, here is an example. --> I'll just do control C to close this tail. --> If I look at the man. --> I'm going space by space. --> If I press H, there is a help of the man page itself. --> How do you move forward and back? --> But man pages can be quite intimidating as well. --> Many Linux distributions contain something called as info. --> And you're considered as the successor as well. --> The advantage of man page, of course, is that also with info. --> If I'm looking for something specific, the output itself is so big that you can type slash and search for something. --> Go up and down. --> So there are some tips and tricks. --> So if I just run man without asking for help on any particular command, it says, well, what man page do you want? --> Well, what if I want the man page of the man command itself? --> That's matrix for you right there. --> And we go in and it says, OK, this is how to use man page. --> This is how you read the manual pages. --> And it gives you some basics. --> It says man page has many sections. --> It's like reading a book has many chapters. --> Are you taking a manual of a manual? --> Because how do I use the man command? --> Well, take the manual of the manual. --> But it is actually useful because it's telling me that the manuals are divided in many sections. --> Are you looking for shell commands? --> Then this is section one. --> Are you looking of help in files? --> I'll give an example. --> Password is a command also, which you use to set your password. --> And password is a very important system file. --> So now if I say man password, which one? --> It says. --> Do you now understand what that number one means here? --> Is that the first example? --> The first section, which contains help for commands. --> So what if I say, well, man minus L password? --> I'll have to read the man on man on this again. --> Here has many sections. --> You can choose this one from which section. --> So I can say man password dot and I can mention the section which is for configuration files. --> This is a long list, but minus L should have worked for us as well. --> Should print out the topics. --> Yes. --> So yes, you're right. --> It's a bit strange to be reading the main page of the main page, but it is useful to learning how to navigate it. --> How do you search? --> How do I filter what I'm looking at? --> I just tried. --> I just tried what we have the regarding the men, wherever you can specify, you can specify the section. --> I said to men, men, space, password. --> That didn't work. --> Yeah, I tried man password dot one. --> It was section one that was shown there, but it's not showing. --> No, let's just check again. --> I think we'll just double click. --> Sorry, double check here. --> Executable. --> It should be five, I think, for passwords. --> Oh, it's five. --> So, but that one had a one. --> So why are you unable to pick that one? --> No, no, that will just doesn't make sense. --> Is it? --> That's not what you said. --> That's the man. --> Okay, I'll just set your screen. --> That's okay. --> Yeah, I set my screen. --> Please. --> What did I do wrong? --> It's men. --> Oh, no, I see why. --> No, my bad. --> I typed out the password. --> Sorry, P-A-S-S-W-D. --> We pronounce it. --> It's a very bad habit. --> It's built over the last 30 years. --> And for last 30 years, people are telling us you don't pronounce that password. --> And we say, well, we do. --> It's something else. --> So for the password, it is section five, because we are looking for password, the file, the path or the file. --> Okay. --> And there is password, the command, which is section number one. --> Yeah. --> Okay. --> Thanks. --> Is it minus capital L? --> One second. --> This is what happens when you don't see all the sections. --> Isn't it man minus K? --> How come it's not working? --> One second. --> What am I trying? --> Aha, yes. --> Come on. --> Okay. --> So if you try man minus K, it kind of lists like a search in the whole man pages. --> Hmm. --> Anything to do with pass. --> So you see here is password number one. --> This is a command. --> Yeah. --> And here is password number five. --> This is the five. --> So you can search for keywords. --> So here, for example, if I search for a keyword like this. --> With a minus K. --> So this is not searching for the command name, but searching for the concept. --> Hmm. --> This might be useful to you, because I think sometimes the problem is... --> Sorry, go ahead. --> No, no, no. --> I'm not seeing anything. --> I heard somebody else. --> Okay. --> No. --> I'm hearing things. --> That's a bit scary. --> I think one of the bigger challenges in Linux and Unix is not knowing what command to look for. --> Yeah, because I don't know what is the command for something. --> So I look for what? --> Man page of what? --> I don't even know what is the command for it. --> The thing with this is most of the time you'll have to wait to use the menu. --> You just go to Google and try to find whatever you have. --> All the details that you essentially need there. --> Sometimes you find it easy to go search on Google. --> One very important word of advice for you, Austin, and everybody else. --> The trouble is, when you Google for it, you may not be looking for something specific to your distribution for this particular kernel version. --> So in 99% of the cases, it wouldn't matter. --> But in 1%, it would. --> And if you're reading forums. --> So what happens is we do what the first guy says in the first post. --> I guarantee you, maybe 99.99% of the time, no one tells you how to undo what you just did. --> Yeah. --> And then you scroll 10 pages down and the guy says, oops, my bad. --> This messes things up. --> And you're like, geez, thanks. --> So it's risky. --> Oh, yeah, that's true. --> And frankly, this is where generative AI, your chat GPTs, your deep seat, they are brilliant. --> But you do need to be very clear and specific to like this version, this kernel, blah, blah, blah. --> Yeah, because also that also some of the problems may not be exactly what you need. --> And you might find something that destroys. --> So you just have to be careful also with that. --> We'll never recommend you to make any changes to any production system anyways. --> Yeah, no, no, no. --> On dev first. --> Break things on dev and then you'll see the stuff after you've already done the backup. --> All right. --> Hopefully you can see man minus K. --> This is for everybody. --> You can search for a key word. --> So if you don't know exactly what command to use, it's very hard to get help on it. --> If I say man minus K network, I'm going to get a long list of things. --> But the good part is I see many things related to that. --> For example, here IP. --> So man minus K could be handy. --> It may not always give you exactly what you're looking for. --> Yes, in that case, a quick Google at least for the basic commands. --> So for us, that is IP address. --> I have the loop back. --> I have a simulated Ethernet interface. --> I have the V4 and the V6 up and running. --> The very classic networking command would always work. --> Next step is not here, but we can add that. --> Most distributions will have their own tools. --> IP is the tool of choice. --> And initially it might look a little bit confusing. --> But actually, instead of having 10 different commands, it's easier to have a single command and just work on different objects. --> That makes it very easy to program as well. --> And scripting becomes a lot standardized as well. --> So this kind of comes in handy. --> So these are some of your interface OS tricks that we can try onto the command line. --> And then yes, from here you try, as I said, there is a reason we believe in the main page of the system. --> Just because it matches exactly what you have on your system. --> Even a slight mismatch sometimes between one kernel and the next kernel or one release to the next release, the files can change, the configurations can change. --> Again, we are thinking more in terms of the system. --> Basic navigation and working on the OS principally remains the same. --> And it's generally backward compatible. --> So you're going to see, if I look at the root of my OS, I can see there is a link. --> Well, why is that link? --> Why is there a link? --> This equals to that. --> Well, because long time ago, 30, 40 years ago, when we wrote the scripts, we mentioned this path. --> Although the path has changed, we have still maintained the links so that even your 30 year old scripts don't break. --> They are portable. So typically they try to keep things portable. --> So even if the OS has certain changes, the older locations as pointers just take you to the newer location. --> And it makes the scripts a bit more portable across distribution and so on and so forth. --> But other than that, please look for very specific documentation. --> Linux basics will kind of remain the same. --> The moment you step into the system administration, yeah, that's a bit of a different story. --> OS basic use is just questions, doubts, thoughts. --> Anyone? --> Express yourself as the one judge. --> I just want to say I really enjoyed today. --> I thought that was part of a class. --> It was very informative. --> Listen, stop putting me on the spot. --> You first got to say Austin. --> So I had to make sure that at least I call your name. --> We're getting back at each other, are we? --> Yeah, no, today's session was very helpful. --> Because these are some of the things that we use. --> These are what we use on a daily basis. --> You always have to go to the Linux to check certain things and whatnot. --> And although you usually have our own command that you normally run, --> at least you found out you have to go to Linux to check certain things and whatnot. --> Showed us better ways of doing them. --> And also, which is more important, understanding what you are running. --> True. --> But you don't really understand every parameter on that on that command. --> So at least today you manage to see certain things like, oh, OK, I've been running this for years. --> But now you understand how you can actually be manipulated even better. --> To make sure that you get the best of what you need on that. --> So, yeah, this is going to be only for one day. --> Yes, I think the command line bit is a day. --> Yeah, it is. --> OK, I want to have some scripting at some point for Linux. --> I'm not so sure if that's down the line, but not so sure if it is at this point in time. --> So I think this day one is command line basics, really. --> Go ahead, Lissandra. --> Now, I want you to know, are we going to get any of this info? --> I saw you were sharing some slides. --> Yes, so both. --> Yeah, so there is a small Word document which contains like some command samples and output samples. --> Just to kind of summarize some of the core commands that we have seen. --> And the deck has a summary as well. --> So I'll make sure that both of these are there in the cloud storage. --> So for you to refer it any other time later on as well. --> You're meeting Kubeb on Friday. --> Well, I wish you guys very good luck with that. --> I know it's a long journey. --> And can I be very honest? --> Maybe like if I go 20, 30 years ago, you had a few choices in your career in IT. --> It used to be like you're a programmer, like that was a very separate stream. --> And being an infrastructure and system world is a very separate stream. --> And it was very clear that these paths are very separate paths. --> But the world has completely changed now. --> It's everybody's everything. --> So I know that the journey from your network into development, it's a challenging one. --> So I commend you to be for for being part of it and going through with it. --> Always good to see. --> Now, now the committee has all of us who know how to program. --> But I guess it's what the future is going to actually be about anyway, to make sure that we just brush up on certain skills. --> But now the jobs are not really like before. --> But you know, when you are working as a developer, for example, just about development, system engineering, you're just system engineering. --> Now you have to be able to take everything and work on everything all at the same time. --> So a lot of automation, scripting, it's all embedded everywhere now. --> So it's almost a core skill to that extent. --> Yeah, I wish you guys all the best for the capstone as well. --> You'll get the resources from Kubeb as well when you meet up with him. --> Is there anything else I can tackle in the dying hours of where we are at? --> The graveyard shift, as they call it. --> Yes, it is when people go to sleep. --> You need a lot. --> Too much coffee. --> No. All right. --> Faith, any questions? --> Anything on your mind? --> I just wanted to say on the file issue that we discussed earlier on. --> Remember when I asked you regarding writing, the challenge I always have is that whenever I want to have the same type of file, --> I usually just copy it whenever it's there somewhere and I'll just copy it. --> But I've never been to a point where I create it in the same format as the other one. --> For example, it used that for your shell scripting, for example, --> whether it is that as age when you create a file with the dosage, --> it's not the same as when you have the one whereby it's already an age whereby it's green in color because the one that you create is just going to be because like you said, --> the extensions are not really taking into account when you're doing this. --> It's about permission. --> Yeah. --> So what would be the best thing to do to create it? --> Because that's why I usually flop. --> I usually just go and copy for that file with each that I want that is green and then take it from there and change whatever I have to change in there. --> Yeah. So it's more to do with the permission on that file. --> So the idea here is that you can take anything and write a bunch of commands in it. --> But what you want to do just very quickly here. --> Right. --> So if I go to let's say nano my script. --> And my script is quite boring. --> It just says, who am I? --> And who was the date? --> Now, how do I make this as an executable? --> So maybe I can execute it by giving it the full location. --> River slash home. --> This is how you executed binaries also. --> Right. --> You just mentioned the path. --> But if I do that, it says, hey, you're not an executable. --> What if I mention a shell and call this one? --> What is in my file? --> But why are you not having permission to just check that file? --> So I'm just working on the wrong file. --> It's my script. --> Let me just run this under student. --> Yeah. --> Just me. --> I just mentioned the wrong file. --> So home student my script. --> You see that works, right? --> I had to do nothing in terms of permissions. --> And it's not any separate color. --> What it is, is a matter of is it marked as an executable? --> So if I look at this file, my script, what most likely people do is this. --> I want to take this file. --> Or you're just making it executable. --> Just making it executable. --> Let's see if that makes any difference. --> Stern green. --> If I mentioned the exact location now, that works. --> Or I can just call it like this. --> And that works. --> Yes. --> Can you hear me? --> I don't know why I've been muted. --> Also, I see you're having the checkbox to make it executable. --> So it doesn't matter even if it doesn't have the SH. --> Yeah. --> That matters not at all. --> That is just so that you know as a human being that this is a shell script. --> That's it. --> Yeah. --> Yes. --> I know you already told us that I mentioned that there are mixed issues on this. --> So right now I'm thinking I know the other one is executable. --> One of it is SH. --> So I think that's what usually just gets me on that. --> So I'll be like, why is this not executable now? --> But by SH it's not there. --> Okay. --> Ah, okay. --> Ah, yes. --> You have no idea how much. --> How did you receive me from it? --> And hit scratchy. --> Hopefully that's clear now. --> So you take any text file that doesn't matter how you make it. --> Just make it executable with that little plus X on that. --> Yeah. --> Once it's executable, you can call it directly or. --> Yeah. --> Okay. --> I was going to ask you, why did you have permission issues when you're trying to access this? --> Yes, because it is not executable. --> Oh, no. --> Oh, I thought maybe you're trying to see that you're executing it. --> Yeah. --> If I do this and press enter, I am saying I want to execute this. --> Yeah. --> It works because I have marked it as executable earlier. --> It was not happy to execute it. --> Okay. --> Okay. --> So if you pay close attention to the output of LS minus L. --> Just after we have done what we have done. --> You see a little X. --> Everybody can execute this. --> Before the script did not have the X mark. --> Yeah. --> Okay. --> I have this. --> I can just do scripts like this. --> It's really nice each on my side. --> Like the basic the simple basic that you have taught us now. --> The fact that there are no extensions to Linux. --> That's something that you know what every time I'm trying to. --> Whatever case it might be. --> And it will just be failing and failing so many times. --> But you don't really you don't really taught the basic basics to say like, Oh, no, no, just look. --> This is like this. --> So I guess that's the difference between doing something and knowing exactly what's happening behind the scene. --> Yeah. --> Yeah, that's true. --> And that fundamental health. --> That's the objective, frankly, of the session today. --> So I'm glad that it has helped. --> Faith, I know you said you'll be right back. --> Is there any questions from your end? --> No, nothing, nothing. --> So I guess the only question is when does this end? --> Yes, yes. --> Thank you. --> Appreciate you guys being here. --> Thank you so much. --> Good luck on your project. --> See you around someday. --> No, thank you. --> Austin, take care. --> Have a day. --> Now I am done. --> I'm going to now arrange this room. --> Every day I'm arranging this room for the last seven days. --> Oh, too much. --> Let's arrange this room now. --> Finally, finally arrange because everything is done. --> Thank you. --> Thank you. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Let's go. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah. --> Yeah.