Linux Command Line Full Course | Beginners To Experts | Bash Command Line Tutorials

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to the channel this is aush and from today we are going to start our Linux Series so today in this tutorial we are going to cover the installation of Linux operating system that is we are going to install basically ubu and we will see the basic comp concept of virtual box what is virtual box and why we will use it okay so let's start with the first virtual box so virtual box is nothing but one kind of software uh that we use to run different operating system in our main host okay so our main host here means that our one this operating system that that this one which I'm using right now that is Windows 11 okay so in this operating system we are going to use another operating system with the help of virtual box okay I hope that is clear to you like what is a virtual box okay so basically we will uh install obuntu OS but before that you will need to first of all install virtual box so how you can do it you have to just go on this particular website watchbox dog and you have to click on this download watchbox 6.1 and and then according to your host you can download it if I hope it's windows so you can just click on Windows host okay this will download the uh installation file and actually I have already installed it I already downloaded this file so I will just cancel this okay and let me go here here you can see I have this file okay so what you have to do you have to just click double click on it and it will just ask for the administration permission you have to just click yes and then it will start uh installation actually I have already installed virtual book that's why it's coming like it first of all I will remove it okay let me remove it first then again it will install okay it will take little bit of time don't worry for it okay uh we will wait uh but uh till now I pause the video okay so guys my virtual box has been already uh like uh uninstalled now again I will click on this particular file and just uh hit on yes it will start uh okay so just you have to click next then you have to make sure all the options are tick marked you have to click yes then yes then install and it will take just approx 5 minute of time not more than that okay uh first of all let uh be let it install and yeah it's install I think after that I will tell you the about the installation part of the bu operating system so one operating system is nothing but a Linux distro okay so I will cover all that point in the next video and here you can see the uh like virtual box is installed and just click on finished and the virtual box will come up okay so here you can see my virtual box has been loaded and the don't worry about these files because I had already these files with me so don't worry about it I will tell you the uh installation part of ubun operating system okay so what you have to do now you have to go on the you have to just search UB okay nothing else then you have to just go on this download section or you can go by this.com download and here you see the one to desktop you have to click on it and then make sure the version of I'm using I'm also using this uh current version you have to just hit download okay and the download will start and also I have already downloaded this file also and you can see the file size is approx 3.4 GB okay so if you have Wi-Fi then it's good if you not then you will need some extra it okay I have already installed it so I will just cancel it you can see the file here one to desktop same version okay 20224 so what I will do now uh this is my virtual War I will just hit new I will just name my OS I will name it to and make sure uh don't change it now for like don't change the location as maybe you can get face some error okay and here the type is Linux and this is all default okay you will get the same you have just click on next make sure you provide the size more than 4 GB at least and if you uh 4 sorry if you have a ram of laptop approx 4 GB Ram then make sure like you provide half of it otherwise your laptop will hang okay so now click on next create a virtual hard disk click on next dynamically allocated next and here you can provide the size which you want to provide to that particular OS I will provide Max to Max 50gb okay you can also provide it appox according to your si okay I'll just hit on Create and you can see the my machine has been created and now what I will need to do I will need to click on next so the total installation I think it takes approx of uh 20 25 minutes maybe 30 minutes sometimes and here you can see you have to just select that particular file I will just click on this and then click on ADD I will select my file here just click on open and then choose okay and you have selected that ISO file now you have to just hit a start okay so it will take some time and then you have to just SOL click enter h enter and it will take some time of approx 5 minutes okay uh I will pause the video and when the another screen come I will resume okay now you can see guys uh this window has come up now it will ask for the installation so let's [Music] wait that box takes 30 minutes I'm guess yeah now here you can see uh you have to select the language uh it should be English and then you have to just click on install OBU and again uh the same thing like keyboard layout what you want so I need English so I will just hit on continue then again [Music] continue it's taking much time and then you have to just hit on install now continue [Music] then uh like my Reon is in India so it's been already selected you can also choose according to you and just hitting continue now you have to provide a username so you can my username will be I choose as iush and my password make sure you remember your password because we will need it again and again so you have to just make sure you have selected this option recover my password to login okay then click on continue and now it will like copy all the files and uh install theant Okay so uh I will pause this video after the complete installation I will be back okay so you can see file has been almost copied okay now the installation will start okay so it will also take aox 5 to 10 minute of [Music] time now guys you can see like at appro half of our has has installed so it just unpacking all the libraries and then retriving files stowing so you will learn more about uh operating system like how will be the file structure what are the commands that we will use uh in our the playlist okay so let it be complete so it's also installing I think different softwares and here also you can see like uh this while installing it's showing everything you need for the office all these things you can check okay here we will get the Firefox web browser and the photo applications we will get [Music] uh yeah whe Spotify so as this so is will be little bit different for the windows users uh like who are using Windows from his childhood or her childhood okay so this will be basically some kind of command line BAS things so at you will get some real time skills okay like that will be helpful in the corporate also or if you want to go in the uh domain of cyber security there is also need of uh this uh Linux OS so that will be very helpful for you so uh leter install I will be right back after the complete installation so now you can see guys like now it will install as there was uh some kind of packages it's so it was installing uh just before I resume the [Music] video now it should not take much time it will take I think little bit of time it'll just the whatever the packages that has installed by the system then it will just unpack all the all those things so let's wait for it don't know how much time will it [Music] take unpacking LX headers okay [Music] nice I should not take much time I don't know why it's taking much time packing head so okay preparing now it's [Music] preparing so guys now you can see our installation has been completed and this is the like information box you will get after the come after the successful installation now it's asking to restart now so I'll just hit on restart now then it will ask for the whatever the username and the password which you have entered at the time of installation then that those things you will need to enter okay so it is asking for the remove installation please okay I have to just hit enter so so you will also need to hit enter okay so now it will start and after that uh I will tell you something important uh like as you can see how the this size of that particular schem is on little much uh but uh I know like we don't like to do on like the small window so we will check uh how we can increase the particular screen size to full screen okay so first of all we will need to log in into the system then we will need to do some changes in it then we can easily uh go into the full screen mode as this is the first time so that's why it's taking a little bit of more time as compared to like uh all installed system so let's wait for it now here you can see uh now your username whatever you entered so I had entered the name iush I will just click on it and I will need to just hit the password okay then hit enter it will take little bit of time to configure everything yeah here we go so congratulations you have successfully install operting system okay so it will ask for the some kind of these thing if you want to link this with the Google account then you can go otherwise you can just skip it okay it's not mandatory to it to do it and then also so click on next then if you want to install some kind of software into this O then you can do it otherwise you can also click on done okay so now you can see uh this is our OS uh which is installed successfully but uh you can see the screen sizes too small for the use okay so for that what we will need to do we will need to first of all uh like um let me do one thing I will just uh uh uh I will just power off the window you can do by the control alt T then this terminal will open and you have to just enter enter one command power off now your system has been successfully installed just we have to do one thing like we have to do the full screen mode okay so we will just go in the setting and then again in the display and you have to do it full to 128 MB and then you have to just enable the 3D acceleration and make sure your storage is it's showing empty but what we will need we will need to do just add optical drive and we will just add this one vbox gu edition. ISO we'll choose it and then on the empty what we will do we will just do right click and we will remove this particular attachment and then you have to go click on okay and here you can see where vbx get something okay now what we will do we will just restart our system [Music] for [Music] now again we will need to enter the username and password not username only password we will need to wait okay yeah now we can just uh hit the password and then show the screen buddy yes now uh you will just uh scroll down then you you will see this uh vbox gas okay so you have to just just uh click on it and then here you have to just hit the right click and then open in terminal and here we have to just hit this command do slash auto run Dosh okay so this is uh what's coming software catalog is being downloaded no I don't want this right now just close button this is/ a. this is basically a cell script file that we will run Okay just set enter and it will ask for the authentication authenticate now it will install some some files okay then after the complete installation again we will need to restart our this machine and then you can easily uh set the particular um like we will get the whole screen okay uh till now uh let's do some kind uh of Surfing this OS so here you can see the Firefox is there and this is Thunder B mail we can use as a mail this is the file system Rhythm box I think it's some kind of music player okay so here you can see the play install the GCC make p package from distribution okay it will install it so you don't have to do anything now here you can see the will not rep until system started okay uh I will need to hit enter I think yeah just hit enter and again one thing will come up here then after that we will need to hit enter okay just wait for it yeah now it's been done okay now what we will need to do uh we will need to just uh restart the system you can hit the command reboot now it should be [Music] done with the password I think it's not [Music] done let me check from here this is the V box guest Edition what is there there is also the same thing it should happen Okay let me show the screen bro yeah yeah now done okay so what I just hit it uh just right control and then press F okay when you will do do it you will go in the full screen and again you will then do the right control and then have F then you will get this the whole screen now it looks nice now on pressing Control Alt T you can get the terminal on or by just hitting here I will just uh close it and uh I think here you can see activities and the trash and here the all application which you can see and then from here you can just click on the terminal and now the terminal will open up okay or the shortcut is control alt T so here I'm just entering the command who am I this is the basic Linux command so here you can see it's showing the name as iush okay so that's all for today's videos guys I hope you have successful in install the Linux operating system or you can s to OS in your PC using virtual box so that's all for today so do like share and subscribe programming knowledge and uh I'll meet you in the next video thank you thank you for watching so now here is our uh Linux system uh which we had already installed yesterday if you have not watched the previous video then please go and watch that video because without this uh you will not be able to follow us okay uh if you have already installed then it's fine if you have not installed then you can go for it okay so now what we have to do we have to first off all learn the one of the basic command like LS command but before that you should have some familiarity with this uh uh like envirment Linux envirment like here you can see the browser web browser mail here you can see the files that just like in our Windows system there is the this one file explorer similarly here is also that thing okay you can access the different folders documents uh and then downloads music whatever thing you will download from web browser it will get downloaded in this particular video uh in this particular sorry uh download for directory and here is some public uh folder and there is nothing okay and also you will get the trash videos pictures all these things okay so these are the all things which you will get so now what we have have to do we you you will need to first of all open up the terminal uh you can go from uh here and then you can click on Terminal okay but uh also there is a shortcut for opening the terminal is the control alt T okay so now I will cut this and you can just hit control alt and then D so it will like open one of the terminal so this is our terminal and on this particular thing we will work so let me maximize it I hope it is visible to you okay just wait a minute uh you know it should be visible to you guys okay so uh the First Command which we will uh learn about in this video is the ls command so what is LS command first we will talk about this what is LS command uh just think about LS s is nothing but the list the content so we use the ls command to list the contents of a particular directory okay if you are suppose you are in desktop directory so you want to get all the what are the files what are the director in that particular desktop if you want to get it so you will use a simple command that is called as LS command okay so what we will do we'll just hit LS okay so now I'm in the home folder and where you can the desktop documents downloads music pictures and all these things okay so what I will do for the purpose of uh showing you I will just open up the files in my here on my screen I will try to minimize it okay yeah here you can see I'm already on the home directory okay from here you can see also uh I hope it's visible let me minimize the size of this particular window yeah now here you can see uh this is the home and the same content which uh we are getting also here okay so this is the uh main purpose of the command LS so this is the basic uh work which it does like it just list the content of that particular um folder or particular directory in which you are present so if I will go in the desktop and here you can see one file has been created desktop so now what we will do we will just uh here click on open it terminal okay and then now you can see where are you you are in the desktop now here when you will do LS so here also you can see you are getting that particular directory test as it is okay so I hope you got the idea about how the ls Works what are the main person purpose behind this okay so now what we will I will talk about with you is the flags or you can see say the options or arguments so there are many options or arguments which we use with the ls command okay so I will use uh uh so you the first one is L hyphen L that is small l so this is the basically the format or you can say the Syntax for the like commands like there will be command name then hyph then the whatever the option which you want to provide with it so what this command will basically do hyphen L just stands for the long format okay it will show you the all the files and act in the long format so I will just hit enter and now you will Le think like wow what what is this now you will get a bit of confused about it okay so let me tell you about these things like um these are these are the some permissions okay uh like read write execute uh there will be a separate video on this permission because this is a very important topic okay and then there is a users user name group name this is the file size and the dates and all and the last modification date uh time so the uh I had created The One desktop folder at 153 a.m. so that's why it is showing at uh this time 153 okay so now what I will do uh I will create one folder in documents okay and here I will do new folder and here I will give it the name as uh LS command okay here you can see the documents folder and in that we have a LS command now what I will do I will just again hit the ls iel here now you can see the last modification time of that particular uh directory document is 217 and here also you can say it's now 218 now okay I hope you got the idea about this hyphen L format like it basically displays you the result in the long format okay so this is the main purpose of this L hyphen L flag now uh let me talk you uh about some other flags like H flag okay so H flag basically uh does the like it will show you the format in the human rable format okay like as you can see this is a 4096 you will not get what is this basically it is the file size okay and uh if I will do hyphen Ed then you will get some difference uh let me create one more terminal so that you can differentiate between both the result okay minimize it uh my batter is low okay now what I will do here LS hyphen L hyph HED okay we can use the separate uh as a separate flag or we can just combine both together I will show you after this okay don't worry about it so here now you can see this is showing me the human form what is 36 it is 36 KB and then 4 KB 4 KB 4 KB this is the size of all like directories and there is some uh basic concept about it I will tell you later in that particular video when we will come across with the more description about these things like it is basically related to the hard link soft soft link kind of concept in Linux okay so as this is a beginner purpose video so we'll not cover this at this time otherwise you will get confused okay so uh we I had used LS hyph l hyph h okay so now what I will do I'll just combine both things okay hyphen LH as you can see there will be no difference and it will also not uh no like it will also not provide me like this command is basically like unvalid or anything else so you can see we can write like this also or we can write like this also so now uh one more command you will need now the clear command what this command will do I hope you guessed it right this will just clear all the this screen okay I will just hit enter and yeah boom you got clear okay now uh let move about some other flags which we will use the simple flag is also the a flag what it does you will uh understand like it will list all the files and directory okay uh the hidden file files also it will show us and here you can see we are getting the this bash history log out bash RC file all these files which we we are getting here okay now let me show you here also so you will get idea about it how it's working you can go here and it should be somewhere like hidden files uh yeah here you can see the so hidden files is unchecked now we will check it and then yeah boom you can see the same result as we have BC and here is also the BC file and other some files which are present here also okay so for now I am again unchecking it so it should be simple okay so now uh we can combine the hyl option with this also like Al we are getting the same thing but what in the long format okay like this is the same permissions numbers some kind of and the i i this is the username and group and root root is the root user who like we will get about this what is root and all these things when you when we will learn about the user creation things in Linux okay so uh I hope you got it the hyphen L option also okay uh let me tell you one more uh flag which are important here like uh hyphen LD okay uh what we will do in this when we will uh combine the L with d directory d stands for directory and want to get the details of the Let's uh get documents directory uh yeah now here we can see you you are getting the details of a specific directory that is documents okay and here is the same thing that we were getting earlier like uh you can match it with it like documents and here also you can see the permissions users group size and the last modification time okay this is the LD so these are the some basic uh uh Flags which you can use with the ls command okay and uh that's all for today also if you want more uh like U practice on it you can go here also on uh try Haack me.com like this is a platform on which there is a Linux uh uh tutorials or something you can say uh uh wait a minute yeah I think I got it here m in the loar it should be in the learning path or somewhere else yeah Linux fundamentals okay if you want um more in-depth knowledge or you want to practice some your skills then you can go on this platform also okay so uh that's all for today and I hope you you understood about the ls command if you they see Linux is just like about your practice if you do more practice you will get more familiar with it like uh uh like when I had started it was like what is this thing and what is this terminal I was get scared of this but when you start practicing with it when you play with this uh then you will get a idea about yes uh you can understand it okay so that's all for today and uh please like share and subscribe our Channel and hit a like button if you like this okay so thank you for watching and we will meet you in the next video thank you thank you so much so now today in this video what we are going to learn so basically we're going to learn about one of the more basic command that is CD command which means the change directory Okay C stands for change directory command so what we will do today uh we will learn about how we can change our directory from one to another okay now what I have to do I have to just increase the phont size for you guys are it should be visible uh I think yeah it's okay it's visible it should be and in the next video in window what I will do I will just open this file manager for your reference to show you how the things are working okay now this is our home directory here you can see home okay and right now we are also in the terminal we are on the home directory what we will do we will do this just LS okay so here you can see we are getting different files like different directory directress desktop downloads pictures snap videos documents and so on okay so now today in this video what we are going to learn about the CD command Okay CD what it basically means CD just stand for change directory what it will do it will just change your directory okay now our current direct is what it is our home okay we are at home we want to go on the desktop okay how we will do it so there are the two ways in which we can perform this action like first one is that we that is basically a concept of Linux so that's why I'm telling you uh that is of I think one of these is absolute path name and the second is relative path names okay so first we will talk about the absolute path name in absolute path names what we do we just provide the whole path okay uh wait a minute I'll just provide the desktop path okay I want to go move to into the desktop directory what I will do CD desktop this is basically what absolute path names okay so I will just hit enter and now you can see I'm in the desktop now what I will do I will do LS okay so here you can see the file which uh uh this is also One Directory uh in which we had created in the last video okay so this is the files of the desktop directory okay so this is the like uh one of the way in which we can do it like we call it as the absolute path names and now the next is relative path now what is this so basically relative path names works for a particular notation that is dot then or you can say double dot okay so what I I have to do now I have to go back now I'm in the desktop I have to go back okay like uh from let me cancel it like from here you can see I'm in the t uh right now we are here at the test okay in the desktop directory now what I have to go I have to go back in the where in the home directory so for this what I will do I will just do CD dot dot again back we are back okay we in this particular window or uh we this in this particular window you can say like in the home directory now there is also one more command uh which we learn in this video like that is PWD what it does it just shows you the present working directory so our present working directory is home/ why a because you a is one of the user of this particular OS that's why it's showing I like whenever you will create multiple users then you will get your own particular home directory in which you will create your separate files and folders or anything which you want to create okay that's why it's saying home I now what I will do I will move into the documents directory okay documents okay now now I'm here documents so now what I will do I will just do PWD so here you can see we are getting again the same present working that CD like home I use documents okay I hope you got the idea what how AWD is working how documents is working now what I have to do I have to just go back one more directory back one by dot dot okay we are back now I I will do PW again we are at the home and aush we add the home directory now we will just hit uh clear button and here what we will do we will create a one structure here you can see LS command is one of the folder and uh I will open up this folder and I will try to create again new folder that is test two okay now what we will do we have to come directly in the ls command folder so how we can do it first we first of all we will do LS okay we got the list of the all directory which are present in the home directory now where I have to go I have to go in the documents directory so I will do CD documents I'm just uh entering uh like after typing the DU and then if you will hit tab then automatically it will like app like this documents okay then after documents where we have to go like now I'm in documents now I will do LS we are on the this documents for directory and here is the directory that is LS command now what I have to do LS command okay now where we are we are in the document / LS command now what I will do I will do LS this is we are in the test two uh not in the test two like this is the content uh of this particular directory like LS command now I I will do I will again go back and go into the test two okay oh let me increase it width so it should be clear to you okay now what I will do I will just hit PWD PWD means present working di so my present working D is home I use documents LS command and the test two okay now what we will do we will go back one by one CD dot dot We Are One Directory back CD dot dot Again One Directory back CD dot dot Again One Directory back now we are where we are we are in the home directory now what I will do I will just uh give the whole path okay documents slash LS command slash test in this way you can also go in the like your final destination direct like providing the whole path in a single string okay now what I will do PWD so you can see the whole path like this is same as this this one like when we uh move went to that directly like one by one okay when we were doing one by one then we were all getting these results and also when we are doing like in a single string then also we are getting the same result I hope you got the idea about how this CD change direct working okay let me clear this now uh there is also one more shortcut to go directly in the home directory that is CD this till it will directly go into the home directory that is LS okay or we when we will do PWD you will get that particular window okay so I hope you got this uh how the things are working and this is all about the C CD like change directory command Okay CD stands for change directory okay I hope it is clear now so we will meet in the next video with uh like we will create some folders and files and all these things we will talk about in the next video so that's all for today's video and thank you for watching so we'll meet in next one okay thank you thank you for watching so mkdr command is nothing but uh like it just stands for the make directory okay what by directory means like in Linux we basically uh call directory but in the other uh operating system like Windows what we call it as a folder so directory is something basically like a folder you can uh like you can say like that okay direct is like a folder so now what I was talking about uh to create a directory so what we will do uh we will uh take uh like a uh structure to create a directory okay so let me draw uh structure for you this is a website where you can easily like uh draw any kind of structure or whatever you want okay I want to create a blank diagram create okay save it anywhere I don't care save oh sorry test okay here it is now what we will do uh we will create first uh University okay then uh in that University we will create students okay and uh then we will create facalities and then we will create uh you can call it as a workers okay and in the student section we will create uh like uh we will name it uh one of the student like aush okay or uh something like XY Z okay and similarly in the faculties uh you want to give it as some kind of uh instead of faculties here I will try to give it a subject okay now here we will write Linux networking okay and we will leave the workers as a blank okay so we will follow this pattern to create directives so this will be helpful too like when you will play with it you will get a better idea like and also you will get a practice about about the CD command that we have learned earlier in the last video okay so uh how will we proceed I will try to just uh off the screen I hope it should be visible to you okay yeah now it is visible and now what we will do we will clear the screen and we will do just LS okay so here what we have we have just desktop downloads pictures snap and these things okay and I will try to hit just PW PWD we are in where we are in the home directory now what I will do I will create a first University directory okay so I will create M KD i r and then I will write University okay I have created University let's say tells okay so here you can see uh we have got the university directory now what I have to do in the University I have to create this students directory subject and workers okay first what we will do we will create these directories one by one then after the after the whole this completion of the whole diagram sorry what we will do we will create these three directory like in a row okay in a single command we will do it okay so let's do it first single uh single okay so I will first go into the university directory CD and then we will do LS that is nothing what I will do I will create a student directory students okay then I will create uh when you get upper key then you will get the previous command okay then I will create subject then I will create workers okay so now I will do LS so here you can see we have got the three directories now what I have to do I have to create a uh more directories in uh students so here is one thing also I want to tell you about like here students in this students uh you will see the S is capital but when I will try to hit s with a small then what happen no such file direct why because this is a case sensitive in Linux it follows case sensitivity okay that's why it happens now what I will do c capital S then tap now t Okay students now where we are we are in the students directory when I will do PWD what we will get we'll get the exact location where we are okay so now what we have to do first of all I want to clear this whole thing okay now what I will do I will create two directors with name aush and with name uh angit okay LS AIT has been created okay now now what I will do I have to go back in the subject directory so how we can do it we will do just CD dot dot remember in the last video we talked about this CD dot dot and here now where I am I am in the University when I do LS I will have the access of subject and workers also what I will do now I will just do CD subject okay and then again bw2 we we are in the subject directory now what I have to do I have to create two directors Linux and then networking okay now I'll do LS here you can see Linux and networking has been created and in the workers directory we don't have to write anything or we don't have to create any kind of folder in it okay so this is the basically like simple process of creating files and directories in the Linux and now I will tell you some like uh um means I will do like uh creating these whole things in a single command okay not whole things but yeah this one and this one I will try to create okay so what I will do uh I will go in the home directory again clear now and I will show you here also like how in the file system it will look like whether it is there or not okay uh yeah here you can see University director is here in the University we have student subject workers and in the students we have aush and anit and back and in the subject we have Linux and networking and now what I will do I will just delete this directory okay uh from here I can delete okay to delete the directories and all I will tell you this in the next video okay otherwise everything will get mixed up okay so now if I will do LS here so there is no University folder is there now what I will do I will just create a university folder uh sorry University okay now university has been created I will move into this directory and now I have to do you know I have to create a student subject workers so what I can do mkd students okay space subject I think spelling mistake is there some okay yeah subject and then I will create workers boom no let's hit LS then you will get something yeah so here what we are doing in the same in the single command we are creating three directories or you can create multiple directory uh it all depends on you how much you want to create okay and now what I have to do in the students we have to create aush and XY Z so how I will do mkd in the students sorry sorry uh okay sorry for it uh I by mistake uh entered this enter okay this is LS okay now what I have to do I will go in the students directory students okay now what I will do I will create again the both aush and angit like before I okay LS same okay so this is like one way to create multiple directories at in a single command okay so I hope you got it how you can create multiple directories okay I'm not going to show you for the subject like it will be then you will get bored like I'm like displaying you same things again and again okay so now let me tell you something more interesting things okay I will clear and then go back into the home directory clear everything LS and now what I will do now I want to tell you some more Concepts like uh uh the options which we can use with the uh hyphen P command Okay so the first option which I want to show you like hyphen V that stands for veros so when we will do this mkd hyphen V it will tell you the uh like uh whether directory has been created or not okay so let's me let me create uh like um uh what anything Linux okay here you can see created directory Linux again uh let me tell you again I want to create same directory let's see what happens here you can see cannot create directly Linux file exist what if I remove hyphen B whether it stays displaying or not the same error okay it displays the same error okay so but when we use hyphen V it will tell you the status like whether direct is created or not okay I hope it's clear hyphen V and in the next we will talk about hyphen P op so what it does hyphen p uh like when we suppose we want to create a directory in which like University in the University students and then in the student we want aush okay aush we want only okay so how we can do it uh but before uh that I will need to sorry I will not delete that okay uh let it be I will get some more uh extra scenario like uh uh let's create uh some kind of uh like uh um sun and with sun let's create a ha father and then we will create obviously grandfather okay or we can Go reverse also I think I have created in the re reverse Mo should be in the last okay grandfather okay now what I will do mkd i r hyphen P option and Son slash father slash grandfather okay so basically this command what it will it will create the like in the sun directory you will get father in the father directory Direct you will get the grandfather but uh if you will not use hyphen P option then what will happen like we will not be able to create a directory like if son father does not exist then it will not create grandfather okay but if uh like if it exist son father exist okay sorry I got a little bit confused here let me first of all create this one okay LS a should should be sun directory son LS father LS okay so what I was trying to say like when we will use hypen P option if sonf father is not created then it will be get created automatically but when we will not use hyper Fe then it will not get created like uh let me go back and now what I will do I will try to create mkdr test one/ test 2/ test uh three it should be like in test one there should be test two in test two there should be test three here you can see cannot create directory okay no such file directory is there okay so I hope you got the like actual role of the hyphen P option okay and this is not a more uh big deal if you want to if you play more and more with this command you will get familiar with the this whole Linux environment okay that's not a big deal now the next thing is hyphen M option okay okay what it does this is nothing but mode okay mode or we can say permissions like uh uh till now we have not cover the permission section in Linux like it is another concept and another another video will come up on this concept like read write execute all these things but still I tell you like if the if the person will have the read read permission then that user can read the file if he has write then he can write the file or execute then he can execute that file but if he has all the three then he can do anything reite execute all okay so how we can do this mkdr hyphen M and we provide a equal to suppose we want to provide R WX all to the one directory that is test I hope test is not there yes test is created now what I have to do lsph L you can see he has the permission of all these things and here you can see where is test so rwx rwx rwx did that execute there is something like rwx for users and another this RW is for group and another this rwx is for other persons okay so when we will do test in this when we will go in this directory we can do any kind of operation mkd uh sorry mkd test blah blah blah okay we can do anything but now what I will do I will try to create uh One Directory with only operations okay so let's see what happens whether we are able to create or not anything in that particular d whether we have a permission or not so what I will do mkd hyphen m a equal to I want to give just read operation we can only read read and I will create test three let's dos hyph L and now you can see in test three we have on read permission to everyone users also groups also and others I think others have not any permission okay here okay now I will go in the test three test three you can see permission denied we don't have access to that folder so now who can access this folder there is also one user in the Linux bu root only root can access okay uh so that's all about this in this video like uh mkdr command so I hope you liked it and uh please like share subscribe uh our YouTube channel and now we will meet in the next video with another uh basic command like in the next video we will basically talk about the whole directory which we have created we will then again we will create some directory then we will delete it whether the direct is empty then what what we can do if it is not empty then how we can delete it so these are all the things which we will cover in the next video so that's all for today and we will meet in the next one thank you thank you so much for watching so now what I will do I will create uh one more directory I will start by creating a directory mkd aush okay I have created aush and now what I have to do uh I have to again create uh more Dory in aush CD aush okay mkd iush 2 okay iush 2 now we are done again I will go on the home directory and what I will do I will create one more directory mkd um test 67 okay so here you can see aush has been created already in the aush directory we have another iush 2 and text 67 where it is oh yeah here this is one okay so I will perform here LS and now you can see all the directory which we have created now what I have to tell you like to remove this directory uh the command is rmd I okay remove directory so there is a one thing in this like uh uh let me clear this all uh if directory is empty okay if like uh suppose this direct t 67 there is nothing this is empty directory so in this case we can easily use rmd okay we can easily use it but if directory is not empty suppose in this case I I to so in this case when we will do rmd so what will happen like it will uh like it will not delete that particular directory it will show you the error like uh directory is not empty okay but when you will go in the iuse directory and when you'll try to delete IUS 2 then it can be easily deleted why the reason behind is this like iuse to is empty okay I hope you got this point like uh how rmd command works so uh now our job is to just delete the directory and learn the things okay so let's start so what we will do uh LS now I will first try to delete the test 67 test 67 okay so now what will happen I will hit just enter and now boom so your test 67 has been deleted okay now again we will try to do LS here and so you will not see anywhere like T 67 is there now now what we will do and yeah one more S I want to tell you that uh for clearing the terminal if you do clear then it will clear obviously but there is also one more shortcut like Control Plus L automatically will get clear okay so now what we have to do we have to remove the directory iush okay now let's see what happens fail to remove iush directory not empty okay obviously D is not empty we know like there is another folder in aush so what we will do now we will go in aush directory and then I will try to first delete I 2 okay we have deleted and there is no any directory now what I will do I will go back in the home directory and I will delete iush okay so iuse has been deleted okay so suppose if there is many folders and directories like Suppose there in iuse there is I 2 to I 100 okay or in that particular directory there are other more directories okay so you have to delete this so this is very tedious work like uh like it's not easy to do one by one okay so so like the solution for that is that like we will use some flax with it okay so now again let me create a directly I will use hyphen P option if you watched previous video then you will get it what is hyphen p and all these things so I'm going to create a not test let's create with I one I 2 I 3 uh so what what will happen here like in I one there will be I2 in I two there will be I three so you can check here uh is one I2 and I3 and in I2 there will be nothing it will be empty directory so now what I have to do I have to delete this whole directory in single command so what I will do there are multiple ways I will tell you everything each one by one the more uh different ways okay so we will use rmd slash S okay and then we will just provide the directory name I one okay so uh what this command will do basically it will delete the whole the directory from the root to the end like child like it will start from I and it will end to the I 3 and it will delete the whole file structure and with this command it will ask you for the permission like you you will need to enter yes or no whether you want to delete or not like just like a confirmation message it will ask for you let's check what happens okay uh it's showing no such fileo directory why uh one minute let me check with this hyph help whether it works in ubu or not okay sorry we can use hyphen P option for that okay sorry what we'll do rmd hyphen p i one I think we will need to provide whole path okay I three so we can easy have we have deleted easily in this way also we can use rmd in this way okay but there is also one way that SL say I will need to just check with the Google uh why this command didn't work uh not working with the one2 like I have used this command earlier it was working in my Linux machine uh let me check with it um and also let's go with the rmd SL s okay Google is your friend bu like if you will stuck somewhere then this is your only friend where you will get the help okay okay so here is the like documentation of Microsoft then if it is Microsoft then like it should be correct here sles what it's saying delet a directory tree this specif direct and all subir including all files okay we work correct and this rmd SLS test to remove directly name test and all okay we were doing the same thing I didn't get why it's not working in a uh like there may be some reason uh here you can see like there is uh there may be okay uh leave it uh I will try one once more let's check it happens or not I try to create again the same directory I will just hit the what was the command rmd sles and uh I one is there okay okay okay okay okay fail to remove okay if I do forcefully then what happens okay it's not working even so now what is the options to delete the whole directory in single command like uh sles failed in I don't know why we will figure it out later uh but now what is the other way so there is a way so what we will do we can use the RM command okay with the help of this command we can easily delete all the files like in a single command what we will use the flag with it RM hyph RF okay and then a one done we are done buddy like RF stands for recursively and F stands for forcefully we can easily use this RM command to remove these directories in a one single command Okay so uh that's all for um today I hope you got it like uh how we can delete the directories uh in this uh by using a particular single command or by one by one command like basically uh in the like uh real world we basically use this RMI an RF okay we use it uh because uh like uh whenever we create a direct it will not be mty like you can get it you can relate it with it like whenever you create then you create it for some kind of purpose that's why so we can easily use this RM RF command for this uh removing directory okay so that's all for today uh I hope you liked it uh I hope and uh if you have any query then please you can ask us in comment section and yeah please do like share and subscribe our Channel and yeah thank you thank you for watching this video how we can create files in Linux using touch command okay so here and here in both sides there is files here is files okay and I will move into to that particular directory files okay and now what I will do I will create some files using touch command okay so I will do Touch file 1.txt okay so basically what this command will do it will just like delete the uh sorry I'm saying delete it will just create file one.txt okay but that file will be empty for you like there will you cannot write anything at that time you will need to first open that file then you will need to write in that it okay but there are also some ways where we can perform both thing like uh simultaneously we can like create files and we can write something uh in that also but this we will see in the next video okay so first we will uh talk about this touch command so when will hit enter and I will do LS and here you will see like file 1.txt will be created okay so I hope it is clear to you and now what if I want to create multiple files okay then I can easily do with file 2.txt file 3.txt file 4. txt and I will just hit enter uh sorry LS and here you can see all these and four files have been created okay so this is the one way to create files okay and now with the touch command like we can use various options with it like hyphen a hyphen M hyphen R also we can use it so I will start with the first one that is hyphen a option basically what this option does like it will change the access time of your file suppose uh now we have created this file let me do LS hyphen l okay so file one has been created at uh this one 12:42 a.m. okay and this is 43 and all these things so basically this is the modification time okay if you want to look at the access time you will need to hit LS hyph luu okay uh access time 42 okay The Hyphen L option will show you the modification time hyphen Lu option will show you the access time when the file is accessed okay so what I'm going to do I will try to access this file and now 1244 it is okay so I have access this file okay and will write something High okay and I will just uh close it and again I will do this I will need to find the excess time so here you can see the 1244 is now the access time of file 1.txt okay and I have not visited file 2.txt yet okay so it's access time it is still showing 1243 so now what I have to do I will change the access time using the hyphen a option so how we can do it touch hyphen a and then file name so I want to change the access time for file name uh which one uh let's do for file 1 txt okay so it will change my access time from 12:44 to the my current time so my current time is what 12:45 okay and now I will do LS IU and here you can see file 1.txt okay now what I will do like here we have not uh like uh visited this file 2.txt okay even when you don't open on that file we don't write anything in that but file still you can change the access time for it okay Suppose there is someone in your like work environment like uh you want to change the access time uh just for your any kind of purpose okay so what I'm going to do uh touch hyph I will just uh change the file name from file 1 to two Okay and now I will do LS hyphen Lu and here you can see the access time for File 2 has been like change now okay it's 1246 okay and now uh I will just clear it all now again I will check the access time so access time is for first one 12:45 1246 and for let's check for modification time that is at the modification this is sh 1244 okay and 1243 1243 all the why 1244 because uh we we have write high in this file 1.x that's why it's going 1244 okay now what if you want to change the modification time instead of uh this access time so what I will do now I will just hit uh uh like work with the hyphen M option okay hyphen M and I will change for file 3.txt and now let's do just LS hyph L file 3 you can do like this also and now it's swing 1247 as here it was 1243 now the it is modified to the 1247 and here you can see the access time is 12:43 so now let's check also the access time for file 3.txt whether it is change or not it will not change because we have not done anything with it so it will be as it is like it is 12:43 okay so I hope you got it how it is working the how we can basically change the access time modification time with the touch command okay we are creating files also and we can also manipulate the access time and the modification I'm using this command okay so now uh moving uh forward uh the there is also one option hyphen R okay so basically this option what it will do it will just uh uh like uh what we can say like copy the access time of first file to the second file okay so now what I will need to do I will show you both the uh access time I will show you for file 1. XT and what I will do touch hyph R file one and file 2.txt okay and and again I will do the ls hyph Lu so here you can see the access time for file 2.txt has been change from 1246 to 12:45 and now let's check for the modification time for file 1 and file 2 so modification time for file one and file two is same okay I hope you got it how it is working in the excess time and notification time I hope you got the like how hyphen a hyphen M and and iPhone R option works together okay so that's all for this video and in the next video we will basically talk about uh how we can write some kind of like whatever you have to write in the file while creating a file okay so that's it for today and we will meet in the next one so thank you thank you for watching and please do like share and subscribe our Channel and if you have any queries then you can ask us in the comment section okay thank you thank you for watching and now in this video we will talk talk about uh how we can create files using cat command and also we will see some other operations using cat command Okay so uh let me increase the size of the terminal I think now it's fine and I will just open up my file system in my left hand sign to be more clear with you guys okay so now what we will need to do uh we will we will have to learn about uh cat command okay so basically cat command uh we can use to create files and also we can use use this cat command to like concatenate some more files together or you can say like merging more than one file in a one single file okay you can also do it in this and also uh we can use it like uh like to get the how many uh numbers like to show the lines and all those things in this in the particular files okay so now we will start with the creating file okay so let me do first LS so I think I have some files directory let me check what is there okay file on file 4 okay I know what is uh let's create some files with cat command Okay so cat I will go with the test 1.txt and what here the main benefit is that we can simultaneously write whatever we want to write in that particular test file so here I'm just writing this is test one file okay in txt format and what you have to do you have to just hit enter and then control T okay so in this way we can create files okay and uh now what we have to do we have to do LS and here you will see test one.txt has been created for you and here also you can see it okay now now the other feature of cat command is that like uh you can also read the contents of that text file so how you can do it you can just C and then the whatever the file name is there you can provide it okay that test one. XT I will hit enter and here you will see the whatever is the content of the file um like it is being printed here okay so uh this is the like two operations we covered and now what we will need to do uh I will create one more file okay uh cat test to. XT okay and here I will write this is test two file in txt format okay just hit enter and then contr D and now what we will do we will see the content of test2.txt and here you can see this is test2 file in txt format okay now what we will I need to do what I will do I will try to like concatenate like uh what you can say test test two conent in test one okay so how I can do it cat test one.txt then again this redirection operator this is called redirection operator and test 2.txt hit enter I will try to see the content of first uh test one let's see what is there okay so basically this command like will pend in test to.tx not in t sorry for that okay test two and here you can see like the whatever the content of test one file has been included in this particular test two file okay from here you can see also like when I will just hit double click on it and here you can see the same thing here also okay so this is the one way of like appending uh two files together okay and what we can do uh if you want like append content of those file in another some file like suppose like test three file so what we will do we will there just simple uh cat uh test1.txt test2.txt and then I thing just uh redirection operator and here we will write test 3.txt and now what we will do we will see here like test three has been created also when we will do LS head you can see test three has been created now what we will do I will try to read the content of test 3 test 3.txt okay oh so here you can see the content of both the files like this is showing test one two times because in test two uh it was there like this was the content of test two file okay so in this way we can uh like merge multiple files as many you want okay and uh now moving forward like uh now we will learn about some like uh what we can say little bit uh options which we can use with this cat command so first of I will uh I want to show you is cat hyphen n test 3.txt so this command basically what it does it uh uh basically like show you the lines with number wise okay here you can see this is first line This is second line This is third line and similarly here also you can see the uh like uh all those things like 1 2 3 okay so this is the one way uh to like get the files by number wise and if you want to uh check the like end where is the ending of that all the line then at that time it will show you the dollar character at the end end of the line okay here you can see like here the line is ending that's why it is Swing dollar here what if we will do uh here I will change little bit uh like here I will change like uh this is uh another file and I will just hit control s and full stop also and let me cut this and here you can see the line is ending here okay so I hope you got it why swing dollar dollar is because like here at this point of uh line uh sentence or at this point of word thus line has been ended so that's why here it is Swing dollar okay so this is the basic use of hyphen e command okay now uh what if you want to add like uh uh some more content in uh like previous file previous file means like it is already created you don't have to create anything for it so for that you don't have to do anything uh you have to just uh apply double redirection that is this one get and suppose I want to write in test one.txt okay and here first we will see the content of this so here you can see this is test on file in text format and I have to write uh something like this is uh tutorial based on Linux uh CTS or something like that okay and just hit control D okay and I will just uh like uh reopen this particular file um okay so here you can see like uh this isial based on has been like added in this particular test one.txt file okay and uh uh there is also one like uh option which we can see like uh hyphen T option okay so basically what it does uh it will show you the tab like where where is the tab in the particular line okay so what I will do now I will just uh like uh give a tab here okay one tab two tab three tab I'm giving here okay and justrl S and the tab will be represented by this this symbol I think let's see what it shows cat file one dot uh sorry what is the file name okay test one do txt test one. txt okay so uh this is the content which we so now what I will do I will just have to use the Hy option and here you can see uh this is uh the particular symbol and I I I it's showing like three tabs is there it is showing that's it okay so uh uh that's all about uh like uh this scat command okay I hope you liked it and if you have any issue or if you are facing any problem any kind of confusion then you can ask us in comment section and yeah please do like share and subscribe our Channel okay thank you thank you for watching we'll meet in the next video and now in this video we will talk about um RM command Okay so RM basically stands for remove okay so in this basically like uh video we will uh we're going to talk about how we can remove files okay and also like basically this uh the itm command basically we use it for removing files but also we can use it for removing directories also okay so today we will see and learn all about this so now what we have to do I will just create some files okay uh let me do a l okay so here is no any files I have deleted all okay start with touch 1. dxt 2. dxt 3. dxt and 4. dxt okay I hope you are aware of this touch command as we have already covered okay now LS so here will you can see like all the four files have been created okay now what I have to do uh I will tell you about the RM command okay so basically uh RM them command is used to remove the directories how we can uh sorry not directories files also okay not only directories okay so what we will do uh we will try to remove the 1.txt okay so how I can do it RM and then the file name 1.txt enter now what I will do I will just hit LS and here you can see 1.txt is not here okay it is deleted now again let's start with 2.txt it is also related now let's uh Delete 3.txt and again 4. txt okay now let's hit enter and LS and here you will see uh all the files which we have created has been deleted okay so uh like this is how TDS work like when you you will remove one by one one by one so if you want to remove many files like at one time okay so how you can do it so again I will need to just create all those uh text so I have created the four 4 text files now what I have to do I will just uh rm1 then two then three then four I will just hit enter and LS all file is gone okay nothing is there so all file has been deleted now so now uh let me tell you about the some of the options which you can use with this RM command like hyphen f hyphen I also capital I all these things I will tell you okay so again let me create those those files okay now files has been created here now I will show you RM Hyun I option small small I uh what it will like do what so basically it just prompts you for the like confirmation uh like whether you want to delete this file or Not by sometime what happens you by mistake uh like delete some of the files you don't get any prompt and all so with this option you will get prompt okay so I will just hit enter and here you will see remove regular mty file you have to do yes or no if I will do yes it will get deleted I will just hit in uh LS and then see one TT has been deleted what if I do n uh let's do for 2. XT n so obviously this file will not be deleted so 2. dxt is as it is okay so this is about hyphone I like a small I with which you will get uh prompt about about whether you want to delete or not some files okay but you will think about in this case you we were deleting like all these four text files uh like uh in a one single command okay but we uh so how we can get uh prom for this so there is also option for it okay so uh let me first remove all these files 3.txt 4. txt okay LS that is no files and again I will just try to create those four files okay now uh there is also one option like hyphen capital I okay what it does when you will go to remove more than three files it will ask you for the confirmation whether you want to delete all those files at once okay or not but it will ask only once okay so how we can do it touch not touch sorry 1 txt 2.txt 3.txt 4. txt here you can see we have how many files four files I will hit enter and again here you will see remove do you want to remove four arguments if you will do yes why then obviously it will be deleted now we will do LS so here you will see there is no any files okay all files has been deleted okay there is also uh more options like uh hyphen V okay what it does sorry if I will go with hyphen V option uh we can like combinely use more than two options together so hyphen V what it does it will show you what is being done okay so let's hit enter I [Music] will say yes and here you will see what happened remove 1.txt then 2. XT then three then four okay sorry so these are the four files which have been deleted and you have got the information like what was going on after like hitting this particular command okay so hyph we only just display the what is going on okay and now let's move towards like uh directories okay how we can delete uh empty directories or uh like nonempty Direct so let me create One Directory hyphen p uh I will choose with the uh A1 A2 A3 okay so uh like uh are you uh you will get like in A1 directory there will be A2 in A2 there will be A3 directory okay so I will do LS and uh if you want to go in the A1 directory so when you will to LS said you will get the A2 directory okay so in similar way in A2 there is A3 now I go in the home directory I will clear the screen now I want to remove this particular directory to remove directories which is non empty like in A1 there is something okay so for this we basically use the r option with r we can use f f option for forcefully deleting okay but we are not using here it okay so I will just go with the A1 and I will just hit enter and all the directories will get deleted okay if I do LS so that you will see there is no A1 now what I will do I will just create again those directories and uh I will run with the iPhone V option okay and here we'll see remove directory first A3 then A2 then A1 okay uh if you want to use hyphone I option then also you can use a small I it will ask you yes then it will ask you for the next you yes then next you have to do yes so remove directory A1 A2 A2 then again y then again for the final one so in this way uh like uh we can use the RM command with the hyph V iir and these are all options okay now if you want to delete uh like um uh empty directory okay so this is a empty directory there is nothing in s0 you can also do with r option but uh there is also one more like uh uh what you can say flag or option is D we Bic deletes the empty directories we lo as 0 0 and it will delete the okay so test 0 has been deleted now uh again I will show you with the hyphen V option so you can get the like confirmation or there should be no any confusion regarding things okay so hyph V and yeah remove director t 0 okay so uh that's all for today and I hope you liked it about this uh like how we can remove files and directories with the RM command as this is a basic Linux command okay and now today in this video we are going to talk about one of the more basic command that is a CP command Okay so CP stands for just uh like copy okay what we will do like basically we will copy files and directories from One Directory to another or from one file to another just like in Windows we do right click and click on copy and all so same thing uh like will happen here but using command line okay or you can say using CP command Okay so let's start the tutorial uh first of all open up the terminal and let me increase the font size for you okay now it's okay and open this files uh like for your reference okay okay so here it is now what I will do LS so here are some files okay uh let me create uh One Directory copy command okay I will move into this particular directory and here also I will move in that directory okay so here you can see uh there is no any files or directories here what I want to create I want to create uh files uh let's create one.txt I will write this as 1.txt file contr D okay here you can see 1. XT file has been created now what if you want to create uh the copy of this particular text file okay so how you can do it so to perform this action we have a basic command that is CP command okay it stands for copy so what we will do in a basic simple way we will just give the file name 1. XT and where you want to create that particular copy I want to create in the same directory so I will just give the name of that file in which I want to uh like copy that file so here you will see 2. XT is not there okay so what will happen in this case like if the file exists so it will overwrite simply overwrite the whatever you have written but if file doesn't exist so it will create and then after that it will copy the content of 1. text into 2. text okay so let me do LS and I will try to read 2. 2.txt so here you can see the content of this particular like uh particular 1.txt file okay so this is the like one of the simple way in which we can copy files and files okay so now uh what I want I want to copy this uh 1. TT file into some other locations so how we can do it so uh like right now where you are let's check you are in the this home iush copy command okay I will try to split the terminal so that will be uh helpful let me uh like create one more terminal control shift plus I hope it is visible to you let me just reduce some size okay so now what I will do I will do LS here okay now uh let's do PWD okay and uh you are in the home aush right now I will just copy this like uh path now what I want I want to copy this CP 1.txt file at oh sorry 1.txt file let me paste home iush okay and here I will create 2.txt so here you can see there is no any 2.txt kind of file let's hit enter and here you will see uh let's to LS and here will you will see true. txt has been created let me open the like check the content of that particular file so here it is this is 1.txt file okay uh like uh it was a like a little bit uh like difficult because you will need to give the whole path uh where you want uh to copy that particular file okay so in this way you can copy uh this uh like files in any you want you will just need to give the like whole path okay where you want to copy that particular file now one more thing I want to tell you guys let me clear the screen here also I will do LS here okay now what I want I uh like want to copy that file okay but what if uh 2.txt file already exist okay so what will happen so now what I will do uh uh I [Music] will add some more text in 1.txt some more text has been added in this file okay contr D now uh let's check the content of the 1.txt so here you can see this uh 1.txt contain and let's check the container 2.txt it should be uh like as a similar one 1. TT okay now what we will need to do I will also need to copy this uh 1. txt into 2.txt okay so I will just try to uh hit the like previous command but here what I will use I will just hit the hyphen I option okay why hyph I option it will just prompt you for file over written thing like if file already exist so it will prompt like whether you want to overwrite the content of one.txt or not like because there is something else in the two.txt if you will like without hyph I you will run this command so it will simply overwrite the content of 1.txt into 2.txt but using hyph I what it will do it will just prompt you for your decision whether you want to override or not okay so let's hit enter and here you can see it is asking for overwrite and question mark uh whether yes or no I will just hit yes now I will try to check the content of this 2.txt file so here you can see like it has been copied okay I hope you got it how you can do it also now what if I want to copy like uh file one and file file to into some other directory okay so uh let me uh like uh check LS so here you can see 1.txt and 2.txt file is there now what I want I want 1.txt 2.txt into some another directory uh same here in is the same case if directory exist then it will like um uh like copy this files if directory doesn't exist then it will create a directory and then after it will copy that like these files into that particular directory okay so how you can do it uh copy 1. now directory name so uh uh what you can write copied files okay uh let me hit enter okay is not a directory I think I will need to use hyphone R option maybe okay uh let me create a directory copied files and now let me try to copy these uh files into it okay okay sorry uh check Lis I will move into this directory and I will LS okay okay now now these files has been ComEd so in this case like uh it is not uh uh creating directory if uh that directory doesn't exist okay so uh like like in this way you can like copy uh like more than one files or into some another directory okay now uh one more option is there like if you want to copy uh like One Directory to some another directory you want to make a copy of directories okay so how you can do it I will move into the home directory uh let me clear the screen and then LS okay so what I want do I want this copy command the copy of this copy command directory so I will use CP hyph R for recursive so it is Ed for the directory copies okay so how you can do it you will give the first uh the this uh directory name and another directory in which you want so I will use copy command V2 and hit enter and H to LS and here you will see copy command V2 has been created now let's move into this particular directory and LS so here you can see like director has been like copied okay so in this way uh you can uh play with the copy command and all okay so that's all for today's video now in this video we will talk about uh like one of the basic command that is MV command it like it basically stands for move so basically in this video we will talk about how we can move files from one location to another or also you can say like how we can move directory from one location to another location okay so today in this video we're going to learn about this like how we can move files from one location to another so first of all let me open up the terminal and now let me just increase the font size for you guys so it should be visible to you and I will just open up this files for your reference so whatever we will perform here it will be visible to you guys okay okay so now what I will do first of all I will create One Directory mkd move move command okay and uh now what we will need to do let me clear I will move into that particular directory and I will create one file Touch file 1.txt we will create okay and here is Touch file 1.txt okay uh also let me no wait a minute I will try to create a file with cat command because I have to write something in it this is file one control D okay now it is save now uh what we will do I have to move this file one.txt okay file 1.txt from this move move command directory to some another directory that is I have to move this onto suppose desktop okay so now what I will do uh first of all I will open up one more terminal and uh I will move into the CD desktop okay I will do PWD I will check the like path of that particular desktop where it is so here you can see home home I use desktop okay so now what we will do I will use here MV like stands for move I have to move file 1.txt to home iush desktop and here what you can do like like this command is also useful like changing the name like we can also name files okay but here I'm going to use only file.txt okay and I will hit enter and uh on the desktop I will do here LS so here you will see file.txt has been like created okay or uh you can see here also on the desktop uh I think it is here here you can see the file do text has been created okay so uh this is the basics of how we can move files from one location to another now like this command is also useful in renaming files okay so if I will to LS so there is nothing because we have already moved it uh let's create another file cat file 2.txt this is File 2 okay and this and now what I want I want to rename this file file two I want to make it file three so we can do it MV File 2 s here I will do just file 3.txt and I will do LS and here you will see the name of the file two has been changed to file three now let's check the content of file 3 whether it is same or not so cat file three so it is this is file two okay so in this way you can also rename the like file names okay I hope you got it uh now let me tell you one more another thing like uh if suppose uh here is file.txt okay on the desktop and uh you want to move that uh file one which is here to move into this particular directory or particular location so if already file 1 txt like uh exist here so what will happen when we will like uh try to move files from this location to this location with the same then it will override so to overcome overcome this issue what we will use we will use hyphen I command not command hyphen I flag we will use okay first what I will do I [Music] will uh change the file name to file one not file one file. text I will change LS okay now what I will do MV file. txt then home iuse desktop and again file Dot txt and here I will use hyphen I option and here you can see override do you want to override this particular file which it exist it is asking so I can say yes or no but before uh let's check the content of this file this is file 188 is showing now I will do yes and uh hit enter and now I will again check the content of this file so here you can see this is file two okay I hope it is visible to you yeah this is this file two is the now the like uh decent content of this file because it is overwritten okay now next uh what are we I have to do I will try to move uh like uh some files into one particular directory okay so what I will do I will create uh two files 1.txt 2.txt now let's create here TT also okay now you can see LS so these are the th which we have created now I will um make a directory here on the desktop mkd uh move files okay now what I will do MV 1.txt 2.txt 3.txt into the directory home iuse desktop on on nextt to what we have move files we'll hit enter and we'll do LS so here we can see there is no any files here now I will move into the move files and I will do LS so here you can see all the files has been like moved at this particular locations okay so uh this is the another way to like moving files from one location to another like from uh one location to any kind of directory in which you want okay now moving uh forward uh what we can do uh like how you can copy like One Directory to another location okay or renaming it okay so let me go back here and now at desktop here you can see move files and one directory that is test directory okay now what I want I want to First rename this this file or this directory so move files I will try to rename it m files now so here you can see the like move files has been changed to m files now what now I want to move this m files into this tester directory uh so what I can do MV m files and then the test enter LS there's no m files here now CD changeed to test now let's do LS and here you can see m files has been moved at this particular location or you can say add the test directory okay so in this way uh like you can move files from one location to another or from One Directory to another or how you can also re name files and also so in this video you learn about it so today we will stop here and we will meet in the next video so thank you thank you for watching and please if you have any queries then you can ask us in the comment section okay hello guys and welcome back to the channel this is aush and now in this video here is the test for you guys till the topics which we have covered till now I think till MV command we have covered so in this uh test we have approx 15 questions which will be given by you and after that you will get the uh each like one point for every correct answer and you will get the link of this form in the description of this video okay so best of luck for it and I hope you will do great and we will meet in the next video okay bye-bye now in this video we will cover the zip command okay so basically uh as you are aware of zip like weip files to compress the size of that particular directory particular file which we use okay suppose you want to transfer a file of 500 MB to your friend okay but uh uh you want to compress that file and after that you want to send it to that your friend so when you zip that file so the size will be automatically decreased okay so that's why we use a zip command so basically in the Linux we will use the zip command okay for zipping the files and directories okay but in U windows uh you use uh that particular GOI to zip the files okay so now in this video what we are going to do we will first of all create a One Directory MK zip and let's move into this directory it also maybe zip has been created yes here it is now what we will do I'll create multiple files uh 1. txt 2.txt 3 do txt okay so basically on in a simple way how you can zip file without any option so this is a just simple like you zip and the file name which you want to give to that particular uh ZIP file so I I'm giving it the file.zip and the particular files which you want to which you want to add in that particular zip file okay so now what we can do uh I will just hit enter and here you can see file zip has been created now in this particular uh ZIP file you can see 1. TT has been added okay so but what if uh you want to add multiple files okay if you want to add multi multiple files in your uh that particular this ZIP so how you can do it so for this what you will do I'm I'm going to create another Z file Z File 2. 1.txt 2 do txt 3.txt and again here you can see file to.ip in this we will get actually three files okay 1 2 3. T we are getting here so this is the way of zipping multiple files together okay in uh particular uh ZIP file in which you want so now what we are going to do I'm again going to create some more files touch 4. text 5. text 6. txt okay so now what I want to do I'm going to zip uh 4. txt and file 3.zip file okay so the option is one of the option of the zip command is hyphen you option which we can use to like uh uh add some other files in that particular zip file uh it means like uh in the file 3.zip right now we have have only 4. txt okay so what I'm going to do I will add five and six also without tampering four so the there is a hyphen you option in the zip command okay which we can use to perform that particular action so I'm going to add here 5. txt and also 6. txt and now I will open up this uh ZIP file and here you can see 456 has been added okay so we will cover unzip in next video uh that's why I'm going I'm showing you like this okay that's why I'm not unzipping it with the CMD okay so in this way you can add uh other files also and one more option is there like uh hyon M option so what it does it's basically like it will zip the file and it will also delete that particular file sometimes in case uh you don't want to uh like um what we can say keep that particular particular file okay in your desk or to save your space or something like that you can think of it so how we can do it uh like here is Ls I'm going to do and here is 6. till1 to 6. txt is file now what I'm going to do zip hyph M I will use file 4. and I will add suppose 4. txt 5. 6. txt hit enter adding all those things and here you can see all the four to six. txt file has been deleted and here in the file for. J we will get the 4 56. txt files so using hyph you can uh like uh ZIP that all files and also uh you can delete that files to save your space H you will not need to delete that file after the zipping of all that things okay so now moving forward what we can do so uh suppose if you have have other directories also like uh with txt files you have some other directories so how you can do it how you can zip that also so you can do that in a recursive manner uh like using iPhone R option so first of all what I'm going to do I will just create some other director like let's create test okay I have created test directory and you have to like uh what you can say you have to add one to 3. txt files also and also test uh directory in one G file how you can do it you have to just use hyphen R option so hyphen R option what it does it basically work as a recursive manner like it will uh ZIP your directory and also file switch you you will use so let's uh give it a name as di do zip and then what we can do 1. txt 2.txt 3. txt and the name of the file not file directory enter and uh where it is D.Z and here you can see all of your files has been added into that particular zip file okay so in this way you can uh add some other like more than files and directories in one zip file using a single command using hyph option mostly it happens mostly we use it in like uh in our Windows system like we have multiple files in One Directory also some other directory so you can basically like use it in this case and one more important thing and the last one the last option which we will see together is hyphen e option okay it basically stands for encrypt so what it does uh let me like what I will do I will add this 1.txt file into one zip file with a password okay basically it will create a zip file with an password so how you can do it zip I will write password do zip into 1. text like 1. TT I want to zip into this particular file password do zip I will use hyphen e option and here it will ask for me to enter the password which you want I will use something okay aush and here you can see adding one.txt stored in that particular zip file so where it is uh this one password. okay let me open it uh yeah and now here 1. TT like has you can see here log type also like uh it will me like prompt me to enter the password now I will enter and here you can see 1.txt has been unlocked as there is nothing so it's showing like nothing here okay we have not written anything in that 1tt file okay so uh that's all for today uh I hope you got it how you can zip files uh and also how you can zip multiple files together in a single file with the hyphen e option like if you want to like protect uh or jip some sensitive files and you have to send it to some other person you don't want to disclose that particular file so you can easy use Hy option also in that case so that's all for and now in this video we will start with the most uh basic command that is unip command Okay so uh first how we will start uh I will create a one directory that is uh sorry mkd zip and I will move into that particular directory and I will create some files 1. TT t uh sorry 2.txt 3.txt okay now these three files has been created now what I like to do I want to zip all these three files in uh one particular zip file okay so 1. 2xt 2.txt 3. T3 and I want to zip all these in a single file that is files.zip okay all has been added I will do LS here you can see files.zip and for your reference I will open up this directory and here you can see all these files and Z files are there in the in this directory so now in this particular we are going to study about uh unip how you can unip these particular files and particular zip files okay so the most basic and um simple uh like uh command that is unzip we used to like extract files of this particular zip file so how we can do it we will just use unzip and the particular file name sorry and here you can see it is asking me for do you want to replace or not okay so I will just hit control C right now okay uh because I don't want to create any confusion for you guys first what I will do I will just create all uh remove all this 1 do txt 2.txt and 3.txt files I have now deleted all these files now what now I will use unzip and the files.zip and it will simply like extract all the files which are present in this files.zip for your reference let me open it so you can see what are the files is present so here you can see these are the three files which are present in this particular zip file so I will hit this command and done we have simply extracted all the files of that particular files. Z file okay so this is a very simple way to extract files and now moving forward uh suppose like uh you want your these files and these 1.2.3 do text in some kind of another locations uh suppose in many cases you want to store these files in some other directories okay so uh how you can do it uh without like um extracting all these files in the same directory in which your files. jip so but you can extract this file in some other directories also so how you can do it this is very simple now what I will do uh I will open up a new terminal or okay let me open up a new terminal uh let me increase a little bit of font size for you and uh I will create uh one folder that extracted files okay I move into this folder and I will copy the whole path that is home iuse extracted files okay in uh uh this uh terminal you can copy by control shift C okay I will just move it here now what if you want to like unzip files in some particular directory so for this we use basically hyphen option okay in this we will provide the path of that particular particular directory where you want to store that particular uh extracted files so unzip and then the file name which you want that is files. Chip and hyund d and then control shift V and here we want our files in this extracted files directory okay now what we will do here I will do just list in this particular terminal and here you can see all of these files has been like uh extracted in this particular directory so in this way also like you can uh store your uh instructor file in some kind of another directory okay so this is another simple trick uh like uh which uh uh you should know about it and also there are many options like uh suppose in case what happens you have extracted your files uh uh Z file already but uh sometimes also what happens uh you accidentally click on it so in this case in Linux what happens when you try to like unj files and uh in the same directory or you can say in another so here you can see we have already these files 1 2 3.txt what what what will happen when I will try to hit the same command again so it will ask me for do you want to overwrite these files or none or nothing or else okay I said uh I will say yes okay and again it it is asking for 1. 2xt again I will say yes again for two. text and 3. text okay yes so again these all the files has been replaced okay in case if I would made any changes in this well then I will definitely choose no because I don't want to create any kind of problem for myself okay so uh like this is the basic uh options which we can use to unj files and also uh like you should know about one more option that is uh hyphen Q option what is it okay uh I Will Show You by uh first what I will do I will remove the all these one do and all these files from this directory okay so here you can see there's all the files what basically in simple case what happens when I do it will show me me these messages okay extracting these files extracting 2.txt extracting 3.txt uh in some cases we we don't want this kind of information because we know it will simply extract the files so for this what we can use we can use just uh hyphen Q option iph q and then file Store zip it will uh just avoid like it will not print any kind kind of extra things so uh for before hitting this command I will try to again remove all those files and now I will use hyphen qy option and done so in this case we didn't get any kind of information or any kind of message like whether this file has been extracted or not okay now again let me remove it and I will again tell you one more option that is hyphen L option basically if you are aware of Ls command so you will definitely know about higher LS High funel option which basically like list all the uh means list the files in a long format okay you can say like we get many kind of things like date time user guest not guest uh groups user groups access time modify time we get all those kind of information and simply uh you can say permissions also like we will have a separate lecture on permissions okay so now what we can do unip hyph L and again I will try to unip these files uh it is looking so much like U so much stuff there let me clear first in screen now again I will write HL and then file St zip and here you can see the more extra information about the extracted files you can see the length the length is zero and uh date time name all these things all these things okay so it basically doesn't extract but it simply shows you the whatever the files are present in the particular uh zip files okay so that's it for today now in this video we are going to cover the most important topic of the Linux series that is the permissions okay so uh in this video we will cover the concept which lies inside this particular topic and uh commands we will cover in the next video okay so basically uh let me tell you about the permissions I hope you may be aware of it uh but uh still let me tell you like um I will tell you with one of the example with the real life example uh suppose you have a PC and you are the administrator of that particular PC and you have some other users like your brother or you can or your sister okay and you have some kind of files okay which you don't want to show those files to that particular user particular your brother okay so in this case what you will do you will specify a particular permission to that file so that file should not visible or should not accessible to other user so in this way we can set permit missions to the files or directories or whatever you want so that should not be accessible to other users or other person okay or you want your profiles to like keep it secret or keep it private you can say so uh I will tell you with uh a diagram also so that uh it will be easy to understand for you guys so here you can see you uh here is the administrator that you okay and uh suppose uh here is your brother uh your brother okay or sister you can say and also you have some files also that is I will name it as a private files okay and uh this one and from this to this you have uh like uh you will have the access and your brother will not have the access for it not access okay so in this way you can understand like this is the private file okay you have the administrator you have the access for it but your brother or sister uh if they want to access this particular file they will get get the error like permission denied or something like that okay so in this way permission like uh you can get the scenario of the how permission work okay uh so now uh in our Linux operating system or you can saytu uh sorry I will show you the permissions okay so I hope you are aware of Lis command so this command basically doesn't so much information about uh the what are the the permission what is the size who is the user who is the group all these things it doesn't so but when we'll do LS iel then it basically like uh what we can say long listing description of the files and directories okay wait a minute so in this way here you can see there are multiple columns like you will think first like what are these things I'm not getting anything but here you can see like this is First Column is just for permissions next column is for this is the hard links which we will cover in other videos okay and this is the user who is the user who have access of that particular directory and who are the groups and this is the file size date modification date and time these things are there and this is obviously the directory name so right now in this video we don't have to focus on all these other columns like user group we will have a separate video when and at the time user creation all these things but now in this video we have to only focus on these particular things like only on the first colum what is the d r WXR WXR what are these things so we will cover now in this video okay so I hope you got it now what I will do increase the font size first let it be 18 not 18 uh 24 yeah uh wait a minute yes first uh uh I will write the rwx okay again similar thing is we have to do R WX and R WX I will tell you one by one what is these things so basically R what is r r stands for read and uh we have W stands [Music] for right okay and uh x x stands for XC cute okay so these are the some like uh notations rwx is for the permission in our Linux operating system that is R stands for read it just means suppose you have a file and you want to give that file only the read access to some kind some other user similarly in kind of your brother sister okay suppose here is your like some documentation you have and you want to show it to your brother so you can give only the read permission to your brother to your other user like he can only read these files okay and what is the write permission suppose when you will give the read and write permission to this particular documentation file so in this case suppose uh uh they are in the same project with you so what will happen they can change these files also according to him and rwx is nothing but the read write execut it means you will give the all the permissions uh like execute permission we basically use for the some kind of scripts and all these things like when we will cover B scripting so you will get to know about this Dosh files and all or we can say Pi also for python files okay so these are the things uh for in the read write execute so I hope you got it what is read what is write what is execute so now here comes why I have written these 3 three three so here is the reason behind it the first section is only for the user the user uh whoever is the user they will have the like these permission right now they have R execute all these three permissions okay and next is for group okay and uh next is for uh wait a minute next is for home other or you can say some other books or some other on net you can get like other world or anything else like okay so uh these are the uh three three permission total nine nine permission we have three for user other three for group and other three for other like other world okay so here you can see in our system uh I will make a directory so it will be visible to you and I will try to uh create One Directory test one and uh touch file.txt LS Okay so like here you can see I have created two files like uh with when you will apply this uh semicolon then you can write multiple commands in one single line okay I hope you you got to learn new things okay so now I will do uh LSI funnel so here you can see uh the file permissions for uh user and D is for directory and this hyphone is for only for the files okay there are some also other notations uh which will cover over in advance video okay when we will executing commands Okay so here you can see rwx rwx that is how much it uh 3 is6 and again rwx okay so here in place of w you can see that is hyphen means it means zero like uh that other user is not having any permission to write anything inside the directory okay and this rwx r me they the user and the group have all the permissions okay I hope you got it so uh now what we have to do uh now I will tell you about some kind of like uh you can see numeric representation like how we can represent the uh what we can say um permissions of this so basically what happens this is in this uh wait a minute for R we basically give a number that is uh read wait a minute I will write here only here for R we give particular number that is four okay and for uh right we give it two and for one we give it for execute we give it one so overall when you will add all these numbers so for all suppose if you want to give all the permission to some kind of file so in this case you will provide this 777 okay it means you are providing seven for user also seven for group also other seven for other also and suppose uh and also one more is remaining that is zero what is zero 0 is nothing for no permission okay if you will uh give it zero to some other like uh for any case you will give it a zero then um they will not have any kind of permissions okay now Suppose there is a file that is uh suppose this documentation file I want to give this uh as a only uh read and write permission to the no rewrite execute permission to the user so in case of user I will write four + 2 + 1 that is I will write Seven Fold user okay and similarly for uh group what uh for group I just want to give them only what we can say uh write permissions okay so I will just give it them two okay it basically means 0 + 2 plus 0 like it will automatically like uh accept like uh that particular group has only right permissions okay and for other users suppose uh you want to give it as uh for other I want to give them as six like 4 + 2 + 0 so they will only have to read and write permissions okay so overall what we will write we will write 72 72 and six okay uh right now I don't have Mouse with me so I'm getting this problem okay so now so to give the permission to like uh for user you want to give them all the permission so we you can give it simply as seven for group suppose you want to give only the right permission you can give it two or suppose you want to give other all like only uh read and write permission so you can give it 4 + 2 that is six so the overall like uh number which you will provide in the CH mode command that is the uh 726 so what uh when you don't want to give any permission to the other user so in this case you can give it them as a zero suppose uh the same scenario like you want to give group as two so what you can do that is 7 to0 simple so uh I hope you got it the concept of read write execute and how this is divided like rwx rwx rwx what is these three like we have like a separate permission for Rite execute for one user then for group for other and also I hope you got this representation of numeric okay in binary also we can represent like for four I think we represent uh 1 and yeah let me write it for binary also so for binary we write 1 0 and uh for four for two I think we write uh uh it's uh 0 one0 it may be uh I hope I'm correct uh wait a minute so for two what we write uh 0 1 0 and the 4 one uh it's I think 01 it should be 0 0 1 okay so uh let me check it once also I don't want to like share wrong information with you guys uh for in binary it's one0 okay yeah here you can see 1 0 and for two it should be 0 1 0 yeah 0 1 0 is there uh we can get like 0 1 0 is there and for one we will get yeah it's user one okay so this is correct so in binary also you got to learn about how we can write in the binary also so uh that's all for today's video I hope you liked and now this video we are going to cover the one command that is the change mode or you can say CH mode also uh basically this command is used to change the permissions so this thing we have covered in our last video okay so now uh particular CH mode is one of the command that we basically use to change the permissions of the certain files or directory you can say okay if you don't want to provide uh permission to any user or uh any groups or anything any other user whom you don't want to provide access or want to provide access then you can use this particular command okay so now in this video uh first of all let me increase the size so it will be visible to you so now what we have to do I will create one directory that is um uh access dni like this now what I have to do I will create uh two fold fers or you can see director also secret one sec create to and one file that is private. txt okay now you can see I have done LS so these are all the files or directory which we upgraded now when I will do high high funel so you can get these information of the long format in the long format okay so I hope you are aware of this what is drwx uh okay and what is this hyphone I hope you but let me tell you one more time like what are these things so basically hyphone is for files are this for read so if we will provide read permission then you can read that file then if you provide WR then you can write that if you Pro execute then that file will be executable Okay so for uh for like in depth information you can watch our previous video on the permissions okay so now what we have to do uh today in this video what we will go uh going to do like we will change the permissions of certain files or directories okay so now uh the command which I was talking about that is CH mode it basically stands for change mode okay change mode of what files or directories so uh we have learned already learned the uh like two representations of this uh permissions like one is a uh numerical and one is alphabetical like when you will do rwx it is alphabetical and 421 is for what numerical okay so now what I will do I will first uh clear the screen unless I so now you can see the file permission of this private. txt so this uh uh is file and this is this like file has not any executable permission of this of the user or any other like on group also and for others it has only read permission okay so now what I have to do I will try to add uh executable permissions to this particular file okay so how can I do it so the most and simple approach is CH mode plus plus means basically when you want to add permissions to each and every like user group and others so then we will use plus so now what we have to do I have to use x like I have to add executable permission to this file then file name then enter now again I will try to check the permission so here you can see in users also executables has been added in groups also executables has been added and in what we say in others also executables has been added so this is the most basic approach for adding uh permissions in some files or directories and here you can see uh the color has been also changed because it has now the executable permission that's why color has been changed from normal to Green okay so uh what if you want to remove permissions okay so there is also way for it if I want to remove permissions like uh executable okay so what I will do minus x minus y minus B because we use minus to remove the permissions now again you can give the file name that is private. text again same thing I'll repeat LS ionl and here you can see executable permission has been removed from the user also group also and others also okay so this is the simple basic approach what if you want to remove like uh what we can say all the permissions so if I will do CH mode minus RW private. txt now here you can see all the permissions has been removed from this private TT like uh user has also no any permission or whether the groups has also not not any permission and others also have has not any permission so now what will happen I will try to access this file so let's see what happens here you can see permission is denied why it's showing this error because the read permission like we have removed the all the permissions so simultaneous read permission has also be removed okay so what I if I will add only the read permission okay what will happen now CH mode plus read then file name again I will do LS I funel and here you will see the read permission has been added to all the groups now what I will do I will try to access this file private. txt and here you can see uh but here nothing is written that's why it's showing like nothing is has been printed but uh now you can see we can access this but here also you can see the write permission is not there so what if I will try to write some kind of files some kind of thing or text in this fil then let's see what happens whether we are able to write or not so here you can see permission denied why because you don't have right permission to change uh uh to change anything in this particular file okay so uh I hope you got it like how this uh like we can remove permissions we can add permissions then how we can remove certain permissions uh together or add or remove okay like we did here like we we remove two permissions together in this case hyph RW okay so uh this approach is basically applies for if you want to apply certain permission for all the like for all these three like for the users also for the groups also and for the this one others also what if you want to apply permissions to only user okay so how will you do it okay so in this case what will happen how you can do it like uh let me clear the screen LS I funel okay now what I want to do I want to give the read uh sorry write permission to only the user okay so how I can do it CH mode then for user we use you and equal to is used to like assign certain only a specified permission to that particular uh user group or other okay now I will use here W and then private. txt and here you can see W has been added okay but uh uh yeah but read permission has been demo but uh so basically what happens here in this case uh when you provide this uh U equal to W so it only like what we can say it only are like uh add that permission and whatever you have a default permission it will get removed okay so when we'll use equal so it will just replace or you can say it will remove the other permission and it will add this new one okay so now what I have to do I will to uh like add re read permission again in this user so how I can do it CH mode U Plus read okay private. txd so here you can see we have added read permission as well in this particular file what if you want to give uh like uh write permission to this one to others uh two groups also for for groups there is a notation of uh what we can say G okay and again L if you do you can see right permission has been added and for others we use o again LSL and here you can see the right permission has been added in this private do txt file okay so in this way uh you can add remove permission for users for groups uh or for others okay so this is basically for the like what we can say uh alphabetical notation okay but uh but uh numerical notation is I think it's good to use like it is easy also you can easily understand but if you're bner you will think like yeah this is a easy so so now what I have to do I have I will remove all the permissions from this uh what F can say private. txt file so so CH mode minus RW from all it will remove the from all the okay new permissions are W minus uh okay uh let me try to remove like this like a equal to or 0 0 I can give yeah so now here you can see all the permiss has been removed why 0 I will tell you uh in a little bit now so now what we have to do we will add permissions in this particular file using the octal notation of the like this OCT notation of what we can say permission so uh uh let me uh like uh tell you those things again so that will be helpful for you so for octal notation what happens we use R = to 4 okay and uh we use uh WR to and execute equal to one okay so if you want to give the what means all permissions okay like read write execute to particular user or particular group or particular other okay so what you will need to do you will need to give it as a seven like you want to give four also you want to give two also you want to give X also okay so overall it is seven so let me tell you with an example so that will be easy to understand okay so now now what I will do CH mode 777 this seven is for first seven is for user second seven is for group and this third seven is for others so if I will do 777 it will give all the permission to all those user group and others and now I will do this hyph and and here you can see all the permission has been added to that particular private. txt file so now I will do some kind of changes I will again remove all the permission by applying 0 0 to all those okay so here I have removed all those permissions so now in this case what I have to do I have to only give the read permission okay uh let me open a text file for you uh or another terminal I will open so for R what we have four for write what we have two for execute what we have one so in this case what I want to give the user only I want to give them read and write okay so for user I will just write six okay and I want to give the group only right permission so two and I don't want any kind of permission to others so I will give it there as zero okay and then F name so now here you can see we have only read write permission to this user only write permission to the group and there is no any permission to the what we can say uh others okay so uh in this I hope you got it like how you can uh change the permission based on this OCT number I hope you got it like we have covered this in the last video okay so R = to 42 1 that is 7 if it is s then it will give you the all the permissions did that execute together okay now what if you want to uh give permissions like uh what you can say suppose if you want to change permission uh from read write for user I will just give them as a one let's see what happens so here you can see only like what you can say others has been added execute okay not anyone else okay so this is a happening I think because of we have provided only one one means uh there is not three values so now what we will do I will provide one to everyone let's see what happens you will see you have to only play with it when you will not play then you will not learn anything okay so that's all depends upon you so here you can see if I provided one to everyone so only execute permission has been added to all of them okay and if I provide two so let's see what happens only right permission has been added okay okay so I hope you got it uh let let me provide uh like uh for user I will provide only execute for uh group I will provide uh write and execute that is three another zero what happens same execute WR execute and zero okay so I hope you got it like uh how you can uh do or change the permissions with the help of this octal numbers and all okay so uh that's all for today yeah One More Concept is remaining here like uh when I will realiz hyph L here you will sometimes get hyph uh not hyphone you will get instead of X you will get some kind sometime s so s is nothing but a set uid it basically means like when you would provide the file uh like uh with that permission so what will happen it will run that particular file on behalf of you okay so uh let me uh check about the password uh one minute let iPhone user bin okay so here you can see the S and here who is the user root is the user and also here is root is the user I hope you know about the root user like this is the main user if if you are not able to run any F you don't have any then we you can use the root user to run run those file so here what happens this is the password is one of the command to change the uh password of your uh PC okay or your this machine so basically what happens when we run this password command so we basically run this password command on behalf of whom on behalf of this root user that's why we have given it them as a s permission that is a set uid permission okay what will happen when you will run this password command okay so what happens it will like say you changing password for I okay so I don't have to change right now so here what is happening this command is running on be of this root that's why we provide that as permission so this is basically a special permission you can learn more about this on the Google okay so I don't have to change okay I will just close the terminal that's all so I have you got it like how you can do with the octal representation with the uh alphabetical notation so that's all for today we are going to cover the most important topic of how this Linux series that is the user creation okay so basically in this video we are going to cover the how you can create users what are the files affected by you by creating that particular user and how you can create what are the root user sudo command and we are going to cover many things in this particular video okay so before moving forward uh I just want to discuss about a b a b a very basic thing that is what are the users okay I hope you you like U you're aware of it like if you're using this PC then you are the user if someone else is p using this particular PC and if he has or she has an account in this spe then he she or he is the user so basically what are the user users are nothing but you can say a particular person or particular entity what he can just like change the files and directories or he can do whatever he want uh okay so moving forward in this video uh I will uh like start with a very basic thing like uh categories or types of users in our Linux system okay so I hope this terminal visible to you okay I will just write right now I will just write things okay so the hash is basically just for comment okay so if whatever I will write it will like not execute as a command Okay so there are two types of user in all this Linux operating system that is one is root user or or you can say administrative user and other one is the normal user okay so what are the root users so if you're following this series then I don't think you are aware of the root user so but now we will cover it what is this so root user is basically that user who has access of the all the files in system like he he is just like administrator he can do anything he wants okay he has access of everything but what a normal user a normal user nothing but like like who doesn't have all the access okay so uh if you take uh like real life example suppose you are administrator of all this Windows PC or Linux PC anything okay and there is someone else who who has also access of this P but he is a normal user so uh I will just tell you like if you want to change the password of your of your account you can change it okay but if you want to change the password of or anything uh files uh of that other user then you can access it but that user cannot access the file of this particular what which user root user or administrative or administrator okay so basically the difference between uh in this is like normal user can't access the files of administrative user but in we can do it using the one of the functionality that is a pseudo command okay I will tell you what are the pseudo commands what is this how it works okay so this is all about the basics of difference between the root user and the normal user I hope you got it now moving forward uh now uh I will tell you about the studo command what is this okay but before it I will try to like uh cover one thing also the root user I will first set up the root user then I will tell you about the Pudo command what are the root users like I just discussed like he has access to all the per but by default in this obuntu root user doesn't work because it is disabled okay so to enable it what you can do you can just simply change the password because you know the root user is created you will just change the password okay so I will need sudo also because I I think it requires permission so the this pass WD is a command to change the user to change the password of any user so I'm changing the root here it is asking for my password and here I will try to add password of this root user okay so here we have successfully change the password of this root user so now to login as a root user what you can do you can change the switch user okay Su root means uh Su stands for switch user and root is there a username of that particular user and here I will type the password and here you can see the host name has been changed from iuse to the rout I will do LS here so that I have all the files I can see here if I will go to go back I will do LS here you can say test user has been created by me okay so that's all about it like root user now uh what I will do exit from this root user okay so we have created the root user and we have successfully set up the root user now moving forward the I was going to tell you about the pseudo command what is this Pudo Pudo what is the pseudo command like there is a boom of pseudo like if anything doesn't work then you will just apply pseudo and that thing will work okay so how it work basically that pseudo command is nothing but uh like um you can say how should I explain uh let me explain it by you an example suppose uh you have a file okay file.txt uh you you don't have access to it okay but if you want to access to it you can use the Pudo command to access it okay I'm just giving you an example so how it works basically uh Pudo command when you use it it will like uh it will work on behalf of the which user the root user okay the root user because root user has access to all the files okay so what you will do you will try TR to access that file on behalf of root user okay I hope you got it okay so but now there is a question like uh then every user like suppose I am this iush user I can access suppose I create some another user I us to then he can also access this particular administrative file but no the that's not a thing for this to work what you will need to do you will need to this I 2 into a sudo file that is some kind of file that is sers I think that that is the name I will goog it okay not remember I think this is the file sudo file it is there okay so in this file that particular user should be added or should be present to run sud sudo command okay so you will see all these things after when you will create a user and all these things you will see it everything okay so don't worry about it so I have you got it what is the pseudo command and all these things now moving on to the main topic of our this video is the user creation okay so before starting uh there are some Concepts which you should learn okay so I have already written it on this notion okay so the concept which you should learn the first and basic thing is uid what is the U ID U ID is nothing but uh user identification number you can say or user identifier so in Linux every user has their own unique ID okay so I will tell you my unique ID so if you will type ID and iush here you can see my U ID is 1,000 and G ID is 1,000 this is the group ID and groups and all these things okay so uh now you have to focus only on this this part U ID so now my uid is what 1,000 okay if I want to change look at the root ID what are the what is the U ID of the root so this is only zero okay so that's thing I have written here like the ranges of uid is from 1 to 500 only for uh so here for system users uid ranges from 1 to 500 and for the other users it starts from 1,000 as in the Ubuntu and Fedora it starts from 1,000 1,000 but zero zero is reserved for which user root user or administrative user it is just the root is just the username okay so this is the concept of the uid okay so now what I will I'm going to tell you like U ID I you got it the ID is zero for the root user and 1,000 for the iush okay this is the ID which is generated for whatever user you will create it will get added by one and one okay so now the next concept is uh the where the details of user is stored okay so there are some kind of files which are getting infected when you create a user the most uh like uh usual or you can say important file that is s ITC passwd is one of the file and other file is uh Slash uh the ETC shadow s it is just a directory it's just their location where it exist okay so the P pass WD and Shadow file are the two file which get affected and also there are some other files so those we will not cover right now so these are the two files which getting affected okay so now if you will see the content of the/ ITC pass WD okay so what you will see wow I don't think you will understand anything right now okay let me clear this screen but before that let me tell you about this what is the password file or P WD files okay so in this file basically uh the information is stored about the user it means what information the U ID okay their group ID their uh name okay and other information and also some other information like Linux log Lo sell information are stored in this particular file okay so if I'll do c/ CC let me increase the okay so the first entry is of which user the first entry is of the root user okay and the second X is just for the password like here uh password doesn't like uh it uh like it doesn't display here password it is password is stored in another file that is a shadow file okay in the hash format type okay and then this is the group ID uh this U ID group ID their group user group and uh their home directory and the shell which they are using Okay pin bash so there is the like uh I break every part of that particular like uh thing like there are seven what yeah seven separators or you can say seven Concepts you can say okay in this particular file so here you can see uh Mark Mark is what username X is what password 1,1 is what uid again 1,1 is what Z ID again here is the additional information okay and this is the home directory and this is the login shell so what is the login cell but before understanding the you need to understand what is cell cell is nothing but which provides you an interface okay to work okay you can understand and login cell is nothing but uh like whenever you log into the particular system then it starts working uh like you will learn about shell and Bash scripting or bash shell you will learn when we will start the bash scripting concept okay so there are also some other sales you can see uh like gnu cell cons shell jet shell okay so now what uh I going to do I will create a one user okay but before that yeah One More Concept is remaining here like SL CC Shadow okay uh we will uh come back on this point later on after creating user and also yeah here you can see my the first user that is aush and 1,000 is their uid GID and this is group addition info [Music] okay so now what I have to do I'll clear the screen and I will going to add uh some users in this particular video or so I will use sudo command why sudo because user add command uh like does not work directly you can try so if I will do user that it will give me the all the options but also if I will try to add user some kind of thing like some you can say which user test 22 so here you can see permission denied why permission dened because you don't have access to run this user add command because only root can add user so now what we will do we are going to add user on behalf of the root account okay that's why we will use pseudo now now I think you got the main concept of this sudo sud sudo user ad I will uh write some good name let's take uh mik no V Let's Take vat okay and uh sudo user add vat just uh this is the username now I will hit enter and the user has been created now to look at the file whether user has been created or not what I will do I will open up an another [Music] terminal okay and I will just read the password file and here you can see V user has been created and we still have not saved the password okay and the U ID has been given to that particular user 1,002 and another uh group ID has been given to 1,002 and this is the home we has been created but using user add command it does not reflect let's check whether it reflects or not if I do LS here you can see vat directory has not be created I will tell you everything how you can do it using user add command okay and the shell which are being used by this is being sh okay so uh like in this way you can simply like uh add user in know in your system now to change the password or assign the password what you will need to do the password command you will use sudo password vat password uh let's try same vat vat okay password updated successfully now the other file which come in roll in this uh user creation process that is Shadow file in Shadow file what happens like um all the passwords are stored in the hash format okay now uh let's take a look at the shadow file so you can see permission denied so what I can do I will just use sudo because now I will run this command as on behalf of the root user now it will ask you for the password just enter and here you can see vat okay so weat is there and this is the hash format of your password okay and uh next here is the when password created or password CH expired and or all things now let me open up this to simplify this uh yeah here you can see Mark dollar $6 this is the whole the like hash format encrypted password you can say and this is the when last password was changed then again their minimum password age and then maximum password Age Again warning period inactivity expiration unused all these things is like in this Shadow file you can get but we have not assigned any kind of those thing like expiry date all these things so that's why we are not able to say it so there are some uh encrypted password you can say what are the format like dollar type dollar short di dollar hash is the format to store your password so if it is one then it is MD 5 it is 2ay it is blow this is uh 2y uh e blow you can see all this thing if dollar 5 and 256 and 5002 now for dollar y it is yes script so it is also one of the method you can learn about it and now uh if you will learn about the last password change in this what happens it calculates from this state Jan 1 to 1970 okay and for expiry like it also like uh calculate from that particular day so I hope you got it the like what are the password file what are the shadow file if you want to take a screenshot you can take of this particular content so it will be helpful to understand you okay and for password you can this like you can take the screenshot of this particular part okay so so now uh what we have to do we have successfully created this particular user now what we will do we are going to log in okay we are going to log in using that particular username and password so how you can do SE and uh username weat and the password which you have set weat and here you are in this particular user shell so here you can see who am I that is vat if I do LS so you don't have permission because uh user simply just add the user adds the user so you will need to perform some other actions also okay so I will exit from this [Music] cell okay let me clear this screen here also and now what I'm going to do I will just uh like use the other options which you can use with the user add command okay like there are multiple options which you can use okay so to create a home directory which option we use we use hyphen M option okay and uh to create a like user with your own user ID then we use hyphen U option okay and to add some Comm commands we use hyphen C option okay uh wait a minute hyph C option so that's all and hyph S option is also used to assign the login shell Okay so so uh we can use this one by one or in a uh single command also okay so uh for your Simplicity or like uh to make it simple I will use first one by one then I will like um add uh everything in a single command now here I will I I'm creating hym V 2 Okay so so permission denied so I forgot to use sudo I will use sudo and again two has been created I will check the file Shadow file here we have not used password we have not set password yet sorry not Shadow I I have to use password okay so you can see vat 2 has been created with the user ID 13 and the home vat 2 let's check whether this home D has been cre or not I will do cd/ LS and here you can see V 2 has been created okay nice and I will now I will try to create some other user using hyph M also and also I will try to use hyph u i will assign some other ID like 1500 okay and also I will use hyphen C so okay so here this is weat three and hit enter oh sorry uh here I forgot to change the name of the user we had three so user has been created successfully again password so here you can see we had three x password we have not set yet 1500 is the user ID and the group ID this is the additional information which you wanted to give that is vat 3 home vat 3 and Bin bin sh is there it should be b bash to like reflect like this okay I I virtual box so uh now what I will do I will use hyphen s option let me increase this maximize it okay so hyphen C you have used and let's use hyphen s let me clear the screen first uh what [Music] happen uh wait a minute okay hon s SL pin bash okay what I will do I will first copy you can copy using control shift c yeah now I will do weat 4 okay so sudo user hyphen name what this it will do it will just like create a home directory hyphen you for assigning uh the particular user ID so 1500 we have already assigned let's assign like 1500 oh sorry 1,500 1 this is vat 4 iPhone is bin bash vat 4 okay we will hit enter and user has been created let's check in this particular file cat SL CC SL and here you can see V 4 15001 this is V 4 home and let's check home has not home directory so here you can see we 4 has been created now what we will do we will change the password of this particular uh user that is we 4 so how you can do it using Pudo command Pudo password we at 4 done now what you will do new password just enter anything which you want v v I'm just typing and password has been also added now what I will do I will try to access the shadow file so in Shadow file you can see the hash format all these things okay so now what I will do I will just try to log in using the vat 4 Su vat 4 oh sorry and then again enter the password and uh I think I have entered wrong password we at [Music] 4 okay no no no sorry it's password is only vat okay okay let's again change the password why okay caps lock is enabled no no no again change the password I will need to use sudo I forgot every time to use sudo now I will try to switch user okay so now where are you in [Music] the we at for home directory if you will do PWD you are in V 4 if you will who am I you are in V 4 okay so congratulation you have successfully created one user and you have like you have already you have set the password of it you have created the home directory for it everything okay done so now what you can [Music] do uh what you can do now yeah so uh you can see the multiple process we did in this like first we created user using user ad then we provided using hyph F option to create home directory then for uh shell we use hyph S option for comment we use hyphen C option and for uh and what else we used for U ID you used hyph U option okay so these these are the multiple option you are using the user add command so basically user add command is the lowlevel utility which means like it is earlier used but now it's there is also other utility that is add user that is a high level utility you can say okay so this is also useful because uh sometimes in kind of automation thing you need it okay or uh yeah but you should know this method also so now moving forward what I'm going to do and just uh let me uh like list all the so we are 2 3 4 has been greater 5 1 okay so now what I'm going to do I am going to add a user using the simple command that is uh add user command okay so how you can do it sud sudo add user and the username which you want to give I just want to give as a search in okay what it is showing me please enter a username matching the regular expression configured iPhone for okay I think I need to write as a small case in yes so here you can see you can't use capital letter okay so here you can see adding user search in adding a new group search in here group is is also added I I didn't talk about group in this video I will talk about in the later video okay and then you have to here only you have to enter the password like uh such chin and again you have to enter the password and here if you want to give full name you can give chendul room number 1 2 3 work phone 789 456 6 1 2 3 oh sorry sorry sorry 1 2 3 4 5 6 7 8 9 0 home number 0987654321 other 09 8764 if you if you didn't enter anything it will be blank okay other is the information correct yes obviously why so now user hasn't created so this is a very simple command like in just one command you can create uh you can set the password you can add if any extra information you want to add okay so using this command you can simply do those things okay so if I will check the content of password so here you can see suchin one4 has been idea assigned to suchin full name their phone number whatever it is room number home number and the directory directory has been also created let's check LS so here you can see suchin and now let's log in using suchin now you are here and uh if you will do LS so there is nothing any file so in this way also you can add users okay so that's all for today's video guys I hope you liked it and uh if you have yeah if you have any queries then please you can ask us in the comment section okay so that's all for today and we will meet in the next video with uh another concept so that's all so thank you thank you guys for watching this video and we'll meet in the next one thank you in this video we're going to talk about uh groups okay what are the groups in Linux operating system so basically as the name suggest you can think like a group as a like group of some kind of users group of politicians group of actors as this the name suggest but in in Linux we can create different kind of groups like we can create separate groups for developer for P for pentester uh different groups and for marketing team different groups so basically this is the basically mostly the use of groups like we can create different groups for different teams and we we can provide them the like different permissions according to their role so the there is a basic simple command inux like group AD okay using this command we can basically uh create groups in our operating system and I hope this is visible to you let me increase the size first it's too large let me need this yeah now it's fine so how you can do it uh the one command which I told you right now is group add and what you have to do you have to just provide the name of the group which you want so uh I will name it as a like uh developers okay so here you can see it is showing permission denied so one thing here also is like uh the group group add command is can be only performed by those users whether they are root or whether they have a certain permission of root permission or you can say whether they are in the sud file okay so in that file if any user in that particular file so they can easily uh use this particular uh feature of sudo command okay so I'm and that file like this user that J show what I will do I will just add sudo and it will ask me to enter the password done and we are done here you are not uh uh getting any kind of output or something but let me tell you one thing like when you create this uh uh or when you add this group AD command or you add different groups so at that time what happen there are the two files which gets affected when you hit this particular command one is uh one is group which are located in the/ CC directory and one another is SL Etc G Shadow okay so I will show you the content of uh group file okay like in Shadow file it basically contains the like when you create a group with password like they are not much required because uh like if there are multiple users then like uh your password will get uh like compromised you can think of of it okay so uh these are the two file which get affected when you whenever you create a group okay so let me show you the content of first c/ CC like group file and here you can see see there are the multiple group here okay there are multiple groups the first group it may be root okay this is the root and these are the some system users and here in the last video we had covered about V 2 3 4 so whenever you add a new user then the separate groups is also created okay so right now what we have added we have added developers okay so developers is one of the group and X is for password and this is the group ID okay so let me show you the detail information about this particular file so that will be more clear for you guys okay so in this picture you can see like CD roome x 24 and this we these are the users but in our case users are not visible why because we have not still added users in our group so we will do this in our next video okay so in this particular video we will only create groups like we will see different options how you can do it and here you can see the like U detailed information about that particular file so here you can see CD CD is what just the name of your group like here you can see one indicates the group name like it is the name of the group if you run LS and this command you will see okay and then this is for password which we have not provided this is the G ID that is the group ID and the group list like who are the users present in this particular group I hope that is clear to you okay so so now what I will do uh I will try to create a group with uh some another GID okay so for this we can use the only one option is that that is hyph g option which will help you to create uh like um group with different GID okay so but before that I want to tell uh I want to show you one more option that is hyph f option what it does sorry basically uh when you want to create a group with the same name then let's see what happens okay so I'm going to enter the same command again let's see what happens here you can see group developer already exist but what if you want like if you don't want to see this error message or you want to forcefully create that particular like developer group so in this case you can use which option you can use just hyph F option hyph F just stand for forcefully okay or you can say Force so in this case what will happen I will hit enter and here again you can see same developer 152 okay so now in this now what I will do uh wait a minute why my screen is not okay okay so now what uh I will do I will try to create a group with some different G ID okay so how you can do it uh for this we have a hyphen G option group AD and still I will use hyphen f option because I don't want to create some other groups I just want to work on this particular developers group hyphen app then I will use hyph G and I will provide this 2000 let's provide it 2022 and the name is will still remain same that is developers and I have not added sudo it's more important with the help of sudo you can per anything Linux just hit enter and then again we will see the content and here you can see okay it uh our GID not added here okay let me check we have entered correct command or not oh yeah there is a hyph option is correct uh okay let's try to create different group testers okay so what happened like when we we were using hph option then in that case we cannot change this uh GID but uh with other uh when you will create new group then you can uh change like U this GID like you can create your uh you you can create like uh group with your own GID okay so like in this way you like you learn something new like you can't do like that if someone asks you to perform the same thing then you can easily say no it is not possible to change this GID using iph option so uh now what I will do uh there is also one command that we can use like uh like for getting the list of users what I'm typing I'm typing this cash / cc/ group okay but instead instead of this we can use the uh one command that is g tent and uh then group and here you will get get the list of all the groups which is present in our system okay and to delete the groups you can easily uh delete it using the group D command that is very simple that is what I will group tell and I will just uh pass the name of the group which you want to delete I want to delete testers and hit enter again permissioned why because we have not used sudo let's use sudo and then again get list of uh that get list where it is okay so here you can see tester has been removed so I hope you guys like learned about how we can add groups in our L system and but in our further video we will see like how we can add users in particular different groups like there is also a separate command for this task that is a user mod or you can say user modification also like there are many uh properties of this particular command we will learn all about this in the our next video okay so that's all for it and we'll meet in the next video so thank thank you thank you for watching and we'll meet in next one thank you this video we are going to cover the one command that is a user mode like as the name suggest it is the user modification command like with the help of this command you can modify the user details like their user ID you can modify their username you can modify or if you want to add those users into that particular group then you can also do it in this particular video so basically mainly we will focus like adding users into groups in this particular video in our next video we will try to cover the like uh extra things of whatever is the like user locking changing uh uid changing their uh what you can say uh their group name all these things we will cover in our next video so here is the scenario for you guys like uh there is a some kind of company and here you can see different teams are there like developer tester marketing team okay these are some kind of teams in that particular company and we have a different users like D1 D2 T1 T2 M1 M2 so basically suppose this this is our uh some kind of Linux server and in which we want to create different groups so there will be separate groups for developer separate groups for tester and similarly for marketing team there will be a separate group and these are the users so now what we will do we will try to first of all create all these user uh all these groups then we will create users and then we will add these users into that groups using user mod command okay so now first what we will check if we have uh that uh group present or not uh I have sorry okay so here you can see uh there is no any other groups present like developers marketing team and all other groups okay so now what we can do we can try to add those groups so how we can do it you can do it easily by using group add command and I will try to uh give the U ID that is 2001 and the name of the group that will be developers okay so it is showing permission denied why because we have not added sudo here because it runs only uh if you have a permission like uh that user should be adding that sud file so now I will need to enter my password and again let's check if this group is added or not so here you can see developers group has been added okay and 2001 is the GID and we have not still added any kind of user into this group okay so now let's uh create uh other groups testers I will try to give uid is uh 2002 again permission denied okay added and now marketing team okay 2002 already exist change the uid to three okay so now what we can do we can check if all the groups has been created or not so here you can see developers tester marketing team has been created now what we have to do we have to create all these users like D1 D2 T1 T2 M1 M2 okay but before creating group there is a one concept of primary and secondary group in our this Linux system so you will need to understand it first like basically what is primary group in primary group what happens when you create a one user or any new user so simultaneously one group is also created with them like suppose I have created a test okay a test user then test group will be also created okay so that is a primary group and what is a secondary group secondary group is nothing but uh like uh one user like will present in other groups also suppose this is a D1 user and uh he has a primary group of D1 and but he is also present in developer so developer is it what secondary group okay have you got it the concept of this okay so now what we can do I will add users so for users also we use Pudo command and we will use add user command not user add um name it as a D1 uh matching the regular expression okay so I think we cannot write num medical uh de one okay Sho add user day one is not okay let me check Okay add user that is sudo again I will try to create user oh sorry add user developer one okay so here you can see like developer one has been uh like uh username has been created now it is asking me to enter the password of that particular user so I will enter some kind like uh anything which I want and full name um I don't want to give and whether this information correct or not yes it is correct so this uh user has been created like to verify whether user has been created or not what you can do like as we have earlier learned like when whenever we create a user then the information is get stored or get added into the password file that is pass WD okay so we will check the content of that file sor sorry so here you can see our developer 1 has been created with the uid this and 101 GID what is z ID that is a group ID and this is uh his primary group okay so if you will check with the ID command of that particular user Dev developer one so here you can see their G is 101 and their primary group is developer one okay and groups in which groups uh this user is present so basically it is present in only one group that is a developer one because we have not added this user into that developers group so now what I will do again I will create another user um developer 2 okay let's enter password I don't want to provide yes done again now I will create for tester tester one same sorry why okay tester has been added now tester two no full name nothing required yes okay we have already covered this user creation you can watch our previous video okay so uh these two users has been added let's again check the content of that uh password file so here you can see developer 1 developer 2 tester one tester 2 has been added again last one is remaining that is which one marketing team okay so uh where that last command which we have run okay I will just write mty1 password okay nothing is required yes again mt2 password uh enter anything which you want nothing required nothing and then yes okay so successfully we have created all these three users and the groups okay as per this scenario like developer has developer one developer two tester one tester two marketing team 1 and marketing team two okay so now we will check whether all these things has been created or not for your like clarification c/ CC so here you can see all the six users has been created so now the main thing uh the main topic of our this video is user mod like user modification so now let's check the uh first of all check the like group of developer uh not developer let's check for tester one so here you can see G is this and group is this he is added only in this group particular and now let's check the like whatever the groups we have present so here you can see uh here one developers testers marketing team and also you can see developer one developer two this this this and why why this is happening because these are the primary groups for that particular user like when you have created that developer one user then simultaneously another group has been also created okay that's why this is a primary group now what we will do we will add this developer one user into this developers group and then we will check that uh like check with the ID command like uh um what are the other groups in which that particular user is present okay so now the role of user mod begins so let's start with this so basically uh user mod we will use it uh like this like user mode and then we will provide the name of the group in which we want and hyph a option hyph A is nothing for the append option okay I hope you are aware of append like appending something like uh uh Suppose there is a some kind of container and you are just appending into something things in it okay you can think of it like that and we will use hyph G option for the groups and the group name so what we want that is the developers I think this is the same name if I'm correct let me check it okay leave I'm correct I know uh developer one permission denied again because we have not used Pudo here and now let's check the groups of this particular user developer one so here you can see like uh G is 101 and the groups which in which groups this particular user is present so here you can see developer one this is his primary group and developers is his secondary group okay so again let's add other users also like uh developer 2 I will add this user into this developers uh what you can say developers group added simultaneously we will add uh uh users and testers group uh tester one I have written wrong name tester one okay added again for tester two added similarly for marketing team uh let me check the name of that uh particular group uh marketing team okay and here you can see like in developers we have you can see like developer one has been added and developer 2 has been added similarly in testers we have tester one and tester two okay so now what we will do we will add users into the marketing team let me clear the screen and and marketing team and uh username was mt1 I think mt1 okay added and similarly empty empty2 it was I think uh let me check the name of that particular user okay this is M2 okay added so now again we will check so now here you can see the developers group like what are the users present that is developer one and developer two in similarly in tester group we have tester one and tester two and in our this uh what you can see in the marketing we have uh M M1 and M2 okay so uh this is the like um thing which you should learn about like user modification like this is uh like what you can say important thing because uh when you will go in the corporate then maybe as a system engineer or whatever like Linux administrator then at that time you will get to know about this these things okay so uh that's all for this video and for user modification command like there will be another video for further details like how you can add the command add a uid and you can change the like old username to the new username so let me show you this command like how you can change it I have to change this M2 to M like marketing team 2 okay this is the user M2 and I have to change his username to marketing team too so how how I can do it I will just use user mod and then I will use the option hunel and the old username is M2 and the new username what I want is marketing team two okay user mod what is it showing user marketing team 2 does not exist why it not exist I'm just okay maybe the new name will come up here permission denied sud sudo okay again let's check the group name if it is changed so okay here you can see marketing two like from M2 to marketing to the name of the username has been changed and also you can verify it from this uh our password file here you can see it is marketing to okay so that's all for this video and in our next video we will cover up the other options of user mod command Okay so thank you thank you for watching and we'll meet in the next video thank you so basically we have already covered the how we can add users into another groups so now we will also like do some other operation like for this we will I will just create another user uh I will use the command add user using sud sudo and I will give it the name as a funny name Let's uh create with a hacker man uh sorry yeah new password hackerman hackerman I think yeah I have written correct I will not provide any kind of extra information just uh yes okay done so to check whether the user has been created or not what we do we check the this file that is hacker man has been created here you can see the with u id18 and G id18 okay so uh for login so how you can do it you can just switch uh user Su hackerman and the password hackerman so here you can see we are in this the hackerman directory okay so when you do LS so nothing you don't have permission LS okay here you can see all those kind of things log out I will use exit Okay exit we use it for uh like uh close that particular session of that particular user so now what we can do we we will just uh try to uh change the username of that uh not username uh I will add the first some kind of commments in that particular user so how you can do it user mode hyph C so here I will use hyph C option okay to provide some comments so let me provide like uh I a hacker okay and the name of that particular user hacker and I will use sudo like uh because we can't use normally this command okay so now let's uh check the sorry not I don't want to switch I need this one yeah so here you can see the comment has been added like I'm a hacker so in this way if you want to like uh add some kind of commments like in our previous video you can see like uh there is a developer section and if you want to add some comment to that particular user then you can add like this is first developer this is second deop veler or his ID is this his ID is this okay and kind of this kind of things you can do okay so now moving forward what we can do uh we can also change the uid what is uid uid is just the unique identifier number uh which you can change of any particular user which you want so how you can do it simple just provide uh hyphen which option U option and then U ID which you want so right now what it is one8 I will give it as two8 let's hit enter and again uh let's check this content of that particular file and it should be change yeah so here you can see 2008 this is the U ID and what is this 1 this is the G ID okay but we have what changed we have changed the U ID okay so uh we have covered now hyphen c hyphen U now moving forward and uh if you want to change the username of this particular hackerman like from hacker man to if you want to change it like um best hacker like this like this kind of thing if you want to so how you can do it uh I will use again Theo user mode okay and I will use hyphen L option for changing the username hyph L and the new username which you want I want uh sorry uh I want uh best hacker okay I will hit enter and uh again check here so here you can see the name from hacker man to best hacker like it has been changed so in this way you can also change the uh like username of your um okay you can change the username of your particular user if you want okay and also the most like important thing is here you can use hyphen e option also okay okay uh Hy option what it will provide it will just add the like expired date like when that user should be get disabled so you can do it using the just one option that is the user mode hyphen e is stands for expiry and the particular date on which you want okay so today is uh 28 I will provide it as a 30 okay 30 no not in this I think year month and then 2022 and then month that is 8 and 30 okay I will hit enter and the hacker man doesn't exist yeah because we have changed the name from hacker man to which best hacker best hacker done let's check whether it is reflecting or not it should okay but here it is not reflecting it reflects in I think shadow file okay so uh in this way you can also add the expiry date uh and uh one more like important command is that locking and unlocking of user account how you can do it in this so for this option we use the capital L option okay to lock a user so in this what happens like uh the that user can't log in using the username and password like but other methods are required like key based or switching user like which we did here earlier okay so to loog the user what we can do user mode hunel uh capital n and the best hacker permission denied why we have not used sudo H enter we have loged the user if I will try to not right now uh first of all I have to delete some users uh like I'm Linux marketing these all the users I want to delete uh how you can do it sud sudo user Dell uh I'm Linux marketing maybe I simultaneous if I um I don't know I can do or not mty1 tester 2 tester one developer one developer two okay okay but I don't think I'm succeed or not I don't think okay so no I am not uh like able to like uh delete that users like simultaneously okay so I will need to do one by one let me do it first because I have to just show you like I am not able to log in using the usern and password okay so user Del developer one again developer developer two again tester one tester two marketing what is the name of the user that mt1 done again it is marketing something marketing to done I am Linux I'm Linux done okay so we have deleted all the users like extra users which we had created earlier okay so now let me check the again that file okay so here you can see on the best hacker is there so now what I will do I will try to like uh uh switch user from here okay uh wait a minute it's like yeah not listed it's not swing yeah it is not showing okay so when we will unlock then we will try to check whether it is uh like visible or not that option of particular that user okay so I think if we have locked it that's why it's not visible to us okay so uh now to unlock the particular user what you can do you can you have to just use hyphen new Option okay but before that I will show you this one like if you are able to switch or not uh I don't think we are authentication failure okay okay Authentication phas will be there yeah I'm correct so now what if we have blocked the user now what we can do we will provide this hyph you option it will unlock the user okay so again let's check whether we are able to log in or not so now now we are able to login so when you will log the user you can't just uh login or anything for like using username and password okay so here also if we try to check whether the name of that particular user is available or not switch user just wait for a minute like it takes sometime so here you can see I am a hacker why it's sh because we have added that comment okay so it is showing okay but I'm still logging into my account oh I have added wrong done okay so uh that's all for this this video guys I hope you learned about like how you can uh edit the username add commments uh like editing username like mostly we want to edit okay and most and we will not use hyph l option like we don't want to lock anyone okay so uh you can do it or uh if you have guys any problem with this particular video or our previous video then you can ask us in our comment section okay so that's all for today and we will meet in the next video so thank you thank you for watching and if if you have not subscribed our Channel then please subscribe it guys okay thank you this video we're going to cover about uh head command Okay so head command is nothing but a simple command that we basically use to get the uh starting content of a particular txt file okay so uh when we will demonstrate and then you can easily get okay so let me open up the terminal I hope it is visible to you you okay I first create One Directory with head okay and I will create two files touch no I will create with cat command cat states. txt Okay and already I have entered the whatever the [Music] states okay I will just copy it here and I will paste it there okay enter control D to save and I will again create another command that is a capital. txt okay let me like this and again I will copy from this okay contr D Okay so so we have created two files you can check with the list command if I will try to read the first here you can see and if I try to read second file that is capital here you can see okay so now we will use the head command okay so what I just said you like what is a head command head command is nothing but which we use to print the starting content of a file so how we can get it to Simply the command is head and just provide the file name whatever it is st. Tex let's suppose okay and print uh I will hit enter and here you can see the first 10 lines you will get so by default what happens when you use the head common you get the first 10 lines of a txt file so you can count here also like 1 2 3 4 5 6 7 8 9 and 10 okay so this is the one of the feature of the head command okay so if you want to like suppose you want to print only first two lines okay for this what you can do you have to nothing just provide the like u high and option how you can do it head hyphen hand 2 and states. txt so here you can see we have only just got the only first two lines if you want to print first five lines then also you can do it like from five okay so and what if you want to like uh get the content of two files simultaneously how you can do it so it's also a simple Comm of it is like head uh st. txt and what was other capital. txt hit enter so here you can see the first 10 contents of both the files okay so now what if you want to print only first five first five line of both the files so you can see here you can see 3 + 2 5 3 + 2 5 okay so here we are getting five lines and here also we are getting five lines so with the help of hyphone and option we can easily uh get the whatever uh number of lines which you want to like display in the on this terminal okay and also there is another option that is a hyph c option what it does so hyphen C option is nothing but like which we we use to get the uh like content of a particular size okay suppose if you want to print the content of only first like 30 bit or 10 bits so then for this we can use a hyphen C option okay so uh let's use it hyph C I will provide uh for states. txt so here you can see a and DH why this because this is only four bytes okay first four bytes it will provide us and what if I want to hit 12 so here you can see it is just me providing me the 12 bytes okay this is uh 3 3 6 7 and again this is 5 7 + 5 that is a 12 bytes okay so in this way you can use the hyph C option and also you can use I think together also for Capital let me use and you can see in s. XT you are getting this and in hayb you are getting this okay so uh and also there is one more option is remaining in this like hyphen V option what it does it basically just provide you the veros information iph stand from verbos which basically shows you the like information about execution of command like that let me use it for States so you can see st. txt like if we not use hyph V option then let's see what happens nothing okay so that's all guys for this particular video so I hope you liked it and we will meet in the next video okay so thank you thank you for watching now in this particular video we're going to learn about the tail command Okay so similarly just like a head command tail is also one command in but in this we uh like uh expect output from the downside or you can say the we try to get the output from the bottom of the txt file or any file like uh from which we want to like extract some kind of data like suppose you want to extract data from a loog file like you need last 10 number of lines if you need okay so in this case we can use the tail command Okay so uh the basic uh uses like you can try to learn about uh like how you can read the log file using tail command and all these things so these are the basic uses of this so uh I have already two files uh st. text and capital. txt okay so let me show you these two files so this is the content of states. txt and this is the content of capital. txt okay so on these two files we are going to use the tail command okay so I will use first tail command on the test.txt so what it will do let's check so it will just print the last 10 lines okay so here you can see they just printing the last 10 lines you can like get the 1 2 3 4 5 6 7 8 9 and 10 okay so using just simple tail and the file name what you will get you will get the by default last 10 lines but suppose if you want more more lines suppose if if you want 15 lines so how you can do it so nothing you just have to use hyphen and option and provide the number of lines which you want so I just want 15 so here I got the last 15 lines okay so you can use hyphen n option to get the last number of lines and similarly uh there is option of hyphen C option like which will provide provide you the like um what you can say last number of specific bites if you want suppose if I want uh 13 bytes I will use just hyph C and 13 so you can see I'm getting just West Bengal let me try higher number 16 again I think I will get same okay nothing uh I I got like this West Bengal and and okay suppose if I want uh 20 btes uh sorry if I want how much 20 so here you can see I'm getting 20 bytes let's count like w 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 and also there will be like uh some kind of particular size for spaces also okay so in this way we are getting the 20 bytes like a specific bits okay not bits bytes it is okay so you can use the hyph C option to get the a specific number of bits okay from a txt file or any kind of file so now if you want to get the like uh last 10 lines of both files how you can get it just simply use this command test. uh hyph in and the number of lines then provide the files file name which you want so I need the data from two files so you can see you can get easily like from capital. TX these are the last 10 lines and from st. text these are the last 10 lines okay so apart from this uh there's also a like very interesting thing uh in which you will learn in this particular video that is a monitoring any like uh any txt file Suppose there is a log system or something like that and if you want to monitor it so how you can do it it you you can use it just by applying tail command by which option you can use by using hyphen f okay so let's do [Music] it tail hyph app st. txt okay so uh first let me show you the content of stress. text so that will be clear to you so you can see at the end we have only West Bengal okay so now I will use tail hyph F states. txt and here you can see like it has printed the last 10 lines and it is my monitoring this file so now what I will do I will just open up the again new terminal I hope it is visible to you I will move into the head directory and I have these two files and what I am going to do I will append some data in a st. txt and uh then here you you can see if I write something then it should reflect here hello okay so you can see Hello has been added if I want uh if I want to print Linux Fair India so here you can see whatever I'm writing here whatever I'm adding in this particular file it is get to monitored by this system like tell if we have used hyph app option to monitor this t. text file so whatever we are doing changes in that particular file it is reflecting here so like this you can also use this uh particular thing in the like uh log monitoring system okay so I hope you liked it like that was the interesting part of this particular video I hope you like it suppose we WR anything else okay so here you can see it is getting like reflecting here okay and all these things will get added into this particular st. text file now I will just save it and and now again I will try to check the content so here you can see all those extra contents has been added in that particular t uh St store txt file so that was the like uh most important or you can say most interesting thing of this particular video so I hope you liked it and please if you have any queries regarding this video so then you can ask us in the comment section okay so we will meet in the next video so thank you thank you for watching in this particular video we're going to cover about the CH own command that basically mean change ownership command Okay so before starting uh let me tell you the brief or little bit introduction about this command basically it means what as the name suggest that change ownership what does it basically means uh let's take a scenario of a corporate world okay in which you are working in a team and there are people with different roles okay and if you have access of some kind of file and you want to share that file to some another team okay so in this case you can use the CH own command okay like there will be one particular group for one team and you want to give that access to some other team member or some other group member you can say okay so it basically mean changing the ownership of a file or transferring the ownership uh to some other people or to some other user okay so we will start this uh okay so but before starting uh I will tell you to just uh set up your root account okay but because we will use root account and also one another user to perform this uh uh particular ch1 command Okay so to set up a root command first of all what you have to you have to just uh change the password if you don't know so enter the password command and the username that is a root and you have to just use a shudo and and now you can enter the new password which which you want okay password red successfully and one more thing what we have to do I will add another user add user and I will give the name as uh ainash okay so enter a password I will not provide any kind of information okay yes okay so user has been created now what you will do first log in as a root in this terminal uh wrong password I enter wrong password yeah now I I'm logged in as a root user here you can see root and now again I will open up another terminal in which I will log in with the credential of ainash uh I hope it is visible to you now yeah it should be visible to you guys so now what we have to do uh we have to just log in as a different user that is a uh aash okay just enter the password of that particular user uh test uh a okay so here we you can see uh I have another user in this terminal another user in this terminal okay so this is the root user and this is the ainash user okay so now both the user are in the home directory let me do here also same thing okay so both the users are in the home directory okay so now what I have to do to see the permissions or uh to see anything uh permission of a file or directory or anything else which you want what what command you enter just you enter LS hyphen l y l just a long listing of files you can say like that okay so here you can see we have we have three directories and these are the some permissions based on those directory that is rewrite execute read and then for others there is no any permissions okay but the these are regarding what you can say these are regarding your um users like this is the users directory but we don't have to work on this I will work on some different directories or different files okay so what I will do I will just create a one file that is touch file.txt and I will do LS hyl and that particular file name so here you can see in this case uh if you have watched our previous videos on permissions okay so I think you will get it easily so these three represents the permissions of users and this is for groups and these are from others user so here you can see uh groups has only read permission and other others also has only read permissions okay but uh uh uh this particular user has a read and write the permission okay so who is the owner right now the owner right now is Root Root is the owner right now okay so now what uh you have to suppose or you have to think like that you have to share this file. Tex to someone else to ainash okay this user you have to share now what will happen let's do LS and I will try to access this file so I hope I can access because others have read permissions so let me H enter this command so here you can see we have not got any error like permission denied so now what I will do I will just add one line in this particular file hi this is root user contr D to save okay and now again I will try to access and here you can see I am able to access this file but if I will go to change the permission in this particular file then at that time what will happen we will get an error of permission denied why why we will get error the reason behind is this that we don't have execute permissions okay so now what we have to do uh if I will try to add some extra lines in this file.txt so how we can do file. TT let's see if we are able to add or not so here you can see permission denied so okay as I said earlier like if we don't have permission like execute permission so to change the to change in the file okay so to do this uh we have two options one is change ownership just for one particular user or simply add execute permission for others using uh CH command okay uh change permission like CH mode command okay you can use uh that command to change the permission for all the users but but uh that is not a useful case or that is not a best scenario because you don't want to share that file to all the users okay so that's why CH own command came into this role and that's why we are using it so how you can do it just use Chon and whatever the username you want to uh uh here our username is uh this particular username is I ainash so ainash and I will just uh provide the file name and done now I'll do LS I funel and here you can see AAS is now the uh new owner of that particular file so LS iph let me do do one more time yeah here you can see Ain is the new owner sorry and uh now if I will try to change in this particular file then obviously I will be able to change here I will add just uh this line has been added by ainash control D to save and again I will try to access and here you can see this line has been added by which user ainash okay we can also uh use multiple options with the Chon command like Chon hyphen C for uh what you can say for informations okay like it will display just like uh information like uh a permission has been transfered from this user to this user let's do this uh with this again let's hope it works or not let's see uh CH on hyphy and I will provide the username that is ainash and file okay it's not showing me V okay ownership file. retained as ainash okay here you can see we have used hyphone V for warus it just displays the extra information yeah it's still a okay so no worries so in this way CH own command works okay so I hope you like this video and I hope you got the concept of how Chon works okay so that's all for today's now in this particular video we are going to cover about CH group command it basically means the change group or you can say the change group ownership okay from one group to another okay to understand this uh uh command just think like a basic scenario Suppose there is there are the two teams in a company that is the one for uh tester and another for the you can say uh that developer okay uh suppose uh tester wants to share uh one file or uh to some other group members that is uh they these are some kind of group members okay so uh not uh for a particular member of that group but uh this team tester team wants to share those file to all the groups so in this scenario we can easily use this CH group command okay so in this kind of scenario it will be helpful um because uh you don't have to share that file to one particular uh user okay so that if you share that file or change the ownership from from file to that group so every member of that particular you group can easily access the can easily access that particular file okay so to understand this scenario first what we will need to do we will first need to create a group okay I hope it is visible to you guys uh so to add groups uh what is the command so the command is nothing but the group AD and uh group name okay so what we will do group add and let's make a group name as a developers permiss because we have not used sudo uh sorry I have enter wrong password I think yeah group has been created uh now what I will do I will just uh create two users add user user one again we have to use sudo password no extra information I have to provide yes user one is added user two test test yes both the user has been created now what we have to do we have to just uh uh add those two users into the developer group okay so how you can add the those two users into the developer group so for that also we have a particular command that is a user modification so I will use sudo user mode hyph a and uh uh we use I think Hy and the group name is developers and the name of the user that is a user user one and user two I hope it should work again not working user one if I provide oh yeah added and again user to okay so groups has been added uh these two users has been added to the developer group to check what you can do G10 and group okay so here you can see user one and user two and in developers we have two users that is user one and user to okay so uh now what we have to do uh I will create one file with our root user so first of all what I will do I will change my like switch to the root user user I will go move back to directory in LS okay we have file.txt I will first remove file.txt and test okay both are you now what we have to do I will create one file that is touch file.txt okay so if I will change check the permissions for this particular file so here you can see we have root root the user is root and the group is also root user so in this case what we have to do we have to just change the group ownership not user like this one we have to change this group ownership to some other users or to some other group so but in this case here you can see in the permission we have the group has only read permission okay so now uh what we can do uh we can change the group uh from root to which group that is a developer group so for this we have a command that uh is CH group so how you can do it CH group CH grp and the group name is developers okay developers and uh then what we have to do we have to just provide the file name okay now I'll do lsph and file.txt and here you can see the group name has been changed from root to Developers okay so now what I will do I will log in using uh both the user Su user one and I will enter the password test and again one more terminal I will open up here uh like this I will increase the font size so it should be visible to you and Su which user that was user to okay and again enter the password same thing move back here also the same thing I will do I will move back one directory and I will do LSL and file.txt and here you can see developers and again here developers okay uh wait a minute um what key I just entered here LSL file.txt okay so here you can see in both the scenario we are getting developers as a group okay so now what I as a user one I will try to uh like change the some file content file.txt and here you can see it is showing me permission denied why it is showing permission denied because here you can see we have not added any kind of permission he has just read permissions okay so now what we can do uh okay so we have only the read permission here for the groups okay so if I will just uh try to access so I can just only read this file.txt but if I want to uh add some kind of text or add something in that particular file so here you can see the permission is denied so now what we will need to do we will need to just add a permission for the groups for that particular file okay so how we can do it using the CH mode command just because uh we don't have uh like execute permission to the groups that's why we are getting this error so CH mode what you can do for group G+ I will do uh write and execute and I will remove the read permission uh for others and the file name that is file.txt and done and uh now in this case I will just check so here you can see uh read right execute has been added for groups and uh uh read has been removed from for others okay and the group is developers as we performed earlier so now what we can do uh uh if I will try to access this uh file that file file.txt so now let's try for user one I will remove all those things so cat file. dxt so here you can see I will just hi this line has been entered by user one control D to save and again here also uh I will I will here I will try to access this file uh sorry file.txt and here you can see that line I'm getting and for uh user two also I will try to enter some line with respect to user two that is high this line has been added by user 2 contr D to save and again I will try to access so let's access by user one uh not user one uh it's file.txt and here you can see both the lines has been added and it is accessible by both the users so this is the benefit of like group command like uh you can um you don't have to share that file with each and every user Suppose there there is a team of 50 members okay so uh you you you can't like you can't just share those file to all those 50 people separately okay so that's why uh we have this group command change group owners ship and just uh like that file will be accessible by each and every group member so guys that's all for today's video on this video we're going to start to post videos on networking okay like whatever the commands which are used in the networking domain in our Linux operating system those are the commands which we will learn so basically we will start with the First Command that is the Ping command Okay so before starting uh the Ping command I hope you are aware of a basic of networking if not then let me tell you about like from a scratch okay so these are the computers for suppose this these are the two computers okay A and B are the two computers and they are connected to each other so now what happens in this they basically form a kind of network what happens when multiple devices connected to each other okay so that process just called as a networking okay so in the networking to are many Concepts like uh what is an IP address what is a MAC address uh like different network topologies okay so we don't have to discuss that much thing particular in this video so basically you just need about what is an IP address okay so uh let me tell you about the basics of IP address that uh uh you can think one of analogy is like U uh what you can say just like uh in a family uh everyone has a separate name okay suppose one one name is aush ainash anit anything okay they suppose they are the siblings and they know each their names okay so similarly in our Network what happens each device has their own name or their IP address okay so basically an IP address just an address which identifies a device on a network okay I hope that is a clear to you so what is an IP address and also there's a concept of Mac address so Mac address just you can think like of it as a fingerprint of a person suppose a person changes his name or her name but he can't change their fingerprint okay it will be always same so that's why Mac address is just like a permanent address that is like a printed on your NC card okay in your PC so now we will start with the Ping command uh let me enter the password I hope the terminal visible let me increase the font size okay so now what is a ping command so ping command is basically a simple command which you basically use to uh check whether the our like host is reachable or not suppose I will enter google.com so what google.com is kind of one of the host okay or you can see domain name so I will try to check whether I'm able to reach there or not okay ping google.com so here you can see I'm getting multiple uh request from them now I will just hit contr C to stop it okay so here you can see this is the 64 bytes uh like uh packet size what so now what is a packet okay so packet is basically just like a data you can think of it like a data that is that transfer suppose you send a image then it it gets divided into different small small small packets or chunks then it is transfer so packet is just like a you can think as a small data okay so basically what happens when you ping uh and when you use a ping command so it uh basically what sends the icmp Eco request which basically means that is internate control message protocol request okay so icmp is just a one of a protocol that is used by the Ping command okay to like for that these are for this purpose like for receiving or for sending like Eco request and Eco response is one of the thing which comes in this role okay so whenever it send that is called as the icmp Eco request and whenever it receive that that is called as the icmp Eco response okay so there are multiple attributes here you can see like what is this uh sequence number dtl okay so I will cover like most important things first this is from it means it is just and the what you can say it is just the IP address of this google.com Okay so google.com is identified by this IP address like from where this request is coming that is 64 bytes is coming from where so it is coming from this IP address this is maybe the domain name or something like that or servers maybe uhuh we don't know about it what is this okay which domain from where this is coming but we know that this is the IP address IP address of this Google.com this is a TT is nothing but the time to leave it basically means like how many hopes or how many routers uh this process has covered okay and time is just like uh how much time it took to get the response or send the response it basically means what happens the total time the first this is our PC this is google.com Okay so it will ask for are you there are you alive or not Google uh reply goog will just reply yes I'm alive okay so uh this is the total time that is uh here it is where it is uh here this one this is 133 millisecond okay so at what happens at in one second there are at least I think four to five packets or request four to five request are s okay so ping command we basically use for the like internet connectivity purposes further we will check about another command that is the trace rout ip config if if config sorry we'll learn about all those things I hope uh you liked this video and now in this video we are going to talk about the most important command that is the trace root command okay so now in this video we will discuss about this particular command so before starting the actual implementation of this command let me discuss with you like basics of this Trace root command okay so what are the basics of Trace root command as a name suggest Trace root what does it mean it just means you are tracing a root okay uh just uh uh think like an example like you have to go from like uh Mumbai to Bangalore okay so you can go from different routs and you will first Trace like how you can go to that destination Okay so Trace root is a command which is used to find the what are the number of hopes hopes means you can say number of routers which are included between your source and the destination okay so we will start with this so basically uh actually I have an image for you also like Suppose there is a source and this is the destination and these are the number of routers included between the source and destination okay so Trace rot is a command which will tell you like what are the number of hopes present between source and destination like in our this today's implementation we will see uh like the number of hops which will be uh included between our this local machine and the google.com Okay so for in actually Trace does not come with preinstall so we will need to install it like if you hit this command then you will get uh this error message or you will get a suggestion to First enter this command to install trer so we will do this sudo AP install AP just a packet manager you can say okay and [Music] password and now it will install your Trace root command Okay so it will take a little bit of time uh let's wait for for [Music] it so it's also just like a trace root command just also you can say like a ping command okay like we can use it also for checking the whether uh the particular server or particular host is reachable or not okay so uh now we will start with the trace root command Okay so first of all uh I will clear the screen and high PR visible to you so Trace root google.com Okay okay so here you can see the first uh for is 10. 0.2.1 it's like basically the uh what you can say gateway address like the first address through which my PC is getting connected and the star means like it is whether we are not getting any response or something like that okay so here you can see we didn't get any kind of response I don't know why uh this is it's showing me star star star and star means unreachable host you can say like uh or not unreachable it means like you are not getting response okay and the maximum hopes uh can be it will try for 30 okay uh let me again check whether my internet is working or not okay internet is working fine okay five packet transmitter five receive 0% loss let me try with again Trace root with DNS server let me try first [Music] gateway again same the ST means like not responding uh here you can see the maximum hopes can be 30 okay I that should show [Music] something okay let's [Music] hope okay so it's still uh asri so it's not still we are not getting response okay let me check the network setting here okay it's some bre adapter okay uh let me try again Trace root google.com first is get okay yeah now now we are getting here you can see from second and third hops we are not getting any kind of response so asri basically means uh we we are not getting any response from that particular router or you can say hopes okay so now here you can see the first is Gateway like gateway gateway just means like the very first router or very first uh you can say what you can say gate uh like through which your packet will pass like the very first router you can say Gateway just like a your first router okay suppose you are connected to a Hotpot okay then your phone will be off it will act as a first router okay first gateway or whether your phone is connected to the your ISP or anything else you can say or just take an example of your Wi-Fi if you're connected to a Wi-Fi then the first request will be passed through your Wi-Fi then it will connected to some other router then another router then another okay then finally you will reach to the destination so here you can see uh we are getting many results here like uh uh I think we have covered approx 14 hopes here okay let's check whether it will come in one line let me increase this okay uh I think now it's better yeah uh so now uh here you can see the first gateway like from which we are getting the response and these are the time like uh what you can say uh round trip times like uh from like when we go and then when we come back then the overall time okay so here you can see uh the different IP addresses uh of different routers then the total time taken by them these are all the details you can see and at the last head you can see we reached to the destination okay and uh okay we reach to the destination yes so it overall take 84.1 for 1 [Music] millisecond okay so uh again let me try with uh some other uh website like let's take a IBM [Music] ibm.com I think my internet connectivity is slow today that's why taking much time so you can see you're getting different uh IP addresses of different routers okay let's wait okay so we have covered seven rades 10 11 12 13 we are not getting any kind of response again no no response no response we're getting oh my God okay I think maximum hope is 30 so I don't think it will get complete okay okay no problem let me think about some other website uh Which is popular one uh let's take take uh which website should I take man Trace root uh let me search for any website booking.com okay let's Che for booking.com [Music] booking.com I hope we should reach like here you can see like all this line represents the information about that particular hopes like the fifth one is the the IP address of that hope is this like 2231 19625 [Music] okay and also it shows us the round trip time round trip I hope you got it like uh uh from sending packet to receiving back like from requesting to response okay this is the round trip time so here you can see we have got a still uh seven hopes uh let's wait it's 8 [Music] [Music] now okay I think we have reached uh like we're getting this booking.com so approximately we have [Music] Reed okay now it will get uh yeah completed Okay so here we are not getting any kind of responses from the particular uh what you can say particular hops why it happens it may be because of they are unresponsive or they are turned off or whether it's also because of the firewall reasons like some of the firewalls does not reply back to this ping request or icmp packet here also in t also we are sending that that icmp packet like internet what the what was the for form that it is internet control message protocol yeah we can say it like that okay so some of the routers are not routers some of the firewalls does not reply back to those packet that's why we are getting this it may be one kind of reason or whether they are a turned off we don't know okay but still here you can see we have approximately Reed because here I can see the domain name of their of their website that is booking.com okay so it may be one of the reason uh also we can use uh some different options with this stress root command like hyphen n options for like better view let's try uh with hyph and what looks like let's try drro hyph and let's go with our Google baba okay okay now damn and you can see like uh as soon like very fast we got the result so here you can see 192 uh first hope second third un responsive one8 17.24 a211 whether it is the our last node uh let me check with ping I don't think because it start with 142 yeah okay so this is not the address which we expecting M but 142 251 okay so here it should show me that particular uh like the last uh IP address I was expecting this address okay let's try with uh other website.com not yaho it's Yahoo okay I have not used hyph and option let me use [Music] that okay so here also we can see like 74.6 dot like here you can see the first 10 octed and second octed is same then we can we are in in the network we can say like that okay so basically like T command just used to find a number of hopes which lies between the source and the destination okay so we are getting a and not getting response just because of their firewall uh settings like uh uh it shows us the like don't reply to the icmb packet maybe for the security regions uh because uh there is a tool in in our Linux or k Linux system that is the nmap which we use for the network scanning okay so we also face that error because when we go with the network testing then in this case uh we basically get that error so that's why uh no any company or no any organization want to uh what we can say they don't want to replace anyone you can say like that okay so that that's all for today's video guys and I hope you liked it and yeah if you have any queries then please uh ask us in the comment section yeah but before ending this video I have to show you one more thing for you like for Windows I know it's still uh Linux series but uh T rot is a command which we can use on both windows and the Linux but in Windows we just uh use this one t CRT and again let's enter google.com and here you can see the first hope it is taking 32 2 millisecond 2 millisecond and the IP address the IP address of the first hope okay so let's wait for some time it I don't think it will take much time uh okay for second H request timed out again yeah yeah I will take just I don't think more than 15 seconds now so here also it is just sending the icmp packet request okay when we will start with the networking if in future then you will get to know about the what are the different protocols used okay like for web we use sttp stps protocol and also we use different uh for remote connectivity we use SSH FTP so we will learn all about these like how we can do with all these in our Linux operating system let's [Music] wait now8 hops I think in Windows it's working fine um now nine it is unresponsive maybe yeah two stke three and the third one will come up yeah and the 10th one is here let's check what will be the IP address of this okay 123 I just want to ask you one question like do you know about the uh IPv6 address if is then yeah please comment comment about this IP address about IPv6 address okay so okay finally I think we have reached to the destination with the number of hopes 14 okay yeah now now here you can see uh this is 142. 250 t.1 19246 it is the same IP address and the destination IP address is also the same okay so in this way uh we are getting uh like the number of different hopes like uh we started from 1 and 14 we reached to that our particular destination so this is the beauty of this command okay so I hope you like this because at the end we got all the like particular result like required result because it will show the like exact uh utility of this command like uh uh we are uh requesting for this and still again we are getting the same thing like we're getting the destination address as same as the IP address okay so that's all guys so if you have any qu then please ask now in this particular video we are going to learn about one of the most important command that is a MTR command okay so basically uh MTR command is nothing but uh like combination of the two commands which we have learned in our previous videos that is the Ping and the trace root command so now in this video we are going to learn about uh this and we will use like see the both the features of the Ping command and the trace root command in this particular single command Okay so let's start with the basic like uh what we have to uh write that is MTR and enter the then host name I will just go with the google.com and hit enter okay so here you can see like uh this is refreshing again and again and again okay so basically what's happening here you can see the you will get the percentage loss and all the what are the number of packets send what are the last received average based and all these things okay so basically What's Happening Here you here you can see the number of hops like from our what you can say from our source to the Des ation okay so there are approx 10 hops here in this case so uh like basically with this command you are getting the overall uh what you can say overall statistics and what happens in this particular command as you can see this page is refreshing again and again and again so we started from zero and now we are still at here you can see we are at 48 again 4950 so what is this happening this is basically nothing but uh the Ping request okay so here uh this command like what it does it sends ping request again and again and again so uh with ping request what we send we send the which protocol we use icmp like internet control message protocol we use okay so uh here you can see that again I will like uh run this command to stop this we have to just hit q and it will stop okay again let me check with the for another domain uh let's try for uh gmail.com no not Gmail uh let's try for facebook.com so here you can see here also we are getting our 10 hops so there is no any packet loss here in this case Okay so this is the again at 11 times that is 13 14 15 16 all these things you can see so to control the your what you can say ping request time like suppose you want to Ping again after after some some after some seconds like suppose you want to Ping after 2 seconds so how you can do it so for this we use a special function not function we will say just it is a just an option that is a hyph i option okay so let's uh use that MTR hyph I and we will specify the time for 2 second and uh for domain name let's go with the YouTube okay so here you can see now it's not like earlier like it's sending the Ping request after 2 seconds so you can see the like uh change in the frequency of sending packets okay so here you can see F4 now 7 now 8 so it's slow slower than earlier okay so in this way you can control the Ping request and here you can see the IP addresses of all the Hops which are which like between our from the source and destination okay so now moving forward uh suppose if you want to uh display only the what you can say only IP address not host names like actually we are getting here uh IP add but still there is a option of hyphn so we will use it let me clear the screen MTR hyphn and uh let's take some basic one uh our indan website uh let me search not brave let me open Chrome okay I will just search for let's search for blockchain so here okay here is the one website Investopedia okay or here is also blockchain.com is also one kind of website let's let me check it live yeah it's live okay we can find the IP and all what are the Hops present between this so let me go like this first blockchain.com okay accessible 104 okay okay now what I will do I will use the hyphen n option blockchain.com so here you can see only IP address as earlier also we were getting only IP address but so what happens in some cases we get the host names okay we get the host names in place of these IP addresses okay so these are basically your IP V4 address that is your 32bit addresses okay we will learn about more about in networking part okay about ipv4 address and IPv6 address okay so moving for forward in this uh uh video so we will go with one of the like uh option with in which we store the output in different different files like different formats you can say like we can store in XML we can store in Jon and also we can store in uh like other file format we can say uh I'm not getting what are the file formats let me check with uh okay so now here we will see uh what are the file formats so hyph B not this one local envirment packet okay CSV is also there okay here we can see if yeah here you can see iph iph XML is there we can use hyph iph XML for storing the output in uh like this okay so let me try with this hyph hyon XML google.com whether I will need to provide path or not I don't know okay contrl C to stop like 1 minute I will create One Directory uh CD blockchain and NTR iPhone iph XML google.com and now it will be sending like it's not displaying us here I will just h control CLS okay no files has been created uh hph o c. XML whether it's work or not okay it's not working uh let me check okay uh let's try with CSV okay it's not printing anything I don't know what's the problem here uh basically what happens it it displays the output in that particular format like if head is CS then comma separated values okay yeah okay we got it now so here you can see uh like this is the comma separated output in this case and if I will try with the XML uh actually uh file is not created the output is displayed in that particular format okay let's wait for two to 3 seconds I hope it will work let's wait okay so here you can see uh the output in the XML format nice okay so moving forward uh what I will do uh I will use some other function uh not function I will use some other uh options in which we can like uh create a one file in which we will add some domain names and then we will call that file and use this particular command what I'm just trying to say you uh let me create one file so just remember how you can create file in Linux we will just use Dutch command okay I will enter domain. dxt and I will write first google.com facebook.com instagram.com okay that's enough contr D to save okay let me check the content of this file not files. text what was the name domain yeah okay here is the domain uh now I will use MTR I will use hyphen f capital F option and provide the uh domain. txt and then the just it I think that's it okay so here you can see we are getting result for google.com Okay so you can see the Ping request everything we can see here all the statistics okay now further we will see how we can set the Ping okay so like uh normally what happens it sends approx 10 P request okay like 1 to 10 okay if we want for only five how we can do MTR hyph C5 google.com this is third fourth and the last one is fifth that's it so only five packets has been sent okay okay uh yeah again so here you can see this is a percentage loss here we can see the maximum percentage loss we don't know why and the sent okay wait a minute I have to just explain some things that's why so this is the last the average time this is the best time the what what time I'm trying to tell you like this is the round trip time like uh when the packet goes from the source to destination and then the packet uh like the rece sender receives the response from the receiver like that time that is a round trip time okay so this is the average best worst and this is the standard deviation okay latency something uh this is the last one so guys that's all for this video and I hope you liked it and if you have any query then please ask us in the comment section so thank you thank you for watching and we'll meet in the next video now in this particular video we are going to learn about host command okay so basically this command is used for the DNS lookup it basically means you are going to find information about the DNS servers as well the IP addresses of a domain name or uh or domain name with IP address you can say so but before moving forward in this particular video you should know the basics of domain name server okay so this is basically one of the networking Concept in which uh we will learn okay the following topics like actually have written already one blog on DNS so you can go and learn from this infosec writeups and if you will search for all about DNS 100 days of hacking you will get it let me search it for you infos SEC writeups okay so this is the first one write up by awarma okay you can get it from here so uh let me tell you the basic idea of what is this domain name server and all these things so basically DNS stands for domain name server okay it means the whatever the your google.com it is a domain name it will get converted into the IP address or vice versa or IP address will get converted into the domain name so the main reason behind this is domain name service why this domain name server came in a role okay so just think like a normal human if you uh you are given a one address like 192.168 4235 whether uh this is easily remember easy to remember or google.com is easy to remember okay just think once so obviously you will say like sir google.com is easy to remember that's why that is the main reason behind this of DNS that's why it came in a role so we will see the basically working of how it basically Works uh let me move down as said you can see the I have WR like in more explanation I have given here you can learn it and also how it works I will tell you and this is a domain high like root level domain top level domain second level domain like do com. government do mil these are the root label domains okay and try hack me Google USA subdomains okay so you can learn all about these things and now let's moving forward to the working of uh this DNS okay so whenever user types in web address this particular domain name what happen in this case it will first do the DNS query from where DNS resolver okay DNS resolver is also one of the part of this particular process where some records are stored now next what will happen it will send the request to this root server whether if the dominium end with.com or do anything then it will move to the root server it will ask for do you have this IP address of this particular domain if it will say yes then it will forward the request then again in fourth step it will go with the TLD server and again with author name server and after that it will go to the main server of that particular website after getting the IP address okay so this is the overall working of this domain name server and now we will talk about the what are the records in DNS okay so basically DNS records provide the information about the particular domain so I will like go down and let me tell you the records okay so these are the basically some of the records like a records this four a records MX records CM record you can learn about these all things like a records provide us the ipv4 addresses and triaa and also one more a that is a 4 a record provide us the IP V6 address MX records provide us the like Mail Exchange address CM record is also provides like a like it points the subdomain to the main domain basically if there is a uh gmail. google.com or google.com both will point to the only single domain or not domain single IP addresses okay now moving this is the name server record that is NS records okay and TT record is some kind of record that that admin stored some kind of text and all these things okay now let's move to the our main motive of this particular video that is the host command okay so I hope you got to learn about all those things about DS records I hope it is visible to you let me just increase the size first so that it will be easy to it will be easily visible okay so now let's enter the host and just provide the google.com okay wait a [Music] minute okay uh let's see I'm getting some kind of error okay host google.com Okay google.com not found why like this post okay it's working okay let me provide another IP another domain name like uh let me provide Gmail not. go yeah do who gmail.com not found okay why this is happening I'm not getting let me do first ping whether it's working or not okay temporary failure in name resolution let me ping another some domum that is a uh which dominium should I let me check here medium.com let me do medium.com why it's happening I'm not getting uh let me uh restart my this Ubuntu machine so that after it may be uh work let me do okay now I have started restarting my PC uh let me now perform the that command okay so I hope it is visible to you uh let's do host google.com Okay so here you can see the address of google.com that is uh that is the ipv4 address what does ipv4 address mean it means that it is a like uh 32bit itus I guess okay if I'm not wrong uh let me check why to create confusion for you guys okay IP address bit size okay I hope it is 32 yeah I was correct okay it's 32 bits address it ranges from 0 to 20 0225 okay so here you can see the IP addresses of google.com that is 172.2 1727 .26 and again with the with same like you will get this IPv6 addresses that this is the like version 6 addresses of google.com and the mail server address that is SM SMTP now what will happen if you will think about the concept of DNS what is happening here is uh when you are entering google.com so that domain is mapped with this particular IP address this one uh let me copy this IP address and and uh let me put it here what will happen whether it will go onto the google.com or not let's check okay damn so here you can see that that IP address is mapped to the google.com that's why uh like we are going on this particular domain name what will happen if I will I will just change it 206 to 25 whether it will go to the same or different let's check okay it's going to the same because that whole IP address may be belonging to that particular google.com let me do two okay it's same okay so now uh let's go for some another domain also host uh let's go with medium.com like sometimes it happens like uh you can't go on a particular okay I press something like print okay when sometimes what happens when you enter the uh IP address of some of the domain then at that time you will not be able to reach that particular domain because of firewall implementation and all so here also you can see different IP addresses mail servers okay so let me check this one 153 do 4 okay let's check whether it goes or not okay so yeah here you can see the direct IP address not allowed why because I think they're using Cloud flare Cloud flare they using yes your IP here I will get my IP address okay so sometimes it doesn't allow okay now moving forward uh in this particular video with the getting the DNS records of a particular domain name okay so how you can get it like uh using Hy option we can get and also if you want to get only the IPv6 address you can get if it is available so here you can see connection is refused now let's check with the CM decord okay so if you don't know about CM decord you can go here and learn about it on this particular block okay what is see these record forward one domain or subdomain to another domain for example you can see blog. example.com has a CNM record with a value of example.com This Means whenever DNS record hits the DNS record for blog. example it actually triggers another DNS lookup to which domain that is the example domain and it basically Returns the IP of the same that is main domain example.com domain okay so uh let's do the DNS lookup for this particular record that is which one cm record so the command is very simple host hyph T cm and you have to just write any domain which you want let's do with google.com Okay it has no any record uh maybe it will be for medium let's check okay no records uh any website uh okay let me search for random colleges in Delhi if I get any college website now let's go with the 6.com copy it and just paste it here okay so here we are getting the okay not found okay okay so these sites are not having any CM record let's go with some another record uh let me check with MX record that is M ex it should be there yeah it has a mix record let's go for uh Google medium yeah they are using MX cord okay and let's check for another record that is a txt record okay we are getting it here all those records uh let's check for okay another website that is s hant txt record okay we getting all those information whatever the text is stored in this particular text file in the DNS course okay so I hope you like this particular video and uh today we will stop here and the next video we will learn about something new okay so that's all for today's video and if you have any query then please ask us in the comment section so thank you thank you for watching and we'll meet in the next video thank you hello guys now in this particular video we are going to cover the if config command basically it stands for interface configurator okay basically in this particular video we will be doing like changing the IP addresses and all those things and also this command basically we use is to find the IP address and the MAC address of particular machine so before starting what is a MAC address so Mac address is nothing but a particular 48 bit address which we use to identify a particular device on a particular Network okay so basically this Mac address is printed on your Nic that is the ni is a one of the card which attached to your to your computer or to your laptop then at this Mac address is like written hardcoded okay so let's start with our video so I will just hit uh if config so here you can see uh I'm getting different interfaces like EMP 03 and Local Host and at this point of time I'm getting this IP address this is provided by uh virtual box and this is the IPv6 address and this is the my Mac address okay so don't worry I've Chang it okay and this was interfaces for the Local Host okay so uh basically this uh command provides us what information you can see here the ipv4 address IPv6 and the MAC address okay so moving forward uh if you want to uh get the information of particular interface how you can do it if config and just write the interface name that is EMP 0 S3 okay here you can see the only uh like information about a single interface okay what is the interface just like uh suppose if you are connected to a VPN then another interface will be created okay so it just provides us the IP address of a particular Network in which through to which you are connected and all okay so moving forward uh if you want to change your IP address how you can do it so this command basically provides us this functionality also another command is IP Command which we will cover in our next video okay which which is similarly used for these purposes so first let's uh change the IP address of this particular command that is if config and the interface name but before I will need to copy this interface name okay so let me clear the screen if config if config uh interface name and then I will uh provide an IP address let's to 192.168 do uh uh dot uh 25.0 and net Marx we will provide like this uh determines the number of machines which will be there on the network okay operation permitted why because we have not used Pudo so to change these uh things we we need a Pudo permission okay I will enter just password I hope I type wrong password yeah now it should okay let me try it again yeah done now again I will check the IP address if if config and M here you can see the particular IP addresses and netm okay so that's all for this particular video and we'll meet in the next video with another most amazing command so if you have any query then please ask in the comment section guys so thank you and thank you for watching we'll meet in the next one hello guys now in this particular video we are going to learn about the IP Command okay so this is similar to the IP config if config command okay so in this particular video we are going to learn about this so let's me open up the terminal and let me just increase the font size okay I hope it is visible to you and the command is just IP and you have to provide just one option that is a or a this one double Dr okay so this will give you the IP addresses of each interface that is this is a local host and second one is my this one interface EMP 0 S3 and my Mac address is there which is provided by the which what we say virtual box and this one is the IP address okay so uh now moving forward uh if you want to get the on the ipv4 address so what can you type okay so IP hphone 4 and Just A Dr and here you go and now you have got the only ipv4 addresses not IPv6 but what if you want to get the ipv IPv6 address then what command you can do IP hyph 6 address okay so here you can see this is the uh IP V6 address it means IP version 6 address okay so basically there are the two types of addresses that is a IP version 4 and version six and there are some differences between them uh like um uh differences in you can say on basis of bit size okay you can learn more about the differences between ipv4 and IPv6 and moving forward uh let me tell you about one more uh this option that is a IP address so de and interface if you want to get only information about some particular interface so I will go with this EMP z s three and here you can see the only result from this interface particular 0 S3 let me clear the screen so that it will be more visible to you uh let me again run the command okay here you can see the interface is this one and here is the MAC address and the IP address okay so in this way you can get the IP address and Mac address of your system using this IP Command okay if you want to learn more you can just do man IP and here you will get the multiple options as you can see here hyph for human rable for hyph for stats so output more information if the cap option appears twice or more the amount of information increases okay so uh let me try hyph s IP hyph s let's see what happens okay uh what should I do now object equal to address okay uh let me check like this yeah here you can see we are getting now various records like many more information okay this is rx byes packet error drop missed any packet which is missed mcast so all these are showing here okay you with this option you can get more information again let's see some another option which we can use here here like um if you we let's use hyph R IP hyph R address okay so here you can see the information about uh dissolver name and 6 I virtual box 64 scop link this is okay so uh that's all for today's video guys I hope you liked it and if you have any query then please ask us in the comment section okay so thank you thank you for watching and we'll meet in the next video thank you hello guys this is aush and now in this particular video we are going to learn about the who is command okay so basically this is the command line utility of one of the GUI based tool that is who is lookup okay so basically we use this particular uh command to find the information about a particular domain name as for example google.com or the IP address okay so this is the basically command which we will use and and uh let's see what kind of information we can get about one particular domain name or particular IP address okay so first of all let me find the IP address of google.com Okay so here I'm getting this one I will just copy it how I can do it just uh control shift and c I will just now hit contrl C to to stop this ping command okay now who is okay so now you will see this command is not not found why not found because it's not installed in our system that's why it's not found okay so just copy it okay paste it this is the AP install who is this is a command to install any package you want okay let it install okay done done done yeah okay I think now it's done it will take some time just wait okay now done let me clear the screen let me again type who is okay yeah uh yeah I can do uh like I am able to learn run this command okay now so here you can see there are many flags available to use this command that is host Port I for query who is I and follows its referral okay so now what we will do let's hit this one who is and first let's check for DNS only like for domain names okay so now here you can see multiple information about this domain google.com let me clear this screen and again let me show you the whole information about google.com so here you can see the domain name is google.com their ID is this who which server is this their URL is this like from where they have registered or what register URL and updated date you can see it's 99 2019 expiry date is 4928 okay so name server is this one NS one. google.com ns2 and so on and moving forward and here you can see the creation date all those things okay and admin organization who is the admin of this particular domain that is Google LLC is the admin as we all know country us yeah we know it andtime we don't get this email because suppose you buy a domain name from go go id.com okay so they take some some fees to you to keep your information safe okay so no one should access those information like your mail ID your password uh not password your phone number and all those things okay so in this way you can get the information about uh any particular domain name okay now uh let me again check with uh with the IP address whether I'm able to perform this not let me just copy this IP address again oh wait okay yeah 142k 250 okay let me clear this screen who is and the particular IP address and we are done okay so here's the all the results so net range is this 142. 250 do not do not to this range okay okay so IP addresses can be between this CID is this sl5 so if you want to learn more about CID I have actually uh write a blog on it you can search for it like submitting infos writeups if you'll search then you will get okay then Google parent all these information you can get okay so basically where uh you will think about where uh you need this particular command what is the use of this basically if you go in the testing field or penetration test testing or cyber security fi and then there is a phase of information gathering so in this particular phase we use it okay so that's why I'm telling you okay so uh let me uh search for some more information like f is what are the things we can check here who is hyphen keyword description okay okay if you will use hyphen a to search for all the mirror databases brief iy addresses with abuse contact okay show the email addresses okay uh let me try with hyphen B okay let's check what happens who is hyb google.com okay here you can see we are getting some kind of uh email address okay uh let me again uh like uh use this command and I will not use hyphen B option so so that we can uh get the difference okay so what was the command I had entered here who is hyphen B okay now I will just use who is google.com Okay so here you can see uh I think we are not getting any uh mail address here but here you can see admin email okay but here I am getting one address that is brjb someone's address it is okay so in this way uh you can use uh different options uh okay so that's all for today's video I hope you liked it and if you have any queries then please ask us in the comment section we will surely help you and thank you thank you for watching and we'll meet in the next video thank you thank you so much in this particular video we are going to learn about the NS lookup command okay so basically this command used to find the like information about the DNS records okay so previously in the host command we have find the DNS records and already we have covered what is the domain name server like it is used to change the uh domain name to the IP address and vice versa and also various DNS cords like uh CM record we have covered and txt record a record and for a record we have covered okay so many records we have covered till now and we will use this NS Lo command to uh get uh information about these particular records okay so let's start with the first basic one just start with google.com Okay let me close this caps lock and let's look up google.com Okay done here you can see the address that is this is ipv4 address and this this is IPv6 address okay so uh you can uh like what we say use this like this also you can use and look of hyph type equal to it means you are just defining the what type of record you want okay it may be a record okay let's search for a record iPhone type A and just provide the domain name and here you will get the address okay so in this you are getting this uh let me search for another domain name uh let's take some another domain name what should we take uh I'm not getting okay facebook.com okay so here you can see this is the particular IP address of facebook.com and this is for google.com so let me uh just uh copy this IP address and paste it in the browser whether we can access it or not let me just paste it here okay I think I not copied it okay just copy it and I will just open up the okay here I will paste it let's say whether it is accessible or not google.com with this IP address okay so it is accessible and similarly we will try for our this one facebook.com I don't think it will be accessible but still let's try okay it's showing not recommended I will accept the risk let's see what happens is I hope you have watched a scam okay okay so here you can see uh we are on this facebook.com page okay means we can uh go on this particular page using IP address okay so U moving forward uh if you want to get the record of like 4 a record like a a a a and a okay I hope I counted five okay so here will you can see the version 6 like IPv6 address of facebook.com now let's try some another record for another domain uh let me check for a record for some other another domain like I will now I will go for uh YouTube okay here you can see the IP address of YouTube I we know it may be accessible or not accessible using IP address okay that particular domain so now moving forward to the different records so we will search for the uh txt record okay let's search for txt hyph type equal to txt youtube.com Okay so here you can see this is the Google side verification some kind of text is stored okay and uh if I go with some different domain name like Facebook okay let's check okay these are the texts okay let's check for some another domain also I will just check for google.com okay here you can see different different like many texts are present there atlassian want domain verification okay many things are there and now moving forward let's check for the MX record that is the mail exchange record okay it it is basically we use it to like sending the mail or receiving the mail from from any sender okay so uh let's use it I will just uh change this from type to MX and this is you can see the mail exchange which is smtp.gmail.com for the small uh websites like let's take uh some let me search it search it for um I will open up Chrome here I think it this Firefox will take much time in this okay we are here just search for Linux commands Okay so let me take Java T Point okay yeah let me close this okay now I will use Java T point a record Java T point.com okay so here you can see this is the a record and here you can see two IP addresses are pointing to the same domain uh let me check I will just copy this IP address and I will put it in my browser let's check what happens whether it is accessible or not I don't know why it's not working of by directional copy paste is not here I think let me enable those setting yeah I think now it should work control shift C oh yeah now it's working okay so here you can see uh direct IP access is not allowed for javao let me check the another IP address it will be it will throw same error I think let's see what happens okay same same thing like direct IP access is not allowed so I hope you got it how you can find the different records using anx lookup commands so that's it for today's video and we'll meet in the next video with some amazing commands so thank you thank you for watching and we'll meet in the next one thank you particular video we're going to learn about the most interesting command that is the W gate command Okay so basic basically we use this command to uh download files from the servers or from any website suppose in case if you want to download any kind of PNG or you want to download any kind of PDF or uh you can say uh also if you want to mirror the website it means you want to download the whole website their whole file that is HTML CSS JavaScript all those file if you want to download okay so in this case you can uh do all those operations using this single command that is a w command okay so uh let's start now with the implementation part that is uh W get and the whatever the URL you want okay I'm just first I will give you the syntax so syntax is nothing but WG options and whatever the URL uh you want to provide it can be uh URL of any file or anything else okay so now moving forward uh what are the protocols that W command supports so it supports St TP stps that is a Hyer text transfer protocol secure and FTP file transfer protocol so these are the some protocols which are used by the WG command so HTTP runs on Port 80 sttp runs on Port 443 and FTP on Port 21 okay now moving forward uh let me increase the font size for so that it should it go it should be visible to you guys okay now now what I will do I will uh try to search for image I have already searched I think okay so Linux PNG uh let me copy this image address or uh let me do here also I will choose this one image okay let's take let me check open image in new trap uh okay m yeah this one is good copy image address and here W get and the oh my god let's let's see what happens let's see just file name is too long okay so let's take some another image uh okay let me search for from here I will choose okay okay I think this one should be no not this one open image in new tab okay copy image address now let's check so here right now I'm not providing any kind of options so it will just store my file in this current working directory but before I will just create a One Directory W get tutorial I will create okay I will move into that particular directory and I will again enter the command that is WG and the this one link so here you can see it is downloading my file okay now we'll do LS and here you can see my file has been downloaded okay now to uh see the image file uh there is a separate command that is a fee but it is um you need to install first you can do like Pudo AP install fee I know I don't know the pronunciation of this command but it can it could be f f something like that so you can see f is already newest version so now what I will do I will just F and the file name what it was I think L something yeah so you can see file has been downloaded okay cool now you can easily download the files it can be used in some kind of automation things okay if you want but manually we download files from our web web browser but in some cases we could we can use W command also so now moving forward uh we will uh see the uh like uh what like here you can see uh the name of the file is so big okay if you want to uh like like name it some different names okay I will then for that we use capital O that is hyph capital O option and then we will use the new name that I will provide this Linux PNG image okay and the URL let's check okay I will do LS and here you can see Linux PNG image I am not added. PNG let me add it first okay do PNG oh sorry sorry sorry sorry sorry PNG done okay let me do LS and now I will use f Linux PNG not this one Linux image Linux what what is the name it is Linux PNG I M A yeah okay so here you can see uh we have changed the name of the uh like file this this like earlier it was a long string like theux Dux pen Vector graphic pixel Bay all those things but now we can easily change the name of that particular file okay so moving forward uh you can use the different options like hyphen P option to uh like uh save the file in a particular directory in which you want so I will go just move back one directory and uh no uh let me PWD I will do and I will just copy the whole path here first okay if I not copy uh doesn't matter let's now I'm in which directory I'm in this home iuse directory okay now what I will do I will just uh like like I want to save my file in this particular directory okay but before that I will just remove those files uh CDW get rone star okay it's not a star it's basically asri we say uh let me close this terminal now what do you want to do you have to just give the whole path of this particular like location so I will just provide this hyph p and this one and the link so I will just copy this one link okay done it should be yes so now I will move back into this directory W get I'll do LS and here you can see the same image okay we have downloaded so using hyph p option you can uh save your file into some another directory okay so now moving forward uh suppose uh there is some conditions like if you are downloading a multiple files or anything else and you have a limited bandwidth or limited internet connection or you can say limited net you have like these days we use 1.5 GB per days and all those things so in this case you want to limit your bandwidth or Internet like to like we we don't want to like w get to consume more amount of net okay so for this we use the uh hyphen hyphen limit hyphen rate option and we provide the what should be the minimum amount of the net used by this WG command so for this what we will do WG hyph iph limit hyph rate equal to 1 m 1 m means 1 MB 1 MB and K means KB and all okay and URL we will provide and let's now just uh use some different uh image not this one this one I was learning about how I can see the image okay this is not necessary okay move back move back uh let's download the Spider-Man Spiderman okay so this one is so like it's great image looking beautiful uh copy image address if I will do like it's uh unsplash image uh no I don't want this link let me open up this one open image and new tab okay uh if I will click on download free whether I will get some link or not if I will copy this one let's see what happens okay it's downloading now it means we have copied the correct link now what I will do I will just uh paste the URL and uh we are done and also I will provide the iPhone o option to change the file name iPhone capital O file name should be Spiderman PNG enter okay I'm getting some kind of error let me do contrl c LS something C get log let's see what's going on okay saving spider-man. PNG okay let me again run the program uh you can use hyphen C option to uh what we can say to resume uh hyphen C I think it's uh uh small C let me check and again I will just open up some another terminal to check the W get log file if I get the same error again CD W get URL LS and tail hyph F log okay and let me just again run this command okay redirecting output to W get hyphen log. one okay let me just contrl C and W get one it is I think LS uh to at do one okay connecting to oneplace.com so here you can see we can see the live uh whatever the background process is going on you we can see this like this using tail command Okay so w get command W get log basically provides a log okay whatever it's going on okay so I don't think it is getting connected I'm getting some kind of error maybe it could be network error let me just close the connection I will use some different uh different image not from unpl okay Wikipedia is there uh let me open image in new tab I need a short link just okay just search for Linux only okay this one let me check let me close all these sides okay let's move back I think it's taking so much time open image new time no Linux PNG okay it's still opening man how much time it will take uh let me pause the video uh okay so I was getting a network error at that time uh now it has been resolved so here you can see uh like the log file of this one wg. log. one okay so you can see the file is already fully retrived okay so uh now I will just check again so here you can see the image I think it's too large to display here okay that's why we are not able to see it so in this case if you want to limit your bandwidth you can use the limit hyph hyph uh hyph limit hyph rate equal to whatever the uh amount you want to give like uh it could be 1 MB 1 KB or anything it's all depends upon you and your internet connection and similarly using Hy C we just checked we can resume any uh like uh any download which is not complete or if uh like similarly I just got the network error so I can resume using hyph C option okay uh now moving forward uh if you want to download some file in the background process okay so in that time we use the hyphen B option that is this one hyphen B option we will use and uh also the WG log file will be created similarly like this like uh this one WG log and WG log. one okay similarly this file will be generated and we can see the whatever the process going on and all those things so now moving forward I will just download one PDF I will just search for us uh file type this is Linux uh Google docking we call it if you use this kind of searches uh file type I will just type uh let's type Linux PDF I hope my connection internet should work okay again I'm getting it I don't let me pause the video okay now I'm done uh now finally it's working let me just search for a file type I will just use a let's just SE similar like this file type PDF uh colon I just let me write the file name also so that it could be easy so so here you can see there is one PDF file introduction to Linux this one okay TLD dp.org this is some kind of I don't know which website is I will just copy this one move back to our terminal just LS remove everything whatever we have uh downloaded till now okay RM hphone RF forcefully we removed everything clear the screen also W get hyphen B and the particular link or URL you can say so now in this case what will happen the log file will be created okay so I will just enter and what it's saying continuing in background p is this output will be written to W gate hyphen log okay LS I will just use tail hph fwg and here you can see all done we have finally downloaded this one I think let me do LS and let me go into the file section file system open Wate tutorial okay here you can see the file so in the background process what happens uh the file all the process whatever going on is getting stored in this WG hyphen lock file okay I hope it is clear to you so here you can see all the process like this is like how much bits of data and all those things the IP address from where it is resolving it is connected on which Port that is 443 that is the https uh and saving which file that is intro to linux. PDF file is saving okay so I hope that is clear to you it should be clear to you okay so moving forward let me just close on this clear this screen and now we will uh move forward and we will uh if you want to download some multiple files suppose uh your boss give you a task and give you the links and he's saying you download one by one one by one but uh you know the feature of this WG command you can download multiple files easily so how you can do it let's do cat let me I will just create one file that is cat uh books. txt okay and I will just hit the first link and let me go for for second one okay this one it should work let's check Okay Internet bro yeah working finally okay second file um okay done we will just save only this one file control control D to save okay now done let me check the first text whether it is correct or not yeah clear and LS I will just uh remove all those files RM RF now there is nothing else so which option we use to download multiple files you use WG hyph I and the file name but where is file name let me oh I just deleted the file name also no problem let me create again control shift V and here also uh this one yeah crl C okay just paste it here control D to save now we are done clear WG hyph I book. txt hyph I okay resolving this one connecting to this particular website fetching Linux for beginners fetching Andro inol linux. PDF file okay so in this case you can down multiple files let me check with ls command and yeah done here you can see both the files has been downloaded finally okay so these are some of the features which we learned about till now okay so now in the next video we will see the the most interesting part of this W get command which will be covered in our next video so till now we will stop here and thank you thank you for watching and if you have any qu then please ask us in the comment section guys thank you thank you for watching and we'll meet in the next one hello now in this particular video we are going to learn about the how we can miror a particular website or download a particular website you can say like that also so using WG command so already we have covered the first part of WG command and now in this particular video we will just mirror the website okay so what are the things we will be doing in this particular video so first of all we will miror the website and secondly we will just locally host the website using python okay and already the python installed in our one to PC okay this machine so these are the two things we will perform and let's start the implementation part so we will we will use the disate command and the some of the options the common option is use hyphen M but it is not suitable to browse that downloaded website locally so additionally we use some other options that is hyphen K and hyphen P option also to browse those website locally in a easy way okay and it downloads the website in a particular format you can SCT that okay so I have already selected this particular website you you can see uh this is a quite a good website and this is nothing but a free template from I've have got this from this html. design/ demo SL bird uh bird I am okay so you can uh do this uh you can also download this template or also any other okay so I'll just copy the URL and I will just paste it here and but before that uh uh wait a minute I'll just close it uh I will just create One Directory uh mirror website okay CD mirror website okay and now here I will use those particular this one command okay so now it will fetch all the HTML Pages CSS all the images it is fetching and here you can see contact. HTML images just bird lion deer Dove anything whatever is the images and all those things it is fetching so it will take AO I think uh it should take 3 to 4 minutes of time as uh website is not quite uh long like it should not take much time okay so here you can see it has faced multiple files you can see multiple images of images directory and here you can see it is fetching left Arrow blue all those images it is fetching okay xmlrpc.php okay it's present here in this particular website I think this is wased on WordPress okay okay okay okay I can see this WP content plug-in Json oh okay let it be I thought it is HTML page so that uh it will take appro 2 to 3 minutes of time but it is uh okay no problem uh let me search from another website Del which is an HTML not in WordPress I will just uh add one extension that is used basically used to find the what on which technology the website has been built M extensions uh walizer okay caps lock is on walizer okay look up website extension I have to search extension for Chrome okay Let's uh check so you can see it is downloading all those files and everything else add to Chrome ADD extension so basically this extension is used to uh check on what technology your website is built on it could be what press it could be stml CS it could be rectangular okay okay 10 now let me check I will also search for only HTML templates free download okay uh now super car okay this one is simple let me select this one t-shirt design okay so I will just search okay why this is not again it's still checking let me check the source code okay section ID script control U there WordPress is there not no WordPress is not okay this is based on the HTML CSS okay okay installation is successful okay uh yeah here you can see okay I will just reload this page okay so here you can see wiu YouTube bootstrap is is used in this particular website okay here it's still fing it will take much time because it's based on what that's why cancelled it okay uh CD html. design okay here you can see multiple folders and all those things okay uh okay it's still let me try with uh just I will serve this web page let's check what happens what are the files has been uh downloaded and all those things I will just copy this link and open the this Firefox okay it's opening let's wait okay so I'll just paste it and uh okay it's opening download free HTML template something is uh coming up here okay okay so it has downloaded the whole website I think okay okay okay I don't want the whole website let me close this window first okay we will for download the this uh t-shirt design website I will just remove this whole okay clear LS now nothing extensions I don't want like this okay so it is just uh like we can see uh if we are passing one particular like another directory then it is downloading from the all those particular things like uh it if I will provide this link then it will start from this mobile r.com extensions and all those things okay let's again try uh what was the command okay okay let's wait it's I think so fast okay okay let's I will just pause the video and wait for the completion okay okay it has finally uh downloaded everything now I will do LS CD mobirise.com LS and here you can see extensions it is there I will CD dot do/ LS so mobilize.com uh One Directory has been created and that extensions is there so CD extensions and here all the files should be there like tool M5 is also One Directory we saw we are sure that uh okay t-shirt design so here you can see the extensions to M5 t-shirt design and then the index. HTML file will be there okay I will do LS and no I will do t-shirt design LS and here you can see index. HML assets so uh let me move back to the directories okay CD do do slash dot dot dot dot dot dot slash LS okay again no I think I'm in Mirror mob.com okay now we just the python server uh HTTP server okay so just copy this link open up this Firefox okay the website we had chosen earlier like uh it was a very Ed website based on the WordPress that's why it was taking much time so it is a simple website that's why it got completed in a very less time okay so in mov rise okay directory listing let's go in mov r.com in extensions in tool M5 in t-shirt design and here we go okay done so this is the website locally okay you can see all the same design same color everything is there okay now you can if you want to uh like uh edit this website you can easily do okay so there also another method to mirror a website but it was related to W get that's why I told you about this particular feature I will go to about us uh yeah it's working I think okay now it is not linked I think about is not linked okay okay no problem so in this way you can mirror a particular website I hope you liked it and you can like match the things like everything is similar okay so in this way you can mirror a particular website if you want so I hope you liked it and that's all for today's video I and we will meet in the next video with some another another amazing command so guys if you have any queries so please ask in the comment sections and thank you for watching we'll meet in the next one thank you thank you so much particular video we are going to learn about the SS command okay so basically this command we use to connect to the remote machines or if you're not aware of remote machine then let me tell you first what is a remote machine so basically this is the concept of cloud computing in which uh when you use a machine this is just like a similar machine but we access it remotely okay that will be the similar machine like your PC and the same operating system will be there okay and it will be Linux or it can be Windows OS okay so basically that particular instance or that particular machine is stored in the data center of different Cloud providers if you are using AWS then Amazon Amazon data center will be there if you're using Azo then U Microsoft cloud data center will be there and in case of Google then Google uh data center will be there okay so basically what we are going to perform in this particular video so first of all I will create a virtual machine in Azure you can also do it because it's free and using sandbox you can uh like you get 1 hour exess of the Azure portal so you can go on this particular link or you can just search for create a VM using Azure portal then you will get this link and you will just need to login using your Microsoft account so I'll just activate sandbox it will take some time just wait for it okay but uh uh let me tell you first like uh SSH command so what port it uses so basically SSS command uses port number 22 okay so now this processes uh going on and in this particular this article you can learn about how you can create a the virtual machine also if you're interested okay so now 91 92 yeah okay and you have to just go there and click on this as your portal okay okay now here this here is the Azure portal you can easily uh create virtual machines in this just click on this virtual machine okay so I will just click on it and you have to just uh click on create as your virtual machine okay so here you can see the resource code you have to select just this learn and virtual machine name I will just use Linux VM and this is the open to server we are going to use in our case this is a image it means which operating system you are going to use so here you can see choose the base operating system or applicate applicable for the VM so we already it is selected that is UB to server you can also select different OS like uh windows and all for Windows we use RDP okay so now here you can see uh if you are going with s s public key then it will create a PM file but right now we are not going with it we are going uh with a simple way that that is a password so I will just provide a password that is aush and I will provide a username okay okay matching now s s such Port is there you can enable HTTP also it's all your choice okay now next and here you don't have to do any kind of changes no changes you have to do okay so you can directly just click on review plus create okay so basically the main purpose of this video is to show just show you the working of SSH command Okay so one uh this my scine is deployed and I can show you easily okay so here you can see validation pass it means you have done all the things correctly you have to just click on create here okay initializing deployment let's wait it will take approx I think 2 to 3 minutes of time and basically this video will be the first part and our next part we will cover some different things in SSH like how we can share files and all those things okay deployment is in progress let's [Music] wait okay it's going on here you can see the all the steps or whatever it is uh performing okay like Linux IP VM NSG okay it will take approx 2 minute of time now yeah yeah Linux VM is now it is getting created let's [Music] wait okay you can skip this part in the video like you can fast forward word now it's done just uh one confirmation should come yeah your deployment is complete uh you have to just click on this go to Resource okay yeah uh let's wait asent is not ready why not ready troubleshoot the issue okay okay I'm not getting why it's not ready let me just click on this VM extension issues no issue found okay okay no issue found uh let me just uh uh yeah IP address is visible to me I hope now I can uh do so here you can see the IP address of this Linux VM machine and I know the my username and password so I will use this SSH command okay and uh SSH and the username is whatever iush at theate and the IP which you have copied enter okay so here it asking are you sure you want to continue yeah I'm absolutely Dam sure click on yes okay so we have to just type the password I hope I entered correct password okay done so here you can see iuse Linux VM is the username and uh is the host name of that PC or ubu machine and this is aush okay so you can see this is not my Ubuntu machine okay you can clear the screen if I to LS so here it is nothing okay so if I will just uh create one file uh let me create uh cat test.txt uh leave I will not create one file let me just install all the one Apachi server in this sudo AP uh get install Apachi 2 so it is basically a web server we use to host web application so okay so just click uh hit enter okay why it's not working I don't know why it's not working let's check I will just close this terminal again I will connect uh I hope that connection has been lost okay SSH the username and the IP okay IP is not getting printed let's me check what is the IP here this one okay not I don't want HTTP something like that just remove all those things enter okay the password okay so now I'm this machine I'll just install Apache server Apache 2 hit enter yeah do you want to continue yes click on yes now here you can see the Apache server is uh installing this is not my Linux machine like you will think like this is my Ubuntu machine okay so Apachi 2 is getting okay okay uh after uh creating the server you will see the default page of apachi okay we are done and I will just reload okay so automatically here you can see the Apachi server uh default page is displaying okay so uh let me change this uh like I will just change the permission of one folder that is uh not 70077 and the folder is war www HTML basically this is the directory where your index. HTML file is stored I use sudo now okay and now let's move back into those directories I will just use CD do do slash LS again CD do do SL LS I will move into the war www HTML okay now we do LS here you will see there is nothing I will just create index. HTML and I will okay permission denied I will use sudo okay again it's permission is denied okay lsph L CH mode 77 operation not permitted let's use Pudo okay now I can edit this index.html file okay I will use this body and the H1 tag I will use this is is a tutorial based on SSH by aush okay and just close this body tag control D to save and just reload this page okay so you are done here you can see this is tutorial based on SSH by I so I hope you um got to learn about different things in this particular video like how you can create VMS in uh Azure Azure okay and also how you can uh uh install Apache server in your remote machine and the most important thing SSH command how you can connect so in our next video we will use different commands to uh we will see how we can upload files from our uh like this local machine to this machine but sorry sorry uh but we will use uh like different server okay like tomorrow we will use E2 server of Amazon okay but because uh this machine will get uh like uh out of network in 1 hour okay not in even 1 hour it will take uh approx 35 minutes will be remaining okay 42 minute okay so thank you guys for watching this video and I hope you liked it and got to learn about new things so we will meet in the next video so bye-bye and we'll meet in next one thank you for watching hello guys now in this particular video we're going to learn about the SCP command okay so basically this command is used to copy the files from one host to the another host that is uh in our previous video uh we had created the virtual machine and today we will work on that particular thing so basically in this video we will create one virtual machine and we will uh share the file or move file from this machine from this ubu machine to that particular remote machine okay so we will do this with the SCP command so let's start the video all first of all we will need to create a virtual machine so on this particular URL you can go like learn microsoft.com and uh intro to Azure virtual machine then you here you will get the sandbox and you will get the access of 1 hour of azure portal so you don't need to pay any amount of money for creating v machine or anything okay so we'll wait for some time uh it will just take hardly 10 second now okay let's wait 9 2 93 4 okay 100 okay so here you can see 59 minutes so it's basically we get access for 1 hour so now come down and just click on this as your portal now here you will get the interface and uh maybe uh you will need to sign in with your Microsoft account then and only then you will get the access okay it's taking some time let's wait okay here we go now here you will see the virtual machine you have to just click on it virtual machine and uh you will need to just go on Create and click on this as your virtual machine sometime yeah here you have to just select your resource Group and virtual machine name I will just uh use this name Linux VM and the usern name and password so I will write the username as iush and the password I will write sorry okay again enter the password okay password match so here SSS 2022 Port is allowed so basically SCP command runs on this particular Port by default okay so uh next you will do but here you don't have to change any kind of settings and all it will be def by default it will be same okay we don't need to change anything okay here we go now what do you have to do you have to just click on review plus create it will take uh approx 1 minute of time uh okay till now I pause the video okay guys so here you can see the validation is passed or now we have to just click on this create button so it will just create a virtual machine and we will get the public IP address of that particular machine and we will use that particular IP address to connect with this machine and uh whatever the username and password we have provided while creating this virtual machine we will uh use that one to connect to this particular remote host so let's wait for some time it will just hardly take a two to 3 minutes of time okay so deployment is in progress let's wait okay so till now uh till then I just uh give you the overview of what is the SCP command so already I have told you like this command is used to like U copy the file from one host to remote host so here basically this machine is my uh physical host physical machine machine you can say and the Machine to which I will connect like this virtual machine that will be the my remote host so I will use this command to share file from this machine to another machine so there are also some many of options we use for fast transfer for getting information while transferring we will use all those particular functions so here you can see the deployment is complete now we have to just click on go to Resource and we will get the particular public IP address and uh here it will show yeah here here is the public IP address first of all what I will do I will just uh uh try to connect to that particular machine using the credential which we had provided in while creation I hope the terminal visible to you just uh SSH and whatever the username I and the IP address okay so you have just write yes it will uh uh permission denied public okay I don't let me just close the terminal and again I will open up SSH iush at theate IP address okay password it's asking me for password hit enter okay now I hope I have entered correct address uh password okay okay so now here you can see the uh whatever the host name we had added like Linux VM and the I the username okay so if I will do uh clear the screen and I will write who am I so here you can see the uh username is aush and uh also you can see this host name has been changed from Linux VM uh from I to Linux VM I think let me again open up one terminal and here you can see aush virtual box is there okay so this one is my remote machine I just add one comment here remote machine and I will just provide the IP address okay so this is the like comment we use hash for writing the comment in this Linux terminal now moving forward another the use of the SCP command comes here if we we have a file suppose I have to just create one file let me create one file with the name of CAD test.txt and I will just uh not test I will write some another cat remote file. dxt and I will write something like this file is being sent from iuse [Music] physical machine contr D to save now we have to use the SCP command so basically SCP what it stands for it basically stands for secure copy so you will send the file using uh Port like 2022 it basically by default it uses Port 2022 and also our this machine accepts only port number 22 no other port number it accepts the if request is coming from coming for the some other port number uh other than 2022 then in that case it will not reply back to that particular host okay so now what we have to do uh I will just uh let me do LS so here you can see the remote file. text is there and let me just clear this screen and SCP I will use and I will use hyphone capital c for the faster transfer and the file name that is a remote file.txt and the username I will also need to provide here iush add I at the rate and the control shift V and I will need to provide the location where we want to just uh what we say store that file so I will store this file at this particular location home iush and 251 and I will just need to use this colon and uh sorry okay sorry sorry I just uh I will need to again write the command so so here I have to just uh use slom I okay so here what will happen basically uh this remote file.txt will get transferred from this machine to this machine like copy will be transferred so let me just hit enter and it will ask me to enter the password and I will just enter the password okay done so here you can see 100% so 0.2 kb per second was the speed and uh let me clear the screen and I will do LS so here you can see the remote file.txt has been uh like copied into this particular remote host okay uh like uh let me uh just send another file also let me create a.txt this is aush okay control D to save again I will use the same command just change the file name file name to aush now hit enter again maybe hope it will ask me to enter the password but let's see yeah I will need to enter the password that is Kumar atate 098 HH hit enter and uh the file will get copied into that particular location okay it's taking time I don't know why okay yeah done so I will do again LS here so here you can see i. txt has been copied now I will just try to read the content of this particular file okay so I think the connection is slow that's why it's lagging okay sorry Ive used wrong I have to read this okay okay let me just remove this okay yeah now just hit enter so basically it has overwritten with the like nothing we had written so by this command basically the text was over written no problem let me just read the another file we have also transferred another file that is the remote file.txt we can read this okay so here you can see this file is being sent from I physical machine the same text which we had written in this particular physical machine okay so in this way we can transfer the files from one machine to another machine and also by default the CP uses AES 128 uh encryption method to encrypt files while uh while translate you can say but if you have to use some another method then you can use the hyph C Small option also if you if you want to use some some different port number uh like if you will need to use then hyph capital P option okay but by default this machine is accepting only the port number 2022 so if I will use some another port number then in that case it will not uh what we say it will not accept the request so if I will do hyphone Port 234 and I will just try to uh I will remove remove the files from this machine okay it's uh like running slow I don't know maybe it's reason behind is slow connection it may be so I will just remove the i. txt file here okay sorry I you should there yeah so now file has been removed and now I have used the hyphen p234 and I will use hyphen Capital C option and just hit enter so in this in this case you will get like uh it will not accept the request like uh it will not display anything nothing will happen Okay to solve this issue we will need to use just hyph V option also hyph is small V that is just used for getting the default information okay hopefully we will get get not connecting to this port number yeah because port number is not open that port number is not open in this machine that's why so if I will use uh just port number 2022 and we have used the wrong command also hyphen P 2022 hyphen C Small hyphen V and now hit enter and here you got the all the information so now you have have to just enter the password but ever again you will see the information like connecting to this particular IP address on Port 20202 enter the password so done next okay sending command sending file modes i t 300% 15 compress outgoing raw data this compress to this so while trans Transit what happens whatever the amount of whatever the size of your file will get compressed and then again it will whenever we it will reach to the remote machine it will uh like um stored in the original form so again if I do LS here so you will get the i. txt file okay so uh now let's do with uh different port number let's see what happens to actually total port number in network we use are approx 65,535 are the total port numbers I've just tell it told about this for your information only so here you will see connecting to this uh particular IP and the port then you can see the port and after this nothing will happen because uh this machine is not uh accepting any port number other than Port 2022 so it will not happen anything it will go in the infinite Loop you can say and but like we just need to hit contrl C so basically in this way you can use the SCP command to share files from one machine to another machine remotely or or also you can say like the two remote machines are there then then only then you can use this particular command so that's all for the today's video and I hope you liked it if you have any queries then you can ask us in the comment section so thank you thank you for watching and we'll meet in the next one thank you hello guys now in this particular video we are going to cover about the most important command that is the uptime command okay so uh this is a very simple command and it will not take much time so let me introduce you first with what is this and so basically uptime is a command which is basically we use to find the how long the server is running okay so let's start with the implementation part so I will just hit up time oh sorry it's up time and here you can see it's 1851 51 that is 6 51 and up since uh 34 Minute like from right now it's 651 as you can see it's 652 right now and now it's running till uh 34 Minute and number of user who are logged in that is only one user is logged in and this is the average load you can see okay so to get output uh in a very uh easy way to in understandable way as this is there are multiple things here like Uh current time up time okay users okay so but before that let me increase the font size I forgot to increase okay so I can use different options uh you can use hph to see what are the options available so here you can see hyphen P it will show up time in pretty format so let's use this and let's check whether output comes in pretty format or not so up time hyph P we are done okay so the server is running from uh it's running since 35 minutes okay uh let's use another option we will use hyph S so it's uh the time at that time was 617 okay now it's 653 okay so and you can check the version of this uptime command using hyphen V okay this is something uh 3. do 17 okay so I hope you liked it guys this video so as this command is basically useful when you go in a corporate and you need to fetch some server up time whether the servers is running or not okay so in that case you can use this basically command Okay so that's just for today's video and I will meet you in the next one thank you thank you for watching now in this video we are going to learn about the most interesting command that is a uname command okay so basically this command you use to get the information about your machine okay so basically we will use this command to get the information about this Ubuntu machine so we will basically start with this and we will use some of the flags or you can say options with this uh uh un command to get the host name to get the kernel whatever the kernel is being used in this particular machine what is the name of the kernel and also you will get multiple information like operating system Hardware platform information machine information everything you will get to know in this particular video so uh let's start with the implementation part so here un name if you provide without any option if you will execute this command you will just get the uh like name of the kernel name you will get okay so here you can see uh as we already know like in the installation video we have saw like the ubu is based on the Linux kernel so that's why it is showing the Linux so but before starting uh uh the like going deep into the video I want to just uh give you the overview of what is the Linux kernel okay so a lenux kernel basically you can say as the core of the operating system okay if there is an operating system the kernel will be the core of that operating system B why because it creates an interface you can say or creates a connection between your Hardware hardware and your software okay so basically uh kernel has all the control of your operating system if kernel fails then whole operating system will get failed you can say like that also so I hope that is basic information is clear to you and we will see about ker release what is Kernel release so uh let me tell you about the kernel release so kernel release is nothing but whenever a new version is released of a kernel like if there is suppose version is suppose 5.0.1 you can say like that then uh again new version is create uh released that is 5.0.2 so why this new version and why this new kernel release has been done because if there is some vulnerability or any bugs in the first colel then that bug will get patched and then again new release will be done okay new current release will be done okay so that is the concept basically current release so now we will see the uh CER release so for this we basically use the hyph r option so here you can see the now currently version current release version of this machine is this 5.15 40 one generic okay so in this way you can get the CER release information now moving forward uh let me just show you this uh Linux like kernel name you can use hyph S option also to get the uh kernel name okay so uh like both will give you the same result like un name and unim high furnace uh okay and uh now next moving forward uh if you want to get the uh host name of your computer like host name is like that name which is used over the network you can say like that so if you you will do un name hyphen and then obviously you will get the host name as in my case this is aush virtual box is the host name and again uh next if you want to get information about your machine about your processor then you can use hyphen M for your machine you name hyphen M for your machine so like it is 64bit you can say you can see here it is and uh next if you want to get information about your processor then it's also easily you can get using iPhone P option so same information is being displayed here like it is the basically the architecture okay so now next moving forward uh if you want to get the hardware platform all those thing you will get the same I think yeah Hardware platform is the same 64bit and to get the name of the operating system so obviously it is uh J Linux so Linux operating system it is open to so now again uh like uh there is also one uh super command you can say like super option that is hyph a option which basically gives you all the result of these like you you don't need to write this all to get if release you you you don't need to uh write hyph r hyph s hyph and anything you can use a simple command that is a un name hyph a hit enter and here you will get the all the information like Linux is the Kel name this is the host name this is the version and this is the uh what you can say I think this is uh your uh version name it maybe yeah it should be version name like #p yeah it's a colel version name it is and next is the date of creation or installation and next is your all the architect processor architecture everything you can see and the and at the last you can see the name of the operating system so I hope you liked it guys that was a very uh basic tutorial so that's all for today's video and if you have any queries then you can ask in the comment section so thank you for watching and we'll meet in the next video thank you thank you so much now in this video we are going to learn about the another command uh that is the host name command okay so basically host name command is be used to get the information about your what is the host name like this name and uh how you can change the name also with the help of host command you will get the uh IP address okay so we will start with the implementation part so let me increase the first uh font size so hope it is visible to you so now what we have to do we have to just write the host name so it will basically give you the whatever the host name of your computer that is this one I virtual box okay so also you can uh like uh what we say change the host name and also you can get the IP address using different options if I will use hyphen I then it will give me this Local Host IP address and but if you will use the capital I then in that case you will get the actual IP address and whatever the IP address will be present in your system so in this case we have only one IP address and now moving forward uh the interesting part of this particular video is that uh you can change the uh host name also so how you can do it it totally uh there are basically two methods and you should be like uh run this command as a root okay like in my case this iush user is like in the sudos file and we can easily change using this particular command so how you can do it uh you have to just uh use this particular Pudo host name and uh host name and then what we have to do you have to just give the uh different name okay I will give this one actually this is my Instagram page username uh you can follow if you want so I think I enter wrong password let me erase now iush okay so a specified host name is invalid because we have used underscore so underscores are not allow I will just remove it underscores and hit enter and now I will again open up the one terminal new terminal and here you can see the host name has been changed from aush virtual box to this one xaby okay so but now what I want I want to uh like keep my host name as it is so I will just copy this one and what I will do I will just again uh run this command I use this and now in this case you will get that is same at same as pre previous one okay so moving forward uh if you want to uh change this host name in some kind of different method so how you can do it it's uh it is very uh unique thing you can say like you will you will use the one file I will create one file that is uh let's create with the host name. txt and I will write the host name as let me write uh uh let's write same thing exite and contr D to save and now what we have to do uh you have to just use this command that is the sud sudo host name and capital F and the file name which we have created that is host name. txt and uh now again I will open up the new terminal and here you can see the host name has been changed from Ice virtual box to exite again so in this way you can change the host name also very easily now moving forward uh if you talk about the like fq that is a fully qualified domain name that is basically domain name for a specific computer or a host on the internet you can see like that so how you find it using this only one option that is hyphen f so this is the now my actual host name so in this case you can get the fqdn also if you want to learn more about it you can just Google it what is what are fqdn so uh first now let me again change my host name to the previous one this one yeah now it changed so yeah done so uh I hope you like this particular video and if you have any queries if you have any doubt then please ask us in the comment section so that's all for today's video we will stop here and I will meet you in the next video so thank you thank you for watching and we'll meet you next one thank you guys bye-bye now in this video we are going to to learn about the password command okay so basically uh this command is basically we used to change the password of any user or if you want to add uh like password expiration days or anything you want to perform with the password any kind of operation like uh if you want to delete the password you want to make account password L then this command is used okay so we will basically start with the user creation like we will first of all add a user and then we will perform that operation on that particular user so I'm adding one user here only one or two names allowed okay I'm just giving the name as uh password user here new password it asking me for I will give the new password okay no required these information yes okay clear now first of all what I will do I first uh log into that user password user and I will just enter the password and yeah here you can see I'm logged in into that particular user and now I will just exit because I want to use my account okay so let's start with the uh password command okay so now what we have to do you the command is basically used with the Pudo why because only the root user or whatever the user who is present in the sud file that that can only change the password or the current user if you uh do like this sudo and only password it will what it will do it will change the password of your current account that is my account that is a and it will ask me for the new password okay but I don't want to uh change my password okay so uh for a minute let's change okay so here you can see password updated successfully but again I want to keep my old password so I will write that password okay password did successfully okay so now moving forward what you can do if you want to change the password of any other account that is a root account then also you can change that how you can do it that is sud sudo password that is pass WD not a full password it's a pass WD and then the user account name that is root so here you can change the password password updated successfully now what you can do you can just log in with that credential using Su that is switch user command and here you will need to just uh okay so now here you can just enter the password of the root user and you will get the access of the root account okay so with this you can change the password of any other user and also you can do many operations okay so now what we will do we will just uh uh change the password of the the user which we had created now so let me just close this terminal and uh I will just copy this username because it's so long username I had Tak no problem just sud sudo password and the name of the user that is a password user and enter and the new password I will provide him just uh okay password updated successfully so now what I will do I will just open up the new terminal and I will log in with that new password I know the password is not visible because the this is the feature of the Linux like you cannot see the password like it's a great thing okay password user user user okay it's not coming okay now door okay yeah so here you can see you have we have logged in with this particular account so now let's uh do some certain operations like now what I will do I will just close up this terminal and uh I will just use some uh some options like high friendly option now we will use so basically what happen this option deletes the password and make the account password list okay so if we do like this password hyph D and the username that is a password user and here I have to use sud sudo so password expiry information changed okay now what I will do I will just again open up the new terminal and I will try to log in and I will check whether it asks me for entering the password or not so here you can see it is not asking me to enter any password as you can see the password user uh like is logged in now if I will do here who am I here it will show me the password user so using hyund the option you can just make any account passwordless so suppose uh if you want to create a guest account for the like any user who want to use the system and you will just give him them give him that certain uh permissions like not you will not provide him the root permission and you can create a account passwordless the guest account can could be passwordless uh let it be okay it will not affect your system or the administrator so in this way you can just create a passwordless account now moving forward uh let me try to just add the password let me check what happens if I do PSE sudo password password user and H ask asking me to enter the new password I am again entering and now I will just exit here and again I will try to just switch into that account and now it should ask me to enter the password and here you can see it's asking me to enter the password and now here you can see I have logged in as the password user okay so in this way you can add the password remove the password or you can log into that account using terminal using switch user command so many information you got till now okay now moving forward uh suppose if you want to like immediately change the password if you suppose if you will use hyphen e option let me clear the screen first I will use Soo password hyphen e option if you you will use hyph e option so what it option does it basically uh like prompt the user to change your password after login okay so let me show you just uh the implementation part I will just use that username password user password expiry changed and again I will exit and again I will try to just log in with this user sorry password user and I will just enter the password and it will ask me to you are required to change your password immediately administrator enforce like as I admin I just enforce that particular user to change your password immediately okay you got it like Suppose there is a uh like organization in which the admin want to change the like like admin wants like uh their user should change their password immediately okay so he can just uh add multiple users and then it will enforce them to change their password immediately okay so it ask me to enter the current password and the new password I will write the password is sorter than eight correctors so I have to enter the password which is longer than eight correctors okay the password fa the dictionary check it doesn't contain enough character okay no problem so but uh you got the point I just didn't use the strong password that's why it's showing like this but in case of you if you will enter the combination of the zero and one and makeig capital letter small letters characters then that will make the basically a strong password okay so now moving forward I hope you got this point okay but still let it be I will just let me show you the implementation otherwise you will think like uh I didn't uh showed you the implementation but again let me just do the same thing and I will just log in that user I will enter the password and current password it is asking me current password I will just enter the password some long password I will enter okay so it's not showing any kind of air right now so sorry again I will need to do the same thing again there is some type mistake it should not done yeah okay finally we change the password okay now I you do who am I and you can see like I'm logged in as the password user okay so using hyph option you can just force the particular user to change their password immediately after login okay so now U moving forward uh if you want to add the like some number of days like uh minimum number of days required to change the password suppose you create a user and um like uh Suppose there a there is a organization and there is a intern okay intern comes in organization comes in organization to do internship so obviously you will provide him he will work for some kind of 90 days or 120 days or any number of days he will work so obviously you will create their account and you want to automatically expire their account after certain period of time or or you want to change his password after certain period of time okay there are many number of requirements you can do so to do these kind of things we use the minimum days okay mean days option so it means we cannot just change the password before 100 days if you provide 100 in uh in a option okay suppose the intern you don't want to change the password of intern uh till his journey suppose he starting from 0o to uh 50 days if there is intention of 50 days and you don't want to change the and you don't want to like in turn to change his password in this case you can use easily uh hyphen M as option so let me use this option like it's a great thing uh I will use this password and hyph M days I will use M days and the number of days I just I'm assuming the 50 and uh username password user I think it was the username yeah okay so there is a invited option it is showing me uh okay is there any okay there is no any option with hyphen M okay let me just try with hyph iph mindus maybe it should work let's see okay it's showing me permission deny and why it's so just clear the screen I have not used sudo here that's why it's showing me permission Den so sudo and password expired information change and now what I will do I will just not exit I will just clear the screen and now I'm logged in as a password user and I will try to change my password so whether I'm able to change or not let's see because I have changed the permission of like I cannot change my password like uh till 50 days okay changing password for password user okay but now let me just close this session because this is a like uh you can say old session I will create a new session and then I will try to change the password sudo sorry Su password user and the password what it was yeah I forgot yeah let me just increase the font size I will just enter this password and I will write Uh current password okay so here you can see you must wait longer to change your password okay so this is a uh like great feature like you cannot change your password before 50 days okay similarly you can use the max days option it will just uh like uh suppose if you provide 100 days then after that what will happen your password will expire and U you will need to obviously change that password and okay so what we will do we will just contrl C okay it's not working control C I don't know why let me just type like this okay password unchanged now what I will do I will just uh use Max St option so what it will do it will just uh like your password will get expired after this number of days so I will just leave it uh as 100 pass expiry chain and uh you your password will expire after 100 days okay and also you can use another option that is one day option password hyph iPhone one days so it will warn you to change your password before expiry okay so permission denied you know the reason because we have not used sudo here expiry changed okay so this is the way to manipulate with the uh password command okay and also one more thing is there like inactive is also one option which we can use to deactivate account suppose after 10 days of expiration uh your password expires and and still you don't change the password and in that case your account will get deactivated okay and also one more option is there that is password hyph capital S and sud sudo and I will just provide a username hope it will work yeah so here it will show the some of the information like uh you can see the date the today's date is 39 IP just shows the uh like uh account is locked or unlocked and here the date shows the uh creation of the password and the 50 is the minimum days and 100 is the maximum days as we got to know and 10 is the warning days you can see here okay so that's all for today's video guys and I hope you liked it and if you have any queries then you can ask in the comment section and and please just give me the feedback in the comment section like how is the videos going on and are you getting or not and also you can uh ask me if you have any doubt on Instagram you can just uh you can just uh follow this page that is xaby I know the name is little bit difficult uh tricky you can just search asore 3xa yt3 uncore okay you can ask me doubt here also so that's all for today guys and we'll meet you in the next one so thank you and we will meet in next one bye-bye now in this video we are going to learn about the CH as command okay so basically this is similar command uh just we learned about in previous that is password command but in this we cannot change the password okay so we will start with the basic options and basic implementation of this command so that is CHS and using hunel you can get the information of a password of any account but before moving forward for we will need to create a password uh sorry not password a user sud sudo not user I will use add user and I will name that user as a xaby okay so I will just use like this xab BYT XA okay password nothing nothing nothing nothing why okay clear the screen now just ch age and provide hyphen L as option and the user name that is a xaby okay permission denied okay no problem we will just use the Pudo and we will get the permission is that easy yes okay so here you can see the the last password change is that 7 uh like 30 September it means today's date and password expires never never nothing is added account expires nothing is added minimum number of days between password change is zero uh by default and by default maximum is 999 it's uh like it takes the date from 1970 I think that's why it's showing that number of days and warning warning is this like if your password get like uh uh n9th after before 7 days of this completion you will get a warning okay so now uh let's move and I will use this uh we will use the maximum number of days like we will use hyphen M option to change the maximum number of days like this one so how we can do it CH is hyphen capital M I will just use 100 and the username that is uh this one and permission denied again because we have not used sudo let me use too and done and we will just clear the screen and just call that function and here on that command and here you can see the maximum number of days between password change is 100 now similarly you can just uh add the minimum number of days also what it will do like it will just uh you cannot change your password uh before that particular days whatever you specify in minimum days so you can do it it's simple just instead of capital M you will need to use hyph M and you can use here the number of day that is 50 like till 50 days you cannot change your password again let me show the information and here you can see the 50 days like minimum number of days between password change is 50 moving forward if you will provide a minus one option then what will happen let's see with maximum number of days it will remove that uh it will not check for that validation hyphen M and if I will provide minus one and and I will again check and here you can see minus one it will like it will not check for the maximum number of days if you will use minus one but I don't want to use minus one I will simply use the 100 to keep things simple okay moving forward if you will use uh zero in a small M like in minimum number of days it means the user can change the password anytime but if you but if you use some kind of number here then user can can change that password after that number of days if I use zero then user can change the password anytime if he wants okay that is the main use of zero and but I will use 50 here okay now moving forward uh if you want to add the expiry date in your password like your password should expired after that certain number of days okay so how you can do it if I will use like this Pudo let me just yeah sud sudo hyph capital E and I will use the format as year 2022 uh 10 and 01 and the username okay and tomorrow my password will get expired and here you can see account expire expire uh it's on October 1 20202 okay but password uh last password change this and password will expire when in January 2022 yeah it's a little bit like illogical thing but yes you can understand because we have not I have just used this expiry date like uh normally okay so moving forward if you want to use the warning like uh Suppose there are 100 days after 100 pass will get expired but you want to war the user before 7 days then in that case you can use hyphen W option hyph W and suppose you want to war the user before 10 days and uh here we got an error this is capital W set expiration warning days to warn days okay okay sudo hyen W1 yeah now done and here you can see number of days that is 10 as we provided here okay so in this way you can uh change the expiry date minimum days of required to change the password password validation warning days you can do all the things with this particular command and also you can do same things with password command also but yeah if you don't want to change the password then you can use this command normally like you don't need need to change the password again and again using password command okay so you have basically two commands to do this same thing that is password and this one what it was CHS okay so that's all for today's video guys and I hope you liked it if you have any queries you can ask in the comment section and we will meet you in the next video so thank you thank you for watching now in this video we're going to learn about the basic command that is NL command okay so basically this is a very simple command okay but sometimes it useful for Linux administrators in some cases okay so we will see the one uh use case and but before that we will create one file let me give the name as names.txt I will write some names here aush and ainos and uh Harry and uh I will write Ron and again let's take some another name that is uh um am okay I will re use contr D to save and now I just read this file names. txt but in this case you can see like there is no numbering here okay but sometimes we need to just get numbering like if you suppose this is a code uh if there is a code file and you need some numbering in that then we use this NL command to get the numbers so here you can see see that 1 2 3 4 5 is listed here okay so suppose if I create another file that is index. X HTML I write like body and I will write this H1 hello world and I'll just close the body contr D to save I will just read the file C index.html and you can see this we are able to read but now I want the line number of this file like of this code sometimes what happens uh like uh we get some kind of error in a particular line of code so in this case it is useful to like debug that error I will use this NL and I will just provide the name of the file what was it index.html and here you can see there 1 2 3 line number okay so I hope you got the what is the what will be the what can be the use of this NL command but yeah it's very simple so that's all for today's video guys and we will meet you in the next video uh with some amazing commands so that's all for today video and we'll meet you next one thank you thank you for watching we'll meet you in the next video thank you now in this video we are going to learn about the process in Linux Operating System case so basically in this video we're going to cover multiple things about the process what is the process what are the types of proc what is the P ID and basically we will surely learn about the basic concept of PS command we will just take an overview but in detail we will make a separate video about this on PS command Okay so let's start with the process if you are a cc student and if you are a operating system student also then I hope you are aware of process but if not then I'm here for you guys okay so let's start so what is the process so the basic and simple definition of process is execution of a program okay so now what many of you will ask me what is a program s so program is nothing but uh bu like whatever you write in a CPP code or a python code or a Java code that is a program and whenever you execute that program it becomes one of the process but uh if you take a real life example of a process here here you will see many apps are there if I will open Firefox that will become one of the process if I open this thunderboard that will become one of the process if you will open files that will become one of the process okay so as for definition process nothing but a execution of a program when you are executing any program then you are simply creating one process in your operating system okay now moving forward what is a p ID so p is nothing but uh you can say it like as a process ID it is created by the created by Machine by Linux machine and which what it does which uniquely identifies the process Suppose there are multiple processes going on in this Lance operating system so to identify each and every process there are a unique ID like if you are aware of the primary key of dbms so it's similar like that it unly identify each and every process okay or if you will get a real life example of account number so more than uh one account number cannot be associated with the two different people okay so similarly P also works like it uniquely identifies the particular process and also in Linux there are basically the we learn about the two types of processes mainly that is uh one is foreground okay and the second one is the background process so as a name suggest you might have guessed like what is the foreground and what is the background so foreground means whatever the process which are by the user so that is the forr if I will do here uh what I can do I can just do p this is one of the process if I will do who am I it is uh sorry who am I it is one of the process so whatever the user is entering the command or opening any kind of application or anything happen that is a example of the foreground process and now if you will talk about the background process then in this case uh what happens the operating system has multiple person which runs on the background as for example if you'll take an example of the Microsoft Word Ms word so in this what happen whatever you write in uh like in a what we say in a word then if uh any mistake happens spelling mistake then what happens in that case like uh it displays as the yeah this is your spelling mistake it like shows in color so how how is is it possible it's possible as the background process running on to check the spelling mistake you might have might happen Okay so this is the concept of the background process okay so in Linux we basically we can also create the background browser using uh I think some kind of ENT I think we use ENT to use the background process so yeah here you can see the 2 12510 P ID has has been created for this to create to do who Ami as the background process to stop this you can hit just control Z or contrl C contrl C okay so if I will do FS command so it will display me the foram process I think not FS I will need to like uh install this command FS or FB it is I'm not remembering like we will cover this all those command and all those in our next video FP is there maybe no not it's not there FP is not there uh let me remember the what is the concept what are the command for the checking for process yeah so FG is the commander to get the foreground process so here like no job is it is showing no job okay so if I do bz so bz also there is no background process going on as per this operating system so also we will learn about the some of the command like in the next lecture that is the PS command with which displays of the process State okay so right now it is displaying with the two like what we say two processes so let me first clear the screen and surely we will learn in detail about what is the PTY Time same in our next lecture but let me just show you the example of the foreground process so if I will open of this Firefox right let me just split the screen and I will just not Firefox I will open this uh let me open Firefox so right now currently it's showing me like this processor but for more you can check psone e okay so here you can see now Firefox is displaying here like 12 630 if I will close Okay and again I will check whether it is displaying me or not I will just check with it PSI fun okay so here you can see there is no Firefox but when I will open up so Firefox process will get added and it will display me the P ID of that Firefox so now again I just clear this screen and I will again I will enter this PSI so here you can see like now different p is being used for the Firefox now to stop this process you can use kill command also so kill command and the P ID that is the one 365 and now done so your fire FOC is Clos now so that's all about yeah guys about the process I hope you like it particular video and surely in our next lecture we will get to learn about the for forr how to get foreground background and the PS command okay so we will learn all about these three commands and the process States in our next lecture so thank you guys for watching this particular video and I hope you liked it and if you have any query then you can ask us in the comment section thank you guys and we'll meet you in the next one thank you hello guys now in this particular video we're going to learn about the PS command okay so basically what is a PS command why we use it we will discuss each and everything in this particular video okay so what is this PS but before that me just increase the font size now I hope it is visible so PS is nothing but uh process State what does it mean it basically means it just gives us the information about state of any process okay it we will get the P ID of a number name of the command who is the user using that particular process so we will get each and every information about the process but before starting and going into the deep Insight of this topic uh you should know what is a process process nothing but a execution of program when I open this Firefox it will become one of the process when I will hit this particular thing it will become one of the process I know it is like any command but still if I will open any this music rhythm box then it will become of the process process is nothing but the execution of a program okay so now let's uh play with this PS command so when you will enter the PS it basically gives you the uh like status of this current shell what are the processes running in this particular uh cell like this is one of the cell if I will open another window of terminal it will give me another shell okay so here you can see we are just getting this PS the command which entered just and this is the bash is one of the like you can say a shell which acts like a parent uh uh process like some other process use this bash to execute some kind of uh their task okay so now let's basically talk about what are these four types of uh like what is this like P TTY okay so let's start with the p ID okay so what is a p is nothing but the process ID what does it mean it basically gives us you the unique identification number of a process like uh uh let me tell you the example of suppose in a family member uh each and everyone will have the different name okay not like uh two person will have the same name in a group of like family of of two to not two five to six members okay similarly this p is there like process ID it uniquely identifies each and every process in this operating system okay it just gives you the particular number of four digit and all so I hope that is clear to you what is a process ID now moving forward that is TTI is nothing but a terminal type it gives you the information about the what type ofal is being used by the user let me just write uh terminal type and yeah if you are just watching this video so don't just keep watching uh make notes also so that will be helpful for you for your further use now this is a time is nothing but the CPU utilization time by the process so here it is zero because no any other process using this bash shell or bash command okay so this is CPU utilization thing okay now moving forward the CMD is nothing but the command which is used by like what commands have been applied for this particular process okay so I hope it is clear to you like what is p TTY time CMD okay now moving forward now you will be thinking about why there is only two processors displaying because it PS by default displays the current uh process in a current shell okay so to get more information for the different processes like on a boot time there are multiple processor runs like on booting of system so let me just uh enter this PS I from a so here you can see there are the multiple processes you can see like what other the commands has been used like uh system D SCSI paide okay this one colored so there are many processes here you can see in this particular like screen so here you can see the PS command is also there like the P 6203 okay but yeah one more thing is that like if the PS command fures the result from this particular directory P here if you do LS then here you will get the information about the particular thing okay so uh in this particular directory you can see many files are there like like like it basically fetches the particular information from this particular directory okay now wait just move it on to the RO directory now moving forward uh suppose I just uh create one process okay let me just create one process but before that I want to tell you one command that is one option that is PS Hy C Discount basically option what basically it does it basically uh like gives the information about the particular process which you want okay in case if you want to get information about the particular process uh then you can hit the name of that particular process here suppose I need the information about the Firefox okay which is now it's not running so I can get this so now what I will do I will just first clear this screen and I will open up this particular Firefox so now what will happen when I will click on this Firefox one process is getting created and then the P ID is given to that particular process and you will see that in this like uh now in a seconds okay so let's wait now you can see the this Firefox has been started now I will use this PS hyphen C and the name of the person that is the Firefox so here you can see like from 10 seconds it is utilizing the CPU and the PID is given and the command is using like Firefox okay like you will say like you not use this command but yeah let me show you if I will hit into Firefox the Firefox again the one terminal Firefox will start okay it's say fail to load yeah but some module is fit but it's still here you can see one Firefox window has been appeared if I just close it okay so that uh this is the first one okay so in this way you can see the information about the particular process uh and if let me just enter one more command if I will hit here cat and it is now in the weight State like it is just what we can say asking for the user input whatever I will write and anything okay it is just waiting for the user input so I can use this command also yeah like I will write your cat and here you can see the PID is assigned to this particular process okay so now what I will do uh if I want to just uh kill any process I want to just uh whatever you can say discard any kind any process then I can use the kill command and I will just give pass the parameter as this P ID so I will just enter this P 739 and then here you will see like uh let's see what happens so here you can see terminated the cat is now terminated and similarly you can do for this uh what you can say for Firefox also but before that uh let me just uh use hyphen a option to again view the all the processes so when I will clear not I will clear this just do PS hyph a and here you can see uh what is the P 6214 let me check whether it is visible or not yeah here you can see the 62 6214 p is generated okay what if I will kill this 6214 what will happen the Firefox window will get closed okay so you can see now again I will use PS I so here you can see there is no 6214 and also no there is web content uh like what you can say web content command or any process is not displaying here as you can see in the previous command here let me just move back here you can see the web content process was also there so in this what has happened the 6214 P was the parent process and under this process there are many other processes like here you can see the web extensions web content and all those things okay so in this way we can uh use this PS command to get the process of uh any particular uh application or any command okay now moving forward about another option that is the PS hyph U okay so what this basically it will do what uh this Con do so hyphen new option is B basically used to giving the like you want to get information over the some particular user so if I use I I will get this information so these are the process which are being used by my command not by my command sorry uh by me actually I is one of the user of this operating system if I use R hyph you root so you can see the uh these are some processor which are being used by the root user okay so also there are uh one more option that is the Au option PS command which is used for uh getting detailed information about the processes so PS hyph Au just plays the result in more detailed format okay so here you can see the name of the user is uh like display like whatever user is using this particular command this particular process and the virtual memory utilization TTY terminal type stat start when the process started so here you can see the 549 at 549 actually I had started my the system so it is displaying like on Bo time this process has been started so you can see all the information but now here you can see at 61 this process and now at 659 this command was done was uh used okay so in this way you can get the detailed information about uh your process okay also you can use psyph a to get the running processes so here you can see these are the running processes okay uh okay yeah this is the time command start okay so that's all for today's videoos guide I hope you liked it and it was a very uh interesting thing like to get the like what are the processes being used in your operating system if you learn more about this you will get to learn also more like um when you will explore personally then obviously you will get to learn more about this so that's all for this video and we'll meet you in the next one with another interesting command uh okay so maybe I will create video on top command after this so let make in the next one so thank you for watching bye-bye now in this video we're going to learn about the top command Okay so before starting this video first of all let me tell you about the what is the top command okay so if you have learned about the PS command like which gives us the process States of uh like of all this system similarly top command is also one of the command which lies under the process management okay we can get the uh information about the different processes like what is the p that particular process how much memory is being used by that process okay we will see all the details and what are the users and what the users using that particular process so everything we're going to see about in this particular video so we will start with the simple and basic command that is a top simple when you hit Top then it will show you the details about the other running different running processes by different users and all those things okay uh but before that let me just increase the size of my terminal I hope this ible to you I'll just hit Top okay so here you can see the P ID the what P ID what does it mean I will tell you everything about the all these three what is these all things okay but before that I will need to separate like this the screen and I will just open one command line also okay so here you can see what is the P ID P just Define the process ID like uh if you don't know about P let me tell you like like like uh every device has a unique Mac address similarly p is just like that like it is it uniquely identifies each processes whatever the process is created by the user then the our system assigns some P to that particular process to uniquely identify that process similar that is the process ID okay moving forward if you will see the user so user section just defines like who is the user using that particular process uh don't give attention on spelling M Stakes okay that is not important here right now so what is PR PR is just uh like priority okay what is the priority of that command so the thing is that if the your what we say the number is lower so it should have the higher priority you can see the zero so these processors have should have higher priority okay like you can see 20us 51 so it is you can see 2020 everything is there like so here you can write the lower the number higher the priority what does priority mean basically like this process like for if something happens to the more priority command or more priority process then the CPU users should like not CP uses just think like example Suppose there are two processes A and B and B the priority of B is low but priority of a is high okay if some Interruption happens with it then then a can use more CPU uses you can say like that okay so this is the defines the P like what is the prity of that particular process of command and for the you will see here it is V which basically defines the virtual memory used by the task okay it is I think it's in KB it is in KB okay so that's why it's showing like bigger number okay so it is virtually you can say not virtually virtual memory used by the task okay moving forward what is this rest so rest is uh what we can say I think it is the physical RAM yeah the command used like whatever the process is running like how much RAM this is particular using like this particular process how much RAM it is using so also in the KB this data is in KB okay and uh moving forward if you will talk about the shr so shr is nothing but a shared memory it also in KB okay and then the percentage CPU percentage memory time and what are the other option you can see here uh where it is time plus command all those things like this is this uh this show the uh which command uh like after entering which command this process is running okay so here you can see all those things okay if I will just uh yeah wait a minute what I will do first I will just stop this stop command and I will again run that top command and I will show you one thing okay so here you can see the top command is running okay like different processes coming here and there okay now what I will do uh but command is not visible let me just string create this one yeah yeah now you can see the command is visible if I do Control Alt T and I will hit this F Fox Okay so this command what it will do it will just create a new process okay and then again you can see here if I will hit enter in this particular terminal then Firefox will come up there and some P will be assigned to that so here you can see which command is this Firefox and the particular time you can see how much CPU uses per memory plus virtual memory okay and RAM also and who is the user I is the user and the P ID is 4790 okay so in this way this particular top Comm Works which dis play you the particular information about any particular process okay so now what we have to do uh if you want to just uh what you can see uh you can say like if you want to get information about the particular user like uh some let's suppose I want to get information about the I user what process is being used by that particular user so I can use those command also okay but before moving to that uh I will just tell you one thing like if you want to kill any process while using top command how you can do it you have to just in this particular terminal uh let me just increase this one okay uh where it is uh I think this one yeah this one Firefox is running Firefox p is what 4790 now what do you have to just hit K so when you will enter K so here you can see p to Signal default P ID is 1622 so here you can do uh like enter the PID of the process which you want to kill or which you want to close so if I will search for fir Fox I think it was 4790 okay so let me just Saed this okay uh yeah here you can see 4790 is some Pro is let me just increase this one the width of it so 4790 I'm not able to see 479 here you can see 4790 is this one so I'll just hit K and I will write enter 4790 enter and here you can see the what happen when you kill the command um not command when you kill the process then you need to give the particular signal so in this i h 15 so you can see like Firefox has been closed and also here you can see the terminated okay so why I entered the p uh 15 because like it's kind of signal which we use with the kill command okay so we will talk about the kill command in some another particular video okay now moving forward what I was telling about to get information about the posst used by some particular user so how you can see you uh like how you can do that what we have to do you have to just enter top hyphen U and the name of the user I and D here you can see all the processors which are being used by this particular user oh I think multiple processor being used okay so in this way you can get information about particular user if you want to like if you work in a corporate world and you get like as a un administrator then in that case it will be very useful like to know like which user is using what kind of processes when something happens then you can see okay and also there are multiple things like uh you can if you will hit Z then the running process color will get converted into this what we what red color and if you will do press uh like what you can say if you press C then you will get the path of particular command like for which in which path that command is particular running so here you can see The genome cell is in user bin directory and many more things here it is okay so that's all for today's videos guys I hope you liked it and if you have any quer then you can ask in the comment section so thank you thank you for watching and I will meet you in the next video thank you now in this video we're going to learn about the kill command Okay so already we have covered the PS command and the top command okay so in this video we are going to learn about how we can kill a particular process or you can see the how we can terminate a particular process process sometimes what happens in our case like you open a Firefox or any application and it becomes unresponsive okay and at that time you cannot access that application and you cannot use that particular application so in that case you need to just uh you want to just terminate that process or close that application anyhow okay so for that purpose we can use the kill command and also you can normally you can also use that Kil command okay to close any application or toate that particular process so how you can do it so there is a separate command in our Linux system that is a kill okay so kill is the command you can use okay so there are the many signals provided by this particular command you can get those signal using the kill hyphen L option so here it will list all the signals which you can use but mostly used signal is the 15 this one signal terminate and also you can use the signal kill signal kill okay so these are the signal which are used mostly by the kill command to kill particular process so to demonstrate you I will just uh uh open up the Firefox using this terminal I will hit P Firefox and Firefox will start and I will just enter the PS and PS hyph a to show all the process so here you will see the Firefox P ID that is 8796 okay so I have got the PID of Firefox okay so with the help of PID I can dominate this particular process soid is 8796 okay so but there is many ways to terminate particular process you can just terminate that process using the PID as well using that signal and the name of that like signal term signal kill and also without signal so I will just show you each and everything okay so you can just do kill that is p ID is 8796 okay using PID or you can just do hyphone 15 okay that is 8796 so what it will do it will just skill that particular process that you can see the terminated Okay so also you can do how you can do it but now I will not open the uh Firefox I will just use cat command cat home okay and I will just use PSAT to check the p is 9405 okay so here I can use kill hyph SI signal and I will use Tom and I will just enter the p number that is a 945 and hit enter and you can see the that particular uh process terminated and also you can do like this also like SI without SI you can also use this command so I will again use this one and I will first check the what is the process of cat because process ID changes again and again that is 9417 this time and I will use 9417 and you can see the process terminated okay so in this way you can use the kill command okay now uh now let's use some another signal also so if I will use PS hyph L uh not PS sorry kill hyl so I will use this one uh kill so let me check how it works I will use this kill Hy 9 and the process name that is the cat no not process name p ID so 94 431 K Hy 9 9431 hit enter and here you can see the process is killed okay so in this way you can use this kill command to terminate any process or kill any process so if that process is unresponsive or that any application is unresponsive so in that case you can use this particular command Okay so that's all for the today video guys and I hope you likeed and if you have any queries you can ask us in the comment section okay so I meet in the next video thank you thank you for watching
Info
Channel: ProgrammingKnowledge
Views: 4,789
Rating: undefined out of 5
Keywords: linux commands, linux command line, linux command line cheat sheet, the linux command line (pdf), linux tutorial w3school, linux basic commands, ubuntu linux commands pdf, in linux, Ls, cd, mkdir, rmdir, touch, cat, rm, cp, mv, test exercise, unzip, zip, File Permissions in Linux. How to Read, Write & Change, How to Use the chmod Command on Linux, How to Add Users and Create Users with useradd, groupadd, Usermod, usermod, Head, Tail, Chown, chgrp, Ping, traceroute, MTR
Id: SjQmo5tJB4c
Channel Id: undefined
Length: 477min 50sec (28670 seconds)
Published: Tue Feb 06 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.