 And I think I can pass the ball to Ivan so that we are ready to start. It's now 1201 and thanks for making the font bigger. I also see it better now. Yeah, thanks Invika for introduction. Yeah, don't hesitate to ask questions. Don't hesitate to tell that I'm not, my voice is not loud enough. So the couple of organizational issues that Invika already mentioned along with them. I do hope that you've got already some of the, that you've got already the links. And you've got the links to the notes and you've got the links to the zoom essentially if you're over here. You also supposed to have already your link to the material which is online. And on top of that I will show you if you are the links. So that's the notes. And then I have posted just recently this morning the link to the press more and the links to the demo space. I will explain just when we, when we start doing something on the show on the terminal what's the demo space is about but press more is something which you are will be asked for. So basically for the interaction with you. So you can find it from here. And then the material that comes from the GitHub repository Linux shell. So that's pretty much the two parts course. And we are giving the first one part over here. Right now in this fall and then the second part will be giving later on probably next year already in January or February or somehow. It depends on the on the time schedule. So here we will be talking about the basics basics of the Linux shell. Then what else before we continue before we continue so there will be no credits for this course you feel free to ask the. I don't know, and Rick I may know better if we will provide the certificate but manage about this as well. So but definitely no credits. Then there will be the video recording. And then you can also find some suggestions for the layout. So this is kind of over the year. So this is one of the best practices from ourselves so you can put the zoom the shell and the browser like this so I expect you that you have this material open so you can copy paste some examples. Very, very quickly and so you don't need to type everything. So now I'm talking about your layouts and now I'm also speaking slightly about my own layout so I have the browser over here where I will be jumping from one to another. So the from press them up to the material to the my demo space and that will be over here then another one that will be my main window that's over here the black one with the white font. So here where I will be typing my comments, and then there will be another window where will be the comments listed. So the problem is over here is that sometimes when the comment is very low. I don't know like, for instance, if I doing something like so that it did appear somewhere on the top of the screen. And you don't see this the comment itself but you still want to know what was the comment. And so you can see it over here and you can retire it. But that's that's not only that's not only the feature of this course another feature of this course that I have copied or make the synchronization of everything what I'm typing. And this is will be called the bash history, history of the comments that I'm typing that will be posted on my web page. You can easily also go will go over here open that file and see exactly and just copy paste to whatever I'm doing over here. That's for the sake of simplicity. Nothing else. And the link to my web page you can find on the notes. It's the lectures demo space copy. So that's the installation and initial setup. And then let's continue before we go any further, what I want to know from you if you go to this press auto shell link this and please there is the first one. Kind of question for myself and for yourself so that we know what level we are. And what is your background and based on the background I will be able to ready to on the fly to the explanation, the pair or the vice versa. So first my personal over here, the questionnaire will be will be who's what was running the windows user who was running the Mac user who's the Mac one who's the Linux user and see further. Let me open another one so I can see the screen. And as far as I see where about 40 participants. So let's expect that all 40 of us are wake up. And so it's a kind of also dies breaker. We still have a to go. While you are clicking the making your choice so there will be along with me, there will be in recall Thomas and Richard. And we are all on the list over here and we are, even if I am here on the floor I will be the speaking head but the guys will be helping you with the questions on the on the on the hedge dog side. So you can also put some questions over here or some comments over here. You will find the answers quite quickly. Okay still 35 or is everyone is already awake. Or if you missing something if you're missing the links if you're missing the link to the hedge dog. So that's the good time to get started. So anyway, the numbers are already close and I see that most of you are the windows users, then the second one is the Linux user. And they mark us the macOS users and the Linux users are the on the beneficial side in a sense that you have the native terminal you can open it you don't need to access anywhere. Any remote so that to get the to get the shell to work with. So in those users, you will have something to do. And that will be our next step. So let me show you the next one. The next one will be question, what is your experience with the Linux show, even if half of you are the windows users it doesn't mean that you don't have any experience. So experience could be yet that you probably have been using it remotely on caution delta on Triton on CC devices etc. So please give me your feedback on this. And this will give me even better picture how deeply we should go into the details. And again, when we will be close to the photo replies more or less. I guess overall we are even more we are 42. If only someone is just listening and don't want to show up on any personal etc. Anyway, so the you have already some imagination most of you 71% at least 70% already has touched the terminal so at least this black window to you is known from the point of view that it's black window that can do something, which is good. Okay, let's keep going. So my first impression. The first will be the first touch of the show. So I'm not talking to it saying yet anything about what the show. It is but still I want to. I wanted that everyone of you would get this black screen just in front of you and to get started. So, for the Linux and mock users as I told already, you are the lucky one. So you just open the terminal window. On Ubuntu. It's enough for you just press control plus T, and you will get the terminal window right out of the box. If you are not just find the application, which is called terminal or normal terminal or for the market users that will be probably something which is called the terminal as well. So just find it out and open it for you. When this windows open, you're ready to type your comments, then just wait so you will have some kind of cursor. It could be either blinking or just normal. Normal dash, which will be waiting for your prompt for the windows users. Now you will have several options. And even if the windows users you can set up kid bash or you can go for the VSL this windows subsystem for Linux. But these both are quite limited. So the variety of the comments that I will use during the course. Some of those comments and some of those main pages, for instance, monol pages, they can can be missing from those both. So my general recommendation is that you go to the some external server, it could be either SSH to any remote native installation. It could be a workstation. It could be the group workstation. It could be interactive server of your university. If you are the alt user, I suggest you are using either Kosh, or if you are the employee that you can also use Delta, you can also force a group there and then there are a few others. Please click on the link on the material so you can find what are the options. And for SSH, you can use several clients and the modern windows installations they already have built in SSH client you just run the CMD and run the SSH to remote server server or the optional you can have installed and this is also the SSH client and client and that was really famous and the most useful one before the native SSH client has appeared in the windows installation by default. And now the one thing for the alt users and maybe for the users from the other universities if you have such installation is VDI. VDI.alt.fi for instance, as alt user you can go there and you can run a native virtual desktop for Linux and you will get in the same way like in your browser, you will get the windows desktop and over there you can just simply run the terminal and use it pretty much as it would be a local desktop. So this is the very first setup and we don't make any step further before I actually make sure that you've got the terminal window open. So please go once you get to the press and let me know if you're ready to go when you're ready. We are going. Why I'm asking for this because this is the hands on course and this is pretty much a mix of theory and the practical practicalities and so every single comment that I will be typing. I'm expecting that you will be typing as well and you will see the results and then the in the worst case, everything goes smoothly in the best case you will get some errors and then you will start actually learning the things. So 97% 33 of you have replied already that you are ready to go. And still a few almost so we can wait just for a couple of minutes till all of you will be ready to go. By all of you I'm still thinking that my expectation would be that it's about 4042 replies. I mean if you are just listening and don't care much just click also that I'm ready so I can continue. While you are thinking so the rest of the, the, the last of you, then let's get back to the actual shell. Okay, so we've got this magical number 40. So let's go to the material and let's see what we're supposed to know about the Linux show. You see the black window and the whole purpose of the course and the whole idea of the course that this after the free sessions. So we will have free sessions today tomorrow and after tomorrow each will be free hours with the hands on with the breaks with the exercises and with lots of this is kind of interactive press more. Press more questionaries. So, and the first thing is my first target is that the terminal window window wouldn't become wouldn't would would not be anymore a kind of black window for you but it would make some sense and so that you would learn to use it. Yeah, you would, you would be able to see the, what's the behind this blinking cursor. So shell in the sense is just the kind of interface between you and the operating system. So shell is another one where it's just the kind of layer around the operating system which into which allows the end user to interfere and see, for instance, what kind of processes are running, see what kind of files I existing and modify them and run the launch the new processes and get some, get some job done out of this. And when you basically open the terminal, you already have a shell session. So shell is your environment. And on top of that, if you don't have it locally but you do the SSH SSH is just the connection type protocol which is used to connect to the remote server. But you're still getting the exactly the same terminal, but for the SSH. So in the sense that it's not really much different, the difference. So there are, there are some differences but you will not notice them. They are not applicable to our course. And so, and later on, even when you know how many comments you can run how combine those comments into one liners and how to use the combination on and make sure that the programs can communicate in between each other. We will also start learning about the automation. So automation and the scripting itself, as it's called in bash. It's the part of the course, but number two, that will that will be given later. But anyway, keep it in mind. So when you start learning bash, the usage of the command line is the level. Number one. And then the scripting is the level number two, but they are pretty much. They go hand to hand. So, and another one motivation. Since this course originally has been designed for this. This course has been originally designed for them. Triton users and actually because we're all of us were presenting here we're dealing with the high performance computing anyhow. And so my soul for instance I'm administrating the Triton computer over here at the University. So we said also that this, for instance, slurm batch scripts that you are using on the Triton site. It's a pure, pure bash script, and most of the slurm is actually bash except some of the directives that come from the slurm batch system itself. That's another one kind of why you better know something about the bash. So basically, let's try. Let's get your hands dirty. So let me try the first command. So I try echo. Then I open the, open the quotes and say hello bash. And then I close the quotes. What will happen when I press enter everything what's being typed over here into the into the terminal into the prompt when you type. And when you hit enter the shell will try to interpret this as a command and will try to launch this command and will try to execute it. So in this case, echo is nothing else than just the kind of print command. But this is the first comment you're ever if you are if it's your first touch of the of a shell that would be the first one. And essentially since I know that not most of you have already touched it. So that's the kind of back towards the introduction. So we're talking about shell, but I'm using the word bash. Actually shell Linux shell in general it's more than just bash bash is the born again show. It's one of the implementation of the Linux shells. There are many others. There is the Z shell that show there is the current shell. There is TC shell and C shell. So there are different ones but the bash one is the most common for the Linux installations. And that's the, that's the default one. And so many users actually use bash as such except on the max, you may have by default Z shell. They are pretty much the same and everything what we will be typing over here is probably valid for the Z shell as well. I haven't tested everything is every single comment but I'm pretty sure that will develop for the Z shell as well. But there are some differences. And we usually recommend everyone who is using try it on. And if you still a Z shell user or something, then we definitely suggest that you will switch it to the bash. Simple because for me try them that will be much, much easier for you for the bash because that's the default one most of the scripts have been written and tested for the bash and so Z shell sometimes brings some issues and just to avoid the And it's unnecessary headache for you. We recommend everyone to use bash instead of anything else. So the hands already dirty and just do not confuse you, but rather, for instance, for instance, on the next one, I got some starters for you so that you can see that actually the command could be quite complicated. Let me explain with what I'm doing over here so that to explain you what's happening is that I'm running the comments, given that some option. And I'm piping it so that means that everything what comes from the standard output of this comment will be piped to the another one. And here, what I'm doing is I'm trying to sort out the output of the disk usage command and see what's the setup what's kind of things I'm using in my home directory. So it will take some time but now it's quite quickly. That's the it's not complex at all. So in a sense that this is very, very normal common in the bash environments. And so, another one good example that I can put over here. So my idea is that you by the end of this course you will be able to read this command this kind of comments. And so what I'm doing is I'm making archive of my current directory. So the territory will be given by the viable D, I will not run it right now, but I just show you that it's possible to do. So I pipe it to the SSH I will SSH to the course and on the course I will execute to other comments. I will read rest everything to my public HTML and do the archive. And when it's done, I will go for the changing of the permissions. So again, it's not to confuse you, but it's to impress you just ask yourself, can you do anything like this with the graphical user interface or like, I'm pretty sure you can't. And this is why the terminal is kind of light in a sense that you don't play doesn't provide you anything, anything, anything like a heavy traffic, but it's really powerful. So it can do lots of things for you and later on this kind of comments and this kind of combinations of the comments we will use to do the automation of your processes. For instance, like this one is to make the backup copy and easy one with one single comment with one single hit answer and you're you are done. Okay, but before we go any further. Let me see that if you're, if you are with me or not, I will post another one about bash. Please choose your answer and say, what's the bash ease. And see that if we go back to press email request to everyone and see what what I was saying, then I'm just wondering that how much of the information you already got and how many, how much of the information you have already forgotten immediately. So you can click as many as you want. So there's the multiple choices. Choose everything which is correct. Let's say that you have 15 seconds more. Just to look them through. You can click the multiple times. I mean if you change your opinion and just click it once again. Okay, quite nice. So the answers we've got already. So here is the list, and the true answer is that every single sentence over here is correct. Bash is an interface in between end user and operator system that's correct bash is a Linux shell. Yes, it's one of them. It's correct as well. But actually the computer program which exposes an operating system services to an user or other programs correct completely so actually this kind of that's abbreviation directly from the manual page. So I wouldn't make this kind of statement myself in any way simply because I'm not in native English speaker but I mean this is the one to copy paste on somewhere. The program that provides command line interface. That's for sure because everything what comes from the prompt. Everything that comes from the prompt. And that's the command line interface a layer around operator system. That's something which is said just another words and interface. And yet another implementation of Linux shell. That's not a question, but just another words. So, to be completely correct. I have been answered so all these how many six sentences as yes, as true. So, let's continue. I will tell you now slightly about the commands. Everything about bash is running about comments I have already repeated several times, but then what kind of comments you have in there. And therefore when you log in you probably want to know a little bit that who are you where you are, what kind of show you're running what's in your directory what's the director itself, and then what's the system, etc. So these kind of comments are quite simple, along with this echo. The second one, the simplest probably something like who am I or who on the system but let's start to start with the who am I so basically it says you. What's the username you're locked in with. Then if you want to know who else is on the system. For instance, you are not on your local desktop, you are on the same remote server, you can also run who. So in my case, it's only myself, and then the root. It's only as well myself isn't sure. But then from the other channel, but then actually if you do it if you go to the course if you go to the Triton or anywhere else you will see there will be a list of 50 plus people who is running this sessions. Then, if you want to know something about system. Your name is quite simple, it just gives you one string but then if you want to know everything you'll say minus, minus pay which means your name all. So, and this will give you pretty much the information about what system you have you have Linux, then the name of the machine then the version of the kernel. Installation SMP then also the time it has been. I guess that was the one the kernel was installed never actually touch and then the architecture itself. And on the top of that, if the system is new and you are running the system diesel so to say so that's the system must be probably something three four years old or something so you can also run the common host name CTL. And this will give you pretty much the same information but a little bit more. But explained, in the sense that you are getting the basics of what kind of operating system you are running. Then the next step for you is to find out something about the, your work directory. That's the PDD. For instance, yes. So PDD girl gives you what's my path to the working directory. So and this is my home. Okay. And then, for instance, I will be using the demo space quite a lot. So I'm going to the demo space with a CD and still running PDD. And it will give you the my new path. So the new comment this CD is change directory. But before you I know I knew the name of the demo space, but if essentially don't know the name of the space. And so you can run the common LS. LS stands for listing or least and least minus L and that means least make it long. So just easy to remember long least. And here I'm seeing that my demo space is quite. Well, quite a few things over there. Just a bunch history and doing it it's quite empty at the moment, but it's become. It becomes pretty much full with a lot of files very soon. Then, if you want to know about the, what's the date on the system that's configured. So that's also good for you. If you want to know the calendar calendar, it's not on my system. So, like, for instance, if I know if I want to know what's the, it's September. It's November, November, August. So if you I want to see the calendar, that's another one thing. And then couple of other easy comments that you will find pretty soon easy. For instance, cat cats will give you the new output of the text file to the current screen. Like, for instance, I want to see what's in the bash history. In my case, I just do cat bash history. And then if you don't want to output it to your screen, but you want to just look at this and then close it and then keep your screen clean kind of. In this case, you can use the viewer, you're the most known and now they mostly use the is less and you're like less if you're less than the name of the file. And you can actually inside over here. You can already go through the line by line you can use search if you type here. Like, slash, and then, for instance, if I want to find the comment, which I have used recently clear. And so you can find over here something and then if you want to quiet you just press you, you and you are back to the normal prompts, but you can see that actually your, your screen your initial screen is clear. Another one good comment like clear, for instance, so it will clear your screen, and you will kind of start from from the empty screen. Another one, good comment is reset reset. It do both cleaning but it also resets all the settings for your terminal. Sometimes it's useful when your terminal gets stuck somehow. For instance, you've been running. Imagine that you've been running something from the SSH and for instance the terminals gets somehow into corrupted or somehow so you can use the reset and this bash will do the full reset and return you back to the kind of initial state. Okay, so there are a few of them that you already know. And then one more that I can tell you this grip, for instance, let's say that grip is very famous and very unixing one, we will touch it in more details. Tomorrow, probably even after tomorrow, I'm not yet sure what kind of material will be how I share this over the last two days, but grip is a kind of filter. So you can say that for instance, find me everything which is which has clear and let's use again bash history. And here you are, you will find all the strings that will have the clear or let's try something which is, for instance, find for me everything that has LS, etc. But that's not it. For instance, if you do the output of the comments so but let's use it in this way. For instance, I am outputting the comments by default it will give me you, it will give you the whole content of this bash history, but then if you want to, for instance, the piping and the redirect everything what comes from cut to another comment, you can filter out. And for instance, let me filter out everything what comes but I want to see only where I have used the reset. Get the only comments. For instance, cow or whatever. So if you don't remember exactly what was the comments or you can also find it this way. So these are very briefly, it's a kind of crash course among just 10 different comments. But what I want to say here is that this kind of starters that you have just seen. You shouldn't be worried about. You don't need to remember everything what you what you are saying what am I saying here you don't need to remember every single comments and options of that comments. Linux in general and lay Unix Linux in particular and you next in general has a very good dictionary is not the difference but the sets of the collections of the manuals and they can be called with the common manual which stands for the manual man. And then for instance, if I don't remember how to use cats, I can man and say, tell me about cats. And I will be giving this kind of list of what cat comment is doing what kind of options it has. And that's the way to actually not to remember everything. Anything. Of course you can find this kind of information so to get out of the cat to get out of the manual you just press Q. It's actually many programs in Linux way, press Q and you get out. So the, the thing about the manuals, you can find them on the Google. If you go for the man cats, Linux, Linux man cat or something, you will definitely find the same one was, but the benefit of this manual comments and comment is that you don't need to have even the internet connection. So they have been installed locally and they're specific to your system and specific to the version of the program which is installed on your system. Because again, the different distributions may have different versions of comments, which is normal for Linux. And so to make sure that you actually are reading the manual for this specific comments, you'd better do it on the local system where you're working. Then next one. Comments that I would like to introduce you is the when, when you want to know. Now I'm looking also for this web page. So what I forgot to tell you is that the comments that we've been running so far, you'll see the list was pretty long, all kind of, but they have a, they are of different type. There are several comments, not very many but several comments which are built in into the bash. And, but the rest of them, they're kind of external binaries so bash have nothing to do with them has nothing to do with them. And so bash is just launching them and using them as it would, as it would use any other external program. You will not notice much of the difference, you don't even will be caring much except one thing is that, for instance, city is the built in. And so if you run month CD, there will be some kind of information, but this is most probably may come from the external program. So how to find out whether this CD is external or built in you can run the type minus a, and it will tell you exactly what's happening over here, CD is a shell built in. So that means that the help CD will give you a better information. That's information which will come actually directly from the bash main page. So some of them are duplicated, some of them are not but here just for you to get the kind of impression that there are some, there are something something to remember. So anyway, this type minus a. This is something which brings you the information. For instance, here is the where this LS common comes from. And here's another version of the LS so they're most probably just links one to another. And here I also using the LS to make the alias. So type a is one comment to remember if you want to know what's behind the comment that you're trying to run. And then the same way that you can try any and you can try even the type itself, because it's also a comment and so you can see that that actually it's the built in it's part of the bash. It will be there anyway. So mine is not part of the bash it somewhere on the file system. It's a file it's a binary, then CDLS cats. That is a external comment it's not also part of the bash PVD. And actually you can see that there are several versions there is a PVD which is the built into the bash and comes with the bash, and there is the PVD which comes from somewhere else from the territory. You don't need to bother about this. So let you know, in the sense that if you ever will come to this so we you will just so that you know that this kind of differences may happen. And one more thing to remember, one more thing to remember is that during the files. So file viewing and editing. So what I have told you already about the cat. These are very simple commands. And when you put cat and then the file name, you will get the output of this file name to your screen. Okay. And then another one that I told you already it's less. You get it to the separate kind of it will be open to you as a window. You will go through the files, you will go for the content of that file you can make some such over there. You can view the file from this way but when you close it, it will get you back to the prompt and the that will be closed as such. But then there is also way to edit the files and editing the files is the subject for another lecture. You can go through them during this course, but I just give you a few good hints. So if you experienced user of the Linux shell, then probably at some point you will start using something like emacs. I'm not going into this right now it's the quite complicated program. And then another one along with the max so let's see I put it this way so I do not go ahead but I commented. So what I'm doing here, for instance, I'm running, but I'm not running anything. So this sharp sign says that everything what comes after is a comment. So I'm basically the bash doesn't do anything. So you just see that okay the command line is empty, nothing to do but everything else is just the it will go to the bash history but it will not be executed. So it's just for you explanation what I'm doing right here. And now the one option to edit the files is VI or VIM. Nowadays the modern one. So that's another one quite quite a thing. The big thing to to learn so but at some point you will probably be when some of you will become a more advanced user of Linux shell. And Linux in general, you will have to choose why which one of them you will use. I'm using the I am many people are using emacs and many are you users are using the I am. But the point here is that both of them as very popular and this is usually ongoing holy war which one is the best one. So it's just a few chairs but there is one which is simpler for the newbies for those who chose for the new cameras. It's called nano. And during this course and the next spring as well on next or next January, I guess, so that I will use mostly nano just to make sure that you're actually not being confused yet with any of this emacs or the I am. So nano, you can run it and you can see the file. You can use it as a viewer in the way, but you can also use it to edit the file. So let me see that I can some make some changes like for instance I taking out these two lines. So I'm deleting this. No, not this way. And then if I go out I click press control X, it will ask me should I modify should I save what I have done. Yes, I want to save it and the file name to save is correct. And so I'm back to my normal screen but you can see that actually bash. So if you want to use less to view the file. So these two strings have disappeared so I managed to modify that file. Which is good. So basically, now I'm normally should be able to list file on the screen with the cats, then view file, if I want it only read only with the less. And then if I want to open the file for editing, I can use nano. So that's the that much that I want you to know right now about the how to view and edit the files. Also have here a list of some comments. I have used some of them. But you will find out how to use many of them during this course, and then the rest of them you will find out how to use on your own. And again, man will be of your help, or Google will be of your help. You will see the explanation how to use them. And overall, what I'm saying over here is that the. So if kind of take away message is that the bash is about running different comments bash is about knowing these different comments and bash is about to how to join this in combine this comments so that you actually benefit. The output you filter the output you count something from the output, you filter it once again, you do some kind of sort, and etc. So that's the bash consider the bash it's a kind of environment which makes all these comments to work. It's a glue in between them. So we are now at the stage where I can ask you a few more questions and then after this press more we will have a short break. So we agreed with Enrico that we are having break every hour. And we are pretty much already one hour back. And then let's say the, let's go for the press more and see that what we have in minds. So I'm opening yet another one. Please go on your own and try to come up with some kind of reply. So what you've got after the last 20 or something minutes. Let's see. And again, you can have multiple choices over here. I mean, you can click as many times as you want if you are not sure if you decided to this. So I'm not asking anything what I have not yet told or anything which is not on the on the on the course material. And as far as we remember from the previous ones. The auditor is pretty wrong. So you must think about yourself and don't really don't really try to follow the trends. So let's say you will have 15 seconds to go through them and think a little bit. Okay, we have 35 replies. Five more. Then that at the end of the course I will also ask you that how easy is the material which comes out. And do you consider it to be basic or is it already intermediate or it's so well I consider that we are the university. So it's not sure this should not be school level anyway. Okay, still five seconds for the. So we have four people more looking at the questions, but not answering. You can see that there are 41 online but then 37 of them just replied. Maybe they have one already. Okay, let's see the answers bash can only execute built in comments. It's not true bash can execute pretty much everything what you type on the on the type on the command line. So the build all comments as well but then all the external comments bash as any shell combines other programs to make it to work together that's correct that's actually the takeaway message from this first hour. So bash is about to make the other comments to work together, along with having the provide in the building comments but the thing that's in the first, in the first stage that's the make the others to work together. The last documentation can be found on the web that's correct. It can be also on the month pages, but month pages is the way to get info about comments. Yes, correct. I was thinking to make it incorrect putting here is the only way to get in for but then. Okay, so let it be correct. If there would be the only way that would be incorrect but here it's definitely the option month pages available for the external programs only for the build one one can use help. So here is the kind of half correct half not but I would say that it's in general incorrect because some of the comments they even if they're built in but they still have the separate pages. So the common thing is that you can get with the help. More. I said, in this current way. It could be the that help provides your kind of how to say it correctly. So the sometimes the the program may have some kind of help information which is built in into the program itself. So the help that's the one which provides you exactly that information. So this is the information which is has been written by the original developer or something. So, this is why I'm actually was saying about that help is more concrete and probably more to the more to the to the point type a tells about file contents type. It's not exactly correct. It doesn't tell you the about the file contents type it tells about the file type. So it tells you, not not forget my last sentence. So it telling me about the file is. So if you're looking at the, once again, if you're looking for instance, let me try this exactly clear. So if I'm looking at the type a clear. So what I'm seeing is that where clear comes from. And here it says me that it comes from the file which is in some directory us are being. And then another one us are clear. And then in the, in the same way if I'm looking at the what city. So it tells me that actually that's a built in shell commands. So it's not a type or a sake of knowing what's the type. So this is a file called file. I will tell you about this tomorrow because when we will be talking about met information of the files but just to kind of information in advance for you. With the file comment you can see exactly what's the content of the of the kind of file so here I can see it's a binary. And this is the elephant 64 beat. So that's denied dynamical link and then also the some other what kind of shared libraries have been used. But type is giving you actually the information where from the binary comes is also scripting language that's 100% true. So we are running right here. Right here comments, but imagine that we are starting a new file. So that's will be given to you as a kind of advanced information. And let's say that I can say help and name the script help dot shell shell will be the extension of the script name and then the help itself it's a script name. And if I want to put my echo echo. Hello, into the script that will be pretty much like this. So I save it. Yes. So now you can see that I have I have helped show. And now I'll try to execute it executed. And nothing will happen it will give the error message comment not found. So the problem over here is that I need to set it to be executable. So I do it with a change more plus X. And then I want to say explicitly where from I want to execute my file. So, what are you actually you can see you, we have written, you can try it on your own as well so you have all the comments on the list. We have written the first bash script. It's fairly easy just one single comment which went to the file and execute it with a have been executed with a bash with a bash into the term. So we can fix it so that I can learn you the best practices right away. So, so you can put the she bank over here. And she bank says to the Linux system what kind of file it is. Sometimes it can make a guess but sometimes you'd better tell it explicitly. And control X. Save. Correct. So you can see that my file name became just like this. And this is already perfect bash script, which is already for the distribution you can put it to the get if you want so if you have such. And say that this is my first bash script that I have learned at the Linux course at the house. Okay, so now we will have 10 minutes break. We will give us then what time is it. Let's say that we continue at 10 past one. So no exercises at the moment you can grab stretch your legs or whatever grab a cup of coffee and then we will be back in 10 minutes and we will go to the to the processes. Okay, see you in 10 minutes. Okay, we're back. And I was just in the meanwhile, looking for the notes there. Most of the questions have been answered very nicely. I have just a few comments, comments and this the my last one my last touch when I do for the, or was it help. There was a question, what's this first line stands for. So this is so called she bank. So basically, it's by the name of this one. Sharpen explanation mark. And so that's only says that everything what comes out. So here is the Linux knowledge in this way that everything what comes out from this line and further is going to be bash grid. So in the same way, it can be anything else. So if you're using Python is Python if you're using pearl it's pearl if it's TCKL it's TCKL. If it's some kind of whatever else. So that will be the one to say that, okay, run this one and use these directives to run with the with that binary. In the same way that was the question can with bash bash run Python, of course, so you can see Python. And then say some my Python script. So and you will run the Python in the same way like anything else. So bash for yourself is just the environment which allows you to run whatever you need. So in the same way that I'm on the gallery, for instance, do I want to run for Firefox. I can run Firefox like this. Do I want to run Chrome? Or so the Chrome so you can see even the bunch of the commands actually very good tip for you right away. So to make your life a little bit easier. I'm not typing like in my case I know that there is a Chrome but I don't know exactly the name. So I'm start typing the beginning of what of the comment that I know it should call and then I type type twice tabulator. And shell will give me you will give me some options what I want to do. And very useful. I mean, every time when you are when you know what's next for instance, Chromium I press M and pressed up once again it will go for the everything what comes with the Chrome and then I And since there is no any other option except the Chromium browser, I pressed up twice and we will just out automatically out and then this command for myself. Very useful. So I do suggest for you this use this tabulator pressed up twice and it will you will start getting some suggestions that what could be the rest of the comments. So that's the one and then another one was about the SSH what's the SSH is about so SSH it's not only the program but it's rather protocol and then the bunch of the programs that implement this protocol SSH that's the way to connect from one note to another one so from computer A on the network to computer B on the network. It's not related directly to the Linux protocol is a kind of is a standard. So it can be used everywhere and every operating system have its own implementation. So have its own kind of programs that implement those protocol and to work with them, but SSH is the most common in early days, there were others, there were something like for instance, telnet, very famous, but SSH the benefit of the SSH protocol for the connection to the remote server is that it's secure connect. So in the sense SSH is a secure shell, but it's not shell itself. It's the way to connect to the server. And whenever you already established a connection to the server. And you'll get already some concrete shell. It could be bash it could be that show it could be corn shell it could be CC shell, etc. So the SSH is just a program and the protocol and putty that we are we are talking about that's the program which is very popular among the windows users. It's the implementation of the SSH protocol on Linux site. The most common that's the open SSH program. So but again has the SSH name so that it's clear what what is it about the TT why so it's doesn't have SSH in its name so it's not clear in advance but you know it's just the get another yet another SSH implementation. Let's go further. So now we will start talking about the processes. So but before I say something here about processes so I so basically when you're locked into the shell, you are working with mostly two instances. One instance is the files and directories. So you want to change them you copy them you remove them, you move them somewhere you modify them and make a copy of them backup copy of them to remove so etc. So you're working and organizing in some different structures. But then another one big instance is the processes. Process is the what's being called the process. This is something which is right now running on a system and doing something. It could be some calculations which are producing your results as complicated as some kind of calculations or it could be some simple like LS command everything, every binary, which is being run in process of running in process of executing something it is a process. And so, process as such, it will have all kind of all kind of all kind of things which I will be surrounding the process itself so each process which will run it will have a unique number which is called the process ID, it will have a, it will have, it will have some kind of name, it could be unique. It will have an owner. So there will be the working directory known to the process, then this process will consume some memory, it will consume some CPU time, and it will be able to output something to the file system, it will wait for the input from the from somewhere from the another program or from the user or will not. So it will also return you some return code when it completed. So the process actually is quite a big thing, even if you think that you have just run cat or man or clear or LS. This paradigm of this concept of having all these surroundings throughout single launching of the launch and launching of the binary. It's actually it's binds all together all the Linux programs. And this is specific not only to the bash. This is all about the Linux programs even the graphical user interfaces. And but coming back to the text mode. So when you want to know something about processes as such. So the most famous comment is PS processes. So you see that LS listing PS processes cut continuation man manual so it's a kind of abbreviation so that they can be should be there at least in the idea this that they provide some kind of they provide some kind of intuitive I would say understanding what's this program supposed to do. So PS stands for the processes. And then if you run PS you will see some very simple output. I mean the PS without any options and arguments of very simple output of what is going on right now over here, but it's only something that belongs to you. And probably you want to know something more. And just remember PS our weeks. A you X. And this will give you the whole list of the processes which are running on your system. And not only yours, but also the which are run by the other by the others. So most of this have been run by myself you can see in the first. In the first column. That's the user. Then the second one that counts the process ID it's unique. Then how much of the CPU time is used what's the memory is used. It's not close to zero but so it's not really heavy. But you can see that actually system is multi processing is not only one single process. But many of them. Then the virtual sites, then the memory sites there's often then the terminal which has been occupied. And then some other information then for instance status. What kind of rates can be suspended can be running running idling can be zombie. It can be something it can be running. So storing something to the to the file system so there. Bunch of the bunch of the statuses that's possible so the time used on the system and then the command itself. Okay. And I'm explaining this just to let you know that this kind of paradigm is actually pretty much the same works on all the operating systems. What's the beauty of the Linux. It's of the Linux terminal. I'm not talking about the some beauty of the graphical user interface but the terminal that it's kind of raw access to the operating system. And so you will see with the server with the number of commands what exactly is going on on the system which of the processes which of the files where this was what's the meta information for the files. How to how to deal with that another who takes the most of the CPU who takes the most of the memory and then what exactly is being executed and where comes where it comes from. So in this can that's in this in this sense that's the beauty of the of this kind of engineer level of access to the operating system. And so you're probably most interested about yourself so for instance myself since I am on the graphical user interface so I'm locked in. So you can see that actually have lots of other processes running. Not only bash itself and not only couple of the fire foxes but everything else was giving was making the normal environments work. So you can run it also on your own system. If you are locked in, you will probably I mean if you are locked into the local system with some graphical user interface whatever it is. So you will most probably see a list of pretty much like I have but if you are SSH to somewhere you will probably see just the other SSH sessions and the other processes running by the other users and yourself there will be just a few of them. Okay, then PS is not the only one. PS is the one of the most useful text output but then interactive one. It's the top top that's the one which will give you kind of interactive mode and we will be updating every five seconds and saying your what's going on in the system because system is alive and every single process. When it's leaving, it can be stopped, it can be finished or completed, it can be in running stage, it can be suspended stage and so and all this information is changing all the time. And some processes are going on all the time some processes are sleeping somewhere somehow so you never know what's happening and top gives you kind of the snapshot every five seconds. You can change this parameter, it can be every second, every two seconds, every 10 seconds, etc. So you can see it from the manual page, it's going to give you the exercise spot but it will give you pretty much the same information like PS but in slightly modified format. But on top of that it will give you also a summary, a good summary that for instance that for how long it has been running the whole system. It's out for the nine days. It's actually another comment I will give you shortly after time. It will give you exactly this line. So it's a number of tasks, how many of them running, sleeping, what's stopped, any zombie, then CPU usage, memory usage and so everything what you want to know about the processes. Top and PS, these are the two famous because they're installed everywhere and then kind of if you looked into some cost out or at your university anywhere else, you must be pretty sure you can be pretty sure that top in PS are there and you can use them to monitor the processes and to monitor the conditions what has happened on the system, but then there are some other more kind of modern implementations of this process monitoring programs. Yeah, right name for them. So for instance, age top, it's became more or less popular in the last, I don't think more than five years, probably five, maybe slightly more years, but it's became popular because of the kind of more beautiful interface and so that it will be able to show you the status of every single CPU. For instance, here it's important for me that how much of the memory of used and what's the swap, and then I can see that what's the eight CPUs, of course, they are the virtual physical only four of them. But anyway, so I can see that what kind of usage of them and so no one of them actually running at 100%. I can see that actually most of those resources is being eaten out by my zoom session, where I'm reading this lecture right now. And then my current XRK installation. And so that will also give you some kind of list of tasks. If you don't have age top, then just you can have it installed. If you're not administrating your own computer, you can ask the system administrator of your network to get it installed. But this is very useful. We have it installed, for instance, on the Triton and then age top is installed on all the outer workstation by default. Then another one is ps3 that you may find useful sometimes. Let me explain what's happening over here. ps3 gives you the tree of the processes. Why it's good, because every single process, when you, for instance, login with the SSH, then you run some process within the SSH, but then the shell itself will be a child of that SSH process. So you can see the exact structure, which one is owned or which one is child and which one is parents. Sometimes it's useful, because in a sense that you can get the information from if you can, for instance, your child processing stuck somehow. It's enough if you tell to its parent that please be kind and kill this guy. And actually you can kill the guy for the parent process. And so the, even if it's not responsive, you can still, we will see just in a second how to do that. But just make this point to yourself that every single process will have some kind of parents. And from the system point of view, there is the common parent for all the processes in the Linux, it's called init. So init, that will be number one. You remember the ps command. Yes, so the AUX, sorry. It was very first one. So here is the one. It's the kind of parent of all the rest of the processes. So basically if you're trying to kill the process with the ID one, you will be killing the whole system. Everything else is probably, it will try to survive, but then init itself, it will not. Okay, let me also see what's happening if I do the some kind of, I don't know, like for instance, user. Yeah, let me explain just in a second what I'm doing over here. So I'm see trying to see the tree of myself only in more or less compact way. It doesn't tell you much over here. So it does not need to. But the thing is that you're getting the processes and their process IDs. So I will not go deeply into this one. But the idea over here is that when I see the parents and when I see the parents ID and then the child ID, then I can start doing something about these processes. The process ID. Again, I've seen it. I have shown it you with the top with the age top with the PS, the process ID is the one to address that process if it's behaving somehow, not the way you want to. So let me say that if I want to, if I want to do something. How am I explaining over here working with the processes. So if I want to do something, if I want to, I'm not talking about modifying the process. Of course, you cannot really modify the process or let's say I put it this way so from the user perspective you can kill process you can suspend the process. You can put it into the sleep mode. Kind of, you can reset them or restart them. You can really nice them. So you can put the kind of making more nicer so put the priority lower or actually you can make the priority even only worse as a user itself. But the whole thing, the most probably what you will use with the processes is the common kill. So let's say that I want to kill something and I will not kill anything right now but here I kill and I put some number. And number that's going to be the process ID. So if I want to kill my zoom session right here right now. So I kill something like this is probably a child it's probably will not kill in the whole zoom. But then if I want to kill the whole zoom. I probably want to kill this one. Oh, it has too many processes. Okay, so that's the parent one. I will not do it essentially right now. Otherwise, I will just disappear from the screens, but if in case something goes wrong. So you don't do it either, please. Otherwise, otherwise you will kill your zoom so try to do something else. Something more smart than I'm doing right now. But anyway, so the what it will happen, the system will simply kill that process. It will allow me to do this because I'm a normal user but I am the owner of that process. It will not allow me to kill any of the root process. So it's safe to say that kill one. Yeah, kill in it system will not allow you to do this simply because you're not the owner. You're not the owner of the unit. So the only owner of the process can kill it. And the only owners, how to say the only users with the privilege privileges of root or privileges of let's say administrator in case of Linux we are talking about root can kill anything else. So that's important. I'm not go any deeply right now. So I'm not going to kill anything. I will do the killing with the next one. With the next one when we go through the concept of foreground and background processes. So let's have all these kind of normal processes which I run on the system. Let's do not touch them so that we do not interrupt really our work. The only thing that I wanted to mention also, you remember I said, PS3, PAO, and there was the user. I didn't mention it's exactly what states everything what starts with the dollar sign in bash is considered to be a variable. There are different types of variable. We will cover them to some points or actually better if I tell you something right now because probably my variables section will go to the spring or to the January. So that's going to be in some session. So now I'm telling you as much about the variables is that they can be already pre-installed, press it up for you. So you never, even if you haven't set any variable right now, anything just trust me, you have a bunch of variables which have been set for your session on your behalf by the Linux system. So they can be built in and most common all these capital letters variables they are built in. So there's like user, home, PDD, that could be lots of just nothing comes to my mind right away. But anyway, so in the same way, there is a bunch of variables which are specific for your session. And one of them is this $2 signs. Actually, it starts with a dollar but dollar signs and double dollar. It tells you to be your process or the idea of your current bash session. So this is my current bash. And then if I go for the best Alex and if I rep the outputs and say that I want to copy this one, it will give me exactly. Okay, so here is my guy. And I see it's my bash session and etc. So I can even see that ps3. Let's see if I will be alone. No, it's not what I want. I don't remember exactly the syntax of ps3, but it's probably yeah. So it's probably like this. So if I even say, yeah, I will give you, it will give you the more advanced information about what's happening in my concrete bash. So that's the kind of kind of that's the kind of thing that I want to show you that when you know the, when you know the ID, you can get information about the child's, you can get the information about the child of the child's. And then you can get the whole structure and which one is using what and which one is running what it will be part of the exercise. But before we go for the exercise, I will have yet another one pressing for you. So I want to see what exactly you've got. And then I will get back to the foreground and background processes. And then we will go for the exercise exercise will be quite alone and I will expect you to do the, a lot of things, and based on what's, but we are not any harder. We are not in a hurry where we are very good on time. Let's see the press more. And that will be the press more, which is called processes. And that's this one. So okay. Now let's see what you have learned from the last 14 minutes, maybe less, because we had 10 minutes break so it's happening almost. It's again it's a multiple choice question. So you can choose as many as you want. I mean, choose the ones which, by your opinion are true. And then we will see, let's say that in 15 seconds, we will see that with me read them. But the first question, I didn't tell it explicitly, but actually bash use the process. So any binary which is running on the system, any binary in action process. So you can click it if you haven't. That's my fault. So the answers are coming, but we're still waiting for seven, or maybe even 10 more participants to reply. So eight to go. Choose something I mean, but it's not well let's wait for the remote list. So I do expect that those people somewhere around. I see that on the list of this on the zoom list five of us are dealing with the course and the rest of the people supposed to be the course participants. So we are 42. Let's say 41. So four more. Anyone, but don't do it twice. That wouldn't be okay. So let's say that 50 seconds are off. And so let's say that you got it already. Quick reply. So bash. The first one was bash is a shell. It's environments, but not the process. It's not correct. It's not correct in the sense that it is a process. So every single binary in action is a process when you run. So, and the all it has all the attributes of the processes and the bash itself it has all the attributes of the processes so it's can be. It has the process ID. It will have the return complete the return court on completion, etc. Every process has a unique process ID ID that stands for the process ID. Yes, that's correct. So everyone has a unique process ID. It's the numeric from one and up to the something millions if it's really big system. Every process has an owner. Yes, that's for sure. But the that's not going very deeply into that but actually if the process loses the owner, then this process is called zombie. And this is process to be killed. So I would say that more correct question would be every normal process or regular process has an owner. So that's correct. Yes, you ask w list all the processes running on the system that's correct. That's the, well, all the process that you can see, there are still hidden ones, but all the process that you can see. Each top lists all the processes that belong to the user. It's not correct. Each top is just another monitoring tool for the processes. It can list pretty much what you ask for and can list you all the processes it can list you only the process that they want to the current user or that the list the process that belongs to any user. So you can sort them out you can get them out and you can organize them in a way you want to. So I just hope it's just the monitoring tool. It doesn't have the limits. The user can stop kill any process with the kill commands. It's not correct. As I said, you recently the kill command only work with the processes that you own. So that's the security issue. So there is this since that's since the Linux system is a multi user system. A multi user system can have multiple users inside. So but again, these are multiple users. They are limited in the sense that they can only see what they do. Of course, you can see the processes which being run by the other users, but you cannot really modify or interfere with those processes. You cannot kill them and you cannot reassign them. You cannot see the memory pages which are dedicated to those to those processes, etc. So that's the thing to know that you can kill only your own processes in this sense. The secure the Linux is as secure as the, as the kernel is doing good with this kind of things. PG grab Firefox list all fires for process on the system. Actually, I didn't mention the PG grab. So that's the grip but for the processes, it's good that it has been over here. So let me P grip and say that I want to bash when so I get the bash ones. And then if I say Forex, Firefox, Firefox. And then I will get the Firefox. Yes, I cover the this statement is correct. And it's actually since I didn't tell you anything about that so I shouldn't have expected that you would be able to answer this. A command executed in the shell is a child process of the shell. Exactly. So it's actually child of the process which has been it could be child of the bash itself it could be child. You remember we just tried this one ps3 of the bash system. And you can see that every single program that they have even the one that I have executed right now. It, it was the child of the initial bash of my bash session. So my bash session was this one. And that the yes. So there is this quite strong hierarchy in between a strong hierarchy in between the bash in between the what's the initial process, what's the child process, and what's the child of the child, etc. So and so this is why you can build this kind of trees and see which ones, which ones comes after which one. And actually every single process also knows and has this environment variables, and it knows which one is belong to the where and can yet another one environment variables, you can have this and the comment that gives you the list of all the environment variables which have been set for you for by the system. So you can see a long list. And this home user shell is only the a few that you probably will ever touch, but the rest of them will stay only in use by the only in use by the system itself and by the programs which will run. Actually, we will run and we will use also the path at some point. This also important point, but the rest will be more or less, more or less somehow somewhere hidden from your eyes. Okay, I'm getting back to the material. If you, if it happens to be good questions somewhere, we will also go through them at some point, but let me first come back to the normal material and then we will also see the questions. If there will be the question related to what I'm speaking of, then definitely we will touch them right now. I was about to tell you about the concept of the foreground the background processes. Well, being a multiprocessing system. But multiprocessing, it happens not only only on the system level. You remember with the PS or with the top comment, you will see the lots of hundreds of the processes which is running on the system. But again, also multiple process can be run within one bash session or within any shell session. So potentially difference between them, there could be only one for a ground process that will be that's the one which is directly connected to your screen and keyboards so the one you can interact with. But there can be multiple background processes, and you can change them. I mean the background process can come to the foreground and foreground process can go to the background and still be being executed. It can be demonstrated for you. For instance, what to know, what's the best one so if I'm running the manual, if I'm looking for the manual, yeah, say that I'm looking for the manual of the PS commands. It gets my screen. I cannot do anything else except looking the manual of the post PS command. So I cannot run the other comment right now I cannot switch to another screen or something if I'm not using any special tools so I'm talking about this concrete session of bash. So what's happening right here is that this process is running in the in the foreground, but then I can send it to the background. Say for instance, I have found something nicely. Okay, there is very nice commands that allows me to show a process tree. So it's a kind of PS tree but let's see that I can do it with the PS as well. I can of course get out of this man with the queue and close the session, but I can do better. I can send it to the background. Say the control Z. Yes, and then type BG. So BG sends this man to the background. So I'm getting my foreground back. Now I can use my PS that I have copied from there. See what's happening. I'm being impressed. So this is exactly what I wanted. So that's full list and the tree directory, etc. Very good structured. Okay, but I still have my man running. And I still might have the man running at exactly that point where I left it. So how to take a look at this, there is a comment called jobs, jobs will allow you to run and see that what kind of programs are running so I have something stuff which is running for the course. It's the RC comments so don't pay much attention to that. But in your case you probably have nothing else than man. And I have it also probably here. So in case I want to return the manual PS to the foreground, I'm saying here please give it back to me for a ground. And voila, I will be back to the process in exactly the same point where I left it. So that's the idea that you can jump in between the processes there and back there and back. Okay, so, again, control that it's suspended the process. And if you want to to to continue it you're running BG, and then jobs is to list the stop and then let me see another one. So I still running this man PS in the background. I can see the bash history, or the less less again it's getting my screen. It's getting my keyboards, I can do anything else because this one is that we connected to my to my screen and keyboard so it's in my phone account, but I can do the same trick I can send it to the. I can stop it first with the control seat. So control, any control button plus that button. And then I can send it to the background. Okay, so, and now if I run the jobs. I can see that actually there are a few of them running. If you're one is running for myself and then if you have them staying stopped in the background. And I can get back to the original for a ground anytime I want. So if I want my last back. I say that, okay, put me number three back. So here is the number of my job. If I want just the man back, give me man back. And again, I am putting it back. For the background. Well, continue re initiated. You're of course, you kind of if you just stop it, it will be says will be will be stopped but I mean, in a sense that if you, for instance, if the program is doing something like copying something or it's graphical user interface or et cetera. So you can make sure that actually this way it will run properly. I can do the one. One example, for instance, Firefox or let me run the commune once again. So I will do it like this. Some found interesting demo effects. Okay, I will not be installing anything right now. Well, but we definitely have some kind of calm installation over here. Okay, the effects are so let me see the Firefox but I'm just wondering that the Firefox is already running probably it will ask me for some others. Okay, I know, sexually it can run the double of the screen so I can see that you see that the Firefox is here. And it has been automatically put to the jobs as well. I know the Firefox is even more sophisticated so another one demo effect, it will just go go automatically not to the foreground but as a process. It will not go so deeply. Firefox. That's not an address. It's not the anyway. Let me do it this way. Let me continue with demand and less. So if I want to send the process right away to the background, even if it doesn't make much sense with the list but I want to send it to the background right away. I put the unfair standard variance. It says to the bash but this process that this process should be launched and should be sent to the background. So you can see that actually this kind of number of jobs has increased and there will be now to less comments, which are doing the same simply because bash will run it independently in the background every single time. What's happening over here is that I can come back to any office if I want to return back to the number two. Okay, I'm getting number two, sending it back. Then, if I want to see the number three. Okay, I'm getting the number three, but then I don't want to see it again. I send it back, but then how to kill one of the process. You remember promised you that I will use the kill command that will teach you how to use kill command with this foreground processes. So knowing the numbers of the foreground processes, I can kill them already from my foreground, foreground prompt. I don't want the number four. I kill it. I don't want the number or let's see what's what has happened. So you can see that this has been terminated has been killed. And then the next time I will see it. It will just disappear. So the next time I will list it, it will just appear. So then another one, I want to kill the number three. And again, the next time I it's has been executed with the exit code 15. So which means the termination. And then I still have the last one to go. And in a sense that if I get this one back online, I can easily quite it with the queue. And you can see that actually it's not anywhere anymore. So getting the process back to the foreground from the background and exiting it correctly from the normal in the normal way is also the way to kind of get rid of the foreground processes. So just be aware that this kind of techniques is very well working. I mean, it's very efficient. And on top of that, you will start using it. I'm pretty sure quite often when you get used to this. At least I do it pretty often. So it's quite okay that you are from the same. Let me put it this way. So most of the people probably will just start another one terminal. They will have just a bunch of the SSH session to the screen to the same server, and they will do and they will jump from one to another. But I mean, one way to to avoid this kind of situation is to use this to use this efficient system provided by the bash and use them for a ground and background jobs. I will not go yet to another one thing. I was about to tell you about the screen, but I was thinking that that better spend time now on the break, I guess. And then I want to give you more time for the exercises. But if you watch about one very nice, very nice looking, very nicely written utility. It's called screen, or there is the kind of newer program screen. In many cases, it's already deprecated, but I love it. So I still haven't installed everywhere I'm working so I'm used to this and kind of old school. And this is why it's still on the course page, but probably for the next year already replace it with the Timux because Timux. This has became the standard de facto nowadays for the systems and screen is a kind of outdated, but Timux is just the version of the. It's the branch of the screen itself. So but the idea is, is the same for both of them. And let me explain what's happening. So knowing something about foreground and background processes, you're already stepped further from your just simple prompt. So when you know that there can be many processes and some of them in your background, but you're still under your control. Okay, that's fine. But whenever you look out from the system, if the system is configured correctly and everything is running smoothly, every single process which is child of your current bash will be killed when you are locked out from the system. All the child processes and the SSH process itself will be killed. But then there is a way there is a way to actually stay on the system while not being locked in and the way is called utility like Timux or screen. So what to I only tell you, I don't even go to, I'm not even going to demonstrate this. I mean, it will be left to you as a kind of homework if you want to play with that. But I definitely need to mention that because screen will give you an option so you run a screen. And then, for instance, I want to create some screen, some, I don't know, test bash, and you can run without anything else just normally test bash, and I will go to a new environment. So that will be completely new environment. And the issue with that environment is that it can be detached. If I press control A and D, and then I can see, for instance, screen, screen, I was, and there would be process, which is running completely detached from my current session. And if I log out from the system right now, imagine that I would be SSH, I would have SSH. This test bash would stay there. And I can come back to this any way I want. So if I want to say that please give me the last screen I've been running. I just run it like this screen RX, and I'm back to the, to that screen. And so environments are different. And you can run as many as you want the screen, screen session. So what I'm doing usually, so it's nothing to do with the foreground as such, it's the, again, that's a different program which does this in a different way for you. But the idea is similar. And the idea is that this detached screen process will also stay as an independent process, even if you kill your SSH and bash session. And this is of very, this is very beneficial in a sense that, for instance, what I'm doing often, I'm working from home, for instance, on some server. And I have open terminal. Yes. And then what's happening that when I'm moving back to the office, I still want this terminal back because my work is there just in the beginning or maybe in the middle, or some process of going in the middle. And so what I'm doing on that server is that I go there, I run the screen. I do all my work within the screen session. I detach it when I leave it home, when I leave from home, when I come to the office. I start exactly the same screen session from my office computer, and I'm back to exactly the same stage of my work where I used to be when I left home. So that's perfect. I mean, you will find it useful. But I will leave it to you as a home exercise. Just remember, play with the team hooks or screen. They're the same, but you will have very good tutorials. I'm not going in deeply right now because the screen itself and team looks they would have, they would probably require full hour, probably will have to organize it somehow because that's really beneficial for the Linux users but it will be part of this one. But I can't stand really not mentioning this. Anyway, now we are at 1403. So let's have another 10 minutes break. And then we will be back at 14. Let's at 1415. Let's let it be even slightly longer. And then we will go for the exercise exercise. And then for the explanations of the exercise. And then probably we will be done by react work already pretty much. So it's the, it's the I've been muted. Yeah, so we're back again to the system. And while before we go to the exercise. So let's see that the what kind of questions we have got on the on the Linux shell basics notes. So there was the interesting one about the yeah I understand the screen is a bit confusing. So you actually you must use to this. In a sense that it's the whole concepts that of course it's changing your paradigm of using the straightforward but again this is the really efficient. And I can't tell you anything else, except that I would definitely recommend you to try it. Maybe spend some time 1015 minutes try to touch retouch and then try some project and put it to the screen and you will find all the battle next. I mean, it's not perfect. It's not sure any problem with everything what you want is is working there perfectly like for instance scrolling you will have to find out how to use the scroll over there, but you will find it out. There is lots of interesting material on the Google. And by the end of the day, this is one of the utility which is kind of my situation is more or less in the daily use. And they were talking about efficiency. Then regarding the foreground and background issues. There was a question about what means stands for the plus and minus remember that you were there were plus and minuses alone with them so plus one is the one which is the default. So basically you can use the foreground process again, like for instance if I say something like PS and send it to the background, and I can get it back easily with the foreground. But again, if I run the foreground without any number without any number over here that will be the one which is was which is listed with the with the plus. So I by default I will get my. I will get this body background process which is with the plus. So that's a good question. Sorry, I didn't mention this. And then the minus will be the next one. And there was also avoid a screen within a screen. I don't think there is a way to avoid this. Let me try on the screen. Yeah, there is no way I mean you can run the screens. I have never touched it myself but actually you can run the screens within the screen sense so they will be just the one one inherited by another. So no, no way to avoid this actually accepted you have to follow this and there was also the question how to kill this the most efficient way you just go to the screen session. And you close it, and it will be killed automatically so in case of like if I'm doing it from the. Yeah, then I just do the exit normally exit, and that's done. Yeah. And so I don't have any screen anymore left anywhere. Well I have it over here, but this is the couple of other, which drops around actually this one which I have just run over here I don't need it. There's another one. If you don't really care about what's the return code of the program. You can use this X screen minus X minus X that says that please execute this comment within the shell of that script so I can kill. There's nothing important in there. So my one is killed. You can see that team LS has been killed. But again this is a nasty way. So if you're really taking care of the processes which are running within that. You can create session so it makes sense to do it nicely and you go to the screen and you exit the programs in there and you exit the bash and this the way to create now you can see that I don't have any. Yeah, but that's if you don't care that's also the way or if you think about the automation so that's also the way to do the automation. The screen is really if you go to the month screen. You will see I mean it's lots of different features and lots of different kind of things that you can work and you can do this division of your of your real screen and you can jump in between them and all the whole keys etc I mean it's it's something to that you make that makes sense to pay attention to. Yeah, but let's spend time now on working actually so the exercises. I will give you 25 minutes. I was about to give you 30 minutes but now I still want to have 15 minutes to go for the exercise at the end. So exercise one one. Just a few words I expect that all of you will be able to do those first ones which are not marked with the star. Star is the kind of advanced and that means that if you're done if you're quick enough with those ones just continue keep running. Keep running and you pick any of these ones and try them if you're done then pick another one and try them, but then at least all of you I expect that you will be able to already do this. These ones. Okay, let's go and you will have at least 25 minutes and I will have the press more also on top of that, which will ask you about the exercise progress. So whenever you are done with the exercise progress just click I'm done so that we will know that what's the percentage is is done and so that we will see that we will have enough time on maybe we will just finish it up earlier today and we will leave less time tomorrow for the exercises. Let's see. Okay, now it's going on and whenever you are done click I'm done and be happy or not be happy. So let's go. I have it open also over here and I will follow the, I will follow the exercise progress on the other screen so don't worry. I see it anyway, just click it. I mute myself. And if you have any question please type them to the type them over here to the notes and we will go for them and I will now focus on the notes exercise. I guess all of us have muted so just keep going then. And this again, what I said about timing so it's 25 minutes. Let's get back to the terminal. And so some of you are still ongoing process but we have just 10 minutes left just to be on the schedule. No so so next time I will try to give it even five 10 minutes more. The exercise. You can also put it to the to the notes. I mean if you feel like time is not enough just give your feedback and so that we know. But let's now go for the exercise 1.1 it doesn't take that much time, at least the basics ones. So the first one was about to get to know about yourself system etc. So you remember this who am I. There's really not the one comment called ID. So ID give you way more information. So for instance if you want to see all the groups where you are belong to then your user ID, then group user ID you belong to and so lots of other information. So the host name host name. I give already host name CDL that's the system be common to which gives you information about the system and total but host name gives you the name of the system you are on CDL gives you the information about the so it's my kind of top at work. And about shell that was correct answer echo shell. So that's another one why they go which is set to you by the environment. You can see that I'm using bash. I suggest that you are using bash also. The rest we have gone already so there was a remark on this exercise on the very first so that for all the users we definitely recommend bash and in order to change it so you go to SSH course. You first go to the SSH and then when you already logged in, use this common change shell and say exactly explicitly what you're up for and say that would kind of show and this change will be copied and replicated around all the out of the Linux systems within next 15 minutes. So that makes sense to do it and so next time when you log in you will be already on the bash. Next task find out with man how to use top PS to list all the running processes that belong to you. Keep top husband. Okay, so you could use man. I don't need it because I have it already in mind but then man. And then you will see some information. So, for instance, or search for the money slash and let's say user and then if you can see exactly here what's how it's been used, but then you can also see if you click and you go further and it will try to find for you all the search word whatever it is so and the minus you yes that's a filter for the user, essentially, and then how to do it's online online online online online. Is there. Is there any button. Yeah, well I know there is a button that I know I just can tell you to stop. But anyway, so let's say that I want to find everything what belongs to me. I can put essentially my own account name, but you can do better in sense that if you're working with your own, you can use this system variable which is also your account. So, in this case I'm getting the top to show me only what I have to run on my system so otherwise top will try to show you every single process including the roots and all that is. And if you are somewhere else, which can be very long in the same way PS PS is actually a bit cryptic so I would say that it's way more advanced program and complicated in the sense that you can use the minus you as well, like user yeah. And you will get the all the. So, how to explain there is a difference between the ID and effective ID. So effective idea that's the one which is probably I don't want to explain it right now otherwise I will spend some minutes to explain. So anyway, with the PS you can request both and the effective and the normal user ID, and you can even say that in what kind of format. So please go to the top month page and see what's the difference and then if you're still wondering what's the what's the difference between minus you capital minus you small, you can go to the all some Linux top level documentation and see what's the effective idea and what's the regular ID is so I'm not going deeply into the explanation right now. So, so now this case also top since it's interactive command so you can see by default it will give you everything and myself and then everything else but you can also requested for me here if you click hot key. You, it will ask you what exactly you are once you're up for. So I can say that okay, please give me only this user. And in the same way I can tell me only the root one, or you can tell you can ask whatever you want to. So this is kind of odd keys within this top utility. Okay. I'm down my system. So find your shell session ID with the processes tree of child process belongs to your current session with the common one and the user. So I know PS tree. So that's the best common to see the trees you can do it also with the PS you can do it with the top we can do it with the age top PS trees known to be the best to do this kind of 3D format. So what I'm using looking for I'm using looking for the my process ID. So my process ID that was part of already part of already the tutorial is that to double dollar science that will give you the process ID of your current bash. So you can check yourself out with the PS, a UXW pipe. And then if I want to grab it and grab it and let me grab this one. So yes, that's bash. And then let's say that I want to do this guy. I want to see what this guy owns and what it comes from. So I see PS tree, but PS tree gives me just the basic format if I want to see also the process IDs, I put P. Then if I want to see the oldest advanced information and user information I also put a little bit more on the arguments line. And here you go. I'm getting the older commands and my user etc. So here is my whole tree of my current session. Okay, now we've got this one. Next one is fine with the P grab list of bash processes. If you have SSH, SSH, both local and remote server. So P grab, this is kind of combination of grab and the PS within one command, but slightly different format. So anyway, in this case I'm doing like simple like that. And then I must know some kind of if I want to know something else is there. The pattern is normal only match the process name then group will be it is there kind of long list list the process name as well as process ID. So at least the process name is minus L minus a is the full command oldest. Select only the oldest parents. Okay, parents or PAL, capital PAL, capital PAL, P grab, capital PAL what we get. It's not exactly what's expected. Okay, it's expected some number. Okay, whatever. Anyway, so here I have the numbers and I guess I would expect also the full path but it's not here. Anyway, you can go to the manual of the P grab and see what's given the exact same attention so but you can get it with the PS tree you can get it also the PS, but it's just the simplification of your life. If you go for this, you can quite it out. Basically, whenever you know the idea of the process, you already the king of the situation. So you can do whatever you want to to get the out of this process information PS has very, very kind of long format and so you can get it. File name, set it to the background return back to the time and quiet. Okay. No, no, I'll name a little bit best file. I put control X to save it, say yes, yes, once again. So now we have it over here. So let's open it once again. And now the task was to send it to the background. I press control set that it has been sent and send it to the background with the BG columns. Now I can see that it's along the jobs. And this is plus. So I can just get it back with the foreground without even the number because that will be the full one to come on the number so now you can see I got it back. Next file once again so control X to exit save. Yes, name. Yes. And so my file is there and no, no, no background jobs has been left. Next one run my age stop send it to the background and kill it with a kill. Okay, so once again my top. It's here. So we found it something. For instance, we were using something we are looking for something with the user. And we found it we don't need it, but we still need it, but we send it to the background. Okay. Now we are looking for the jobs. It's there. And then actually we can kill it kill it with the percentage sign. So that's important because if you put on put the percentage sign over here so you will try to kill the process ID beat. Actually, we can do the other way. We can kill with the percentage sign. So it's like this percentage size so you can see that actually it has been terminated and there's no jobs left. Okay, let's try it once again. And man top send it to the background. And then we will. Let's grab it and see if we get the one. Which one is correct. I have top running somewhere else. Where is my ps3 so that I can get it out. Okay, my man page is stuck like this. So this is where the ps3 is actually useful and you can kill the process by process ID. So you don't need any kind of job or anything job ID in the foreground in the background, but you can kill it like this. And you can see with the jobs that these guys has still been still stopped so it did not react on my kill what I'm doing next I'm sending really kill signal. Now the first I was kind of trying to do it nice. It didn't realize that I'm trying to do it nicely now and try to do it nicely. So now it has been killed completely by the system so you can do the minus nine. And I am not so nicely killing it's kind of terminating the program and killing it out and not saving everything that comes out. But anyway, that's possible if your process doesn't reply. So try to be nice. I mean, this kind of killing with the minus nine may have some issues. Okay, we are pretty much on the schedule with two minutes already over and the rest marked of the they have been left for the advanced users and some of you who is advanced if you still have question you can ask. We will continue tomorrow. But before we do, so I still want to steal your one minutes. Please estimate the quality of material and so that we know what we go for tomorrow. We were able to follow or that was too fast into complex for you or that was the other way that was too easy. And so, let's see. What we're up for tomorrow and otherwise, when you replied. We will see you tomorrow at 12 o'clock. And we will continue with the files and directories and how to make create files, how to move them, how to copy them, how to delete them. How to change the ownership and change the permissions. And then on top of that, I will also tell you how to find on the file system something what you want with very kind of complicated and complex syntax, if you want to find something which is very small among the millions of files. Okay, before you leave once again, please click. That's important for us. So let me wait for something like 10 more clicks and then we are done. But otherwise, who has done it already. See you tomorrow. Thanks for the thanks for coming today.