- 1 year ago
Category
🤖
TechTranscript
00:00:00yes I got the host access let me share my screen
00:00:30yes so I have been logged into my AWS mission that means our AWS mission Linux where we are doing
00:00:40the Linux practice so as a continuation to yesterday's session let us go ahead with the
00:00:48Linux file system and then directory structure understanding and let us complete them today so
00:00:58the topic is continuous in continuation to a status topic Linux directory structure Linux
00:01:07directory and file structure so that is the topic we have been started since long ago but
00:01:15let us complete it as as as we go ahead okay so we have seen the let me do a quick recap
00:01:27so where we were yesterday okay as part of this Linux directory and then file structure what we
00:01:37understood is we understood the difference difference between the root user and non so this is we
00:01:56understood and next we understood okay the first thing is what we discussed the types of default
00:02:06users in Linux distribution Linux distribution right so root user and Ubuntu user if you are using the
00:02:18Ubuntu distribution or if you are using the CentOS maybe some other CentOS user will come if you are
00:02:24using the Amazon machine image Linux then EC2 iPhone user will come as a default user so and as we have
00:02:32taken the Ubuntu machine so it is the Ubuntu is the default user name so difference between these root user and
00:02:39then non root user is what we understood and then we have understood understood the directories the directories
00:02:50and then slash boot we have seen and then slash boot and then slash
00:02:58ETC we have seen and then slash bin we have seen and slash has been we have seen so bikin have a symbolic link to
00:03:10usa usr slash bin and then has bin we have seen which have a symbolic to slash usr Irene her again so you do a term diap vendo을
00:03:12slash bin and then sbin we have seen which have a symbolic link to slash usr slash bin so till
00:03:24here we completed yesterday and let us continue from there understanding the more directories
00:03:33and even we have seen here slash root directory and then slash home directory is also we discussed
00:03:45so these are the directories we have completed the root slash root home boot etc bin and then sbin
00:03:54so these are the directories we have completed so let us continue understanding the other linux
00:04:01directory directories and their structures as well so if we can go a little tap yes i believe
00:04:09you are able to see my screen so we have seen the boot directory and then device directory pin
00:04:17directory meaning the binary commands and then all the user commands are there in this bin directory
00:04:23all the users irrespective of the root user non-root user the commands that we are entering
00:04:29meaning the user who is entering the commands all the commands will be inside this bin directory
00:04:34and then there is also a sbin there is also a sbin uh yes bin meaning the super sorry system binaries
00:04:45or super admin binaries you can say so super admin related binaries will be super admin only can execute
00:04:52those commands which will be inside the sbin in bin in bin the commands will be there those commands will
00:04:58be executed by anyone but the commands inside the sbin directory will be only executed by the super admin
00:05:07server and there is a unix shared resources director usr meaning unix shared resources directory
00:05:18which is also having the bin meaning the bin directory whatever the commands are here
00:05:25those commands need to be made available to all the users right meaning those commands need to be
00:05:30shared to all the users so that is the reason in the user in the unix shared resources directory
00:05:37the same commands are available here so here this directory and then this usr slash bin directory or
00:05:46symbolically symbolic link meaning they are connected together whatever updated here will update here
00:05:54whatever updated here will also be updated here we'll discuss about the symlink and then hardlink concept
00:06:00going forward and also sbin that is the super admin binaries directory also have a symbolic link in
00:06:10the usr sbin because the users of super admin can only execute the commands inside this right so this is the
00:06:22these are the directories that we were discussed yesterday and now let us start understanding
00:06:29sir before we start i i have a question yes based on our yesterday's discussion uh the commands when we
00:06:37download they are placed in the bin directory slash bin directory yesterday yesterday small correction
00:06:46small question so what we discussed yesterday is the tools not commands that tools what are the tools that
00:06:54we will download those tools will be placed inside the bin directory and those configuration will be put
00:07:00into the etc this is what we discussed now go ahead please okay so yesterday you also downloaded ng ng
00:07:08nginx where that will placed if it wasn't in the bin directory because it is not a tool actually
00:07:18yesterday whatever the nginx we downloaded that is not a tool that is a service so services were there in
00:07:25in the usr usr usr usr shared directory in this usr we have a shared directory that in that shared directory the service or the server is installed
00:07:38nginx is a web server which is a web server which is not a tool so that is the reason it is a server
00:07:47so that server installed into the usr slash shared library which i have not given in this diagram but
00:07:55it is inside the usr shared library got it thank you sir fine so now let us continue continue start
00:08:06understanding the very important folder called opt optional add-on applications not part of the os
00:08:13applications this is this is little strange directory what i mean to say is opt directory
00:08:22doesn't contains um so let me connect again yes if you can go back go back this opt every directory
00:08:38here contains a minimum of files for example temp if you can see some files are there linux distribution
00:08:49files run some files and then folders are there dev some files and folders are there and then pros some
00:09:00folders are there and uh sys some folders are there uh etc obviously folders were there where some folders are
00:09:10there and then home obviously folders were there demo this is what we created test this is what we created
00:09:16boot obviously contains the folders and then all and then root root also contains the folders we
00:09:22don't have the permission to go there but let me refresh so this root also contains the folders in
00:09:30directory snap also inside the root last place found usr so this user also contains the files
00:09:38all these are containing the files isn't it for example media media media don't have anything
00:09:45and then the mount directory this is also not have anything and then the server directory srv this is
00:09:55also not having anything and then opt directory which also don't have anything what did you
00:10:04understand from this discussion so the opt media mount and then srv server so these four
00:10:14directories are especially except these four directories the other directories are having
00:10:22the linux created files and then directories that means the default directories and then the files
00:10:31were there you know without these four directories in the other directories the us are these these are
00:10:39all the other directories all the other directories contains except these four directories contains
00:10:43the default configuration but whereas this opt media mount and then srv these weren't contains any data
00:10:53by default and that means these are not contains any operating system specific applications
00:11:03so let me go here
00:11:05opt optional optional add-on applications opt optional this is optional so which is not part of the operating
00:11:23system applications so opt opt opt is not part of the os apps what does it mean what does it mean
00:11:39is this opt opt for example the other directories boot root dev etc bin s bin these other directories are
00:11:53other directories containing the folders meaning the directories in the files inside in it which will be
00:12:01which will be allocated with some memory during the operating system start meaning the our linux machine start
00:12:09but the opt folder which is not part of the operating system applications because this is an empty directory
00:12:18which don't have any operating system specific applications so meaning if you can see some default
00:12:25directories we have seen right here so those default directories were not here inside this opt so this is
00:12:34called as an optional and add-on applications our applications our applications we can keep inside this opt which are not part of the operating system bootstrapping time that means what when the machine is starting
00:12:54the machine need to be load these other files that this and all as part of that those applications will be
00:13:04will be having the control on the linux user meaning who is the root user or maybe basically when the operating system is bootstrapping these files will get
00:13:15allocated and then deallocate the memory there is allocation deallocation concepts are there memory allocation
00:13:21memory allocation concepts but the opt directory which is an optional directory which don't have any operating system
00:13:30applications by default in it which will be not not scanned or not will be bootstrapped no need to be have an extra allocation deallocation memories
00:13:43like as that it is doing for other directories so it just contains our user specific applications
00:13:52so that is the reason if any of the directory you can take i will i will usually i will copy the project
00:14:00specific files into this opt directory because it is an optional directory and then add an application so
00:14:06meaning our applications not linux default applications linux default applications meaning yesterday we have seen
00:14:15in the bin directory we have the various commands like apt right and wget curl ping those are all applications
00:14:25the commands or applications so such applications are not there in the opt so those applications required
00:14:34the memory to be allocated during the machine startup right so those are operating system specific
00:14:41applications so no such applications were there in our opt opt is optional which don't have any operating
00:14:49system files directories inside in it whereas the customers like us the users like us can keep our
00:14:56applications our own specific applications as an add-on applications in this opt directory
00:15:04that is a usage of the opt directory so usually while i am working while you also will work prefer to keep
00:15:13the data inside the opt okay right now let us go to other directories like uh yes can you keep your doubts uh
00:15:26with you just by writing somewhere i'll use them let us discuss at a time otherwise you know maybe we will
00:15:32divert actually okay yeah sure uh related to opt directly i have doubt yeah ask me then huh sir so uh suppose i
00:15:42have uh installed one application uh like a chrome browser in uh my linux machine so the that uh application i need
00:15:51to uh put in this opt directory correct uh chrome directory chrome is by default available on the
00:16:01uh browser right i mean chrome chrome in the sense chrome will be available over the network
00:16:06so that you no need to put in the opt because when you download the chrome browser here
00:16:11as an application it will be downloaded into the bin directory okay
00:16:15uh but what we have to do but what we have to give you know our project specific files like yaml
00:16:22files we're gonna write or maybe application code related things those files will keep in the opt
00:16:31cancer uh suppose i want to uh install facebook applications suppose so that application we need
00:16:37to put uh means uh system will automatically put in this opt directory or no we have to we have to
00:16:44manually because this is an add an optional directory right we have to but right now this directly is
00:16:49empty sir yes this is empty right now correct correct this is going to by default it is come with the empty
00:16:56okay so i have a question uh let's say from internet when you i mean in windows operating system when
00:17:03you download something from the internet it goes to the my download folder right how about in linux once
00:17:10you download a software like let's say you have downloaded idm or any other software xyz so where
00:17:16does it gets downloaded in um linux correct so from which location we are in that location it will be
00:17:24downloaded for example i am here in the uh ubuntu so pwd right so ubuntu now if i can get something for
00:17:33example w gate if i uh something i will download maybe i can download w gate um let's say w gate uh httpd
00:17:46server i'll download uh temporary okay it's not understood sir basically it will get downloaded in
00:17:52the same folder where you download it right exactly understood but once go ahead go ahead yeah sorry so uh once
00:18:00you install it so after installing some on whatever configuration file is it is there it will go to
00:18:06etc directory and that's all yes correct so if we can see here like like our c program files so there is
00:18:17usr user share user unix shareable resource directory which is acting as a c program files for us here in the
00:18:27analytics okay okay one last question so like let's say uh in uh we want to put some data i mean uh let's
00:18:37say this software is there right bmware software is there and you have um uh installed linux in this
00:18:45and this is over your windows machine right now right now some data you want to pass from your windows
00:18:50machine to your linux machine so which directory are you going to use that is what opt i am suggesting
00:18:58okay okay thanks sir and that is what understood thank you
00:19:07okay um
00:19:10okay yeah i hope all the questions result right related to the opt fine let us go to the next
00:19:16directory so i'll explain i mean these are all what you know commonly used directories i i kept in a
00:19:23single place no confusion while referring you will just refer this one this is the directories which we
00:19:29commonly use but okay but before coming to that let us understand all other directories as well there are
00:19:34a lot of directories that we need to definitely understand fine so there is a pros directory so running
00:19:41processes will be here only exists in memory what does it mean let us go and then cd cross directory just
00:19:50to go back in the cross directory let me go inside it see this running processes are here so whatever the
00:20:00processes that are now currently running or any any of the uh application if we start so that currently
00:20:10running processes are here in this uh process directly process directory so currently um running
00:20:21process meaning for example yesterday nginx is what we have uh installed isn't it nginx
00:20:28installed in the sense we download it right so what we can do now that nginx when we start
00:20:37the nginx when we start it will be start as a process so we know right process meaning operating system
00:20:49operating system contains the kernel so what is processed process is an execution path to the kernel
00:20:58process meaning it is execution path to the kernel maybe you might not understand what i'm saying at this moment
00:21:08so let me do one thing let us go and then open the linux architecture so in the linux architecture we have
00:21:17a shell let me quickly open the linux architecture
00:21:21yes this is what i'm talking about in this linux architecture here is the hardware and uh on top of
00:21:31the hardware we have the linux kernel right and to talk to this kernel we will use a shell right we will
00:21:42use the shell and then the shell to the shell we will give the commands like applications compilers
00:21:49edit out these are the commands that we will give user one will give this command user two might
00:21:54we give this command user three user in so these are commands the users will give so now for example
00:22:02application is there here some nginx application running so what that application will do that
00:22:08application will be installed i mean that application has been installed on the hardware first of
00:22:16sorry sorry sorry directories first of all right directories directories meaning the usr lib directory
00:22:24so the application to talk to this kernel it will be used a process it will be used a process so process
00:22:33nothing but execution path to the kernel how the application is executing so that execution path will be
00:22:42represented by the process so process meaning process is an execution path to the kernel so whatever the
00:22:52application we will run in our linux so that running application we process every application that is running inside
00:23:03the linux definitely will have a process so for example if i type the command called ps
00:23:11now see what is now 895 so you can see the 895 related directly here 895 if i am not wrong it should be here
00:23:23yes this is 895 that means what this is a process 895 is the process which is the bash cmd we are using
00:23:32currently now that means the linux architecture if we can see this bosch shell is also one process
00:23:40so that process is there and the next is what ps again process is also one process
00:23:461162 so that 1162 number you can see here this is 1062 and somewhere you might also can see the 1162
00:23:571162 so maybe 1162
00:24:04it might be here 1151 1152 1162 it is showing it is as a ps only maybe it is the self process but if you
00:24:15can see here tty tty tty is also having one process tty we will discuss about this tty sessions
00:24:27and then the 1062 987 894 these are all the processes that are running that means what execution
00:24:37paths to the kernel so these are all the kernel they are talking to the kernel so application one application
00:24:44to vi editor cd grape d so these are all what you know talking to the shell and shell is reaching
00:24:51these commands to the kernel so the execution path to this this kernel is the shell isn't it so shell is
00:24:59a process which is an execution path to the kernel to this applications applications will talk to the
00:25:05kernel via this shell so that is called the process so this process directory the process directory
00:25:13proc contains the running processes these processes however only exist in the memory that means when
00:25:21the machine will be shut down the memory will be erased and then the process will be also destroyed
00:25:28again when the machine start the process will start and then they will be come up in the proc
00:25:33directory so it is the it is the erasable memory creatable memory by default when the machine is
00:25:39starting so similarly there is a lib inside the users user slash lib so there's a lib directory
00:25:51which have a symbolic link in the usr usr lib usr meaning not user don't confuse usr meaning unix
00:26:00unix shareable or unix shared resource unix shared resource that means the lib is the directory which
00:26:09is which is shared to all the users of the operating system so that lib contains that lib contains the
00:26:18the the libraries related to the apps applications and all let us go and then see cd space and if i will
00:26:26be able to access from here let me access from here let me connect to the browser go back go back
00:26:36lib if i will be able to uh okay so by default it is not accessible here that is having this symbolic
00:26:46link right so in the usr directory let me just click on this lib now lsfl see these are all the uh
00:26:56you know lib yeah so these are all the libraries related to commands applications related to commands
00:27:07applications so all all the commands are related all the commands related related libraries are here in
00:27:16this here in this directory for example apt if you can see and then kernel kernel related
00:27:23kernel related libraries and um we can see linux linux bootcrops uh ngos not ingenix so this is ingenix
00:27:35what we downloaded yesterday right so let us go to cd space ingenix what we downloaded yesterday and there
00:27:44is a modules so cd space modules lsf and l see it contains the module section meaning some libraries
00:27:55to run that server or to run that application or to run that command whatever the required libraries
00:28:02are there those will put in this lib directory lib directory so this lib directory should be accessible to
00:28:11all the users because when the application is running when the application is running the application
00:28:18should be able to access by all the users isn't it meaning the meaning meaning the application should
00:28:25be accessed actually for all the users so maybe i'm logging as ubuntu user so for example if i can get
00:28:33w get localhost colon permission denied just let me use this window now see uh what i got is uh index.html file
00:28:49is okay i'll do one thing just let me go as this one and then curl localhost colon 80 this is
00:29:01nginx welcome to nginx thank you for using the nginx that means what nginx is already running as an
00:29:11application which is accessing by the root user and also if i will go to uh ubuntu user if i will go to ubuntu
00:29:23user i can also run the curl curl localhost colon 80 right for the ubuntu user also nginx is accessed
00:29:36for the root user also accessed for the ubuntu user also the nginx is accessed how how meaning the nginx
00:29:43is installed inside the usr unix shareable resource directory which is nothing but which is similarly
00:29:52c colon slash program files in windows guys can you please mute thanks so which is similar to c program
00:30:00files in our windows what i'm what i'm trying to explaining you is every application every software
00:30:08every command that we installed on the linux submission those files are distributed among the
00:30:17various directories and to maintain it as the accessible securely by all the users so one of such
00:30:27shareable library is also called as one of such shareable directory is also called as the lib book
00:30:33so so far we have seen the shareable directories as these isn't it so what are the shareable directories
00:30:40so bin is the shareable directory sbin is the shareable directory lib is the shareable directory
00:30:47whatever the software that we're going to download in future like docker docker compose or jenkins jfrog
00:30:55um maybe ansible um maybe ansible whatever the software that we're going to download that will be put
00:31:04into this usr bin directory maybe usr sbin directory but it will be put into the usr why because you know
00:31:13all the users of the machine should be able to access for example the docker running in the
00:31:20mission unix in the linux submission for example i have installed a docker in in our linux mission
00:31:27the docker should be accessed by the non-root user and also should be accessed by the root user to
00:31:35make it available to all such root user and also to the non-root user to make that software or application
00:31:43available we have to put them into the usr unix shared resources so one of such directory is also
00:31:51called library meaning for every application let us say we're going to install docker so docker also
00:31:57having the libraries so those libraries also put into this usr usr lib directory because this should
00:32:05be shareable to other users as well correct any libraries only to share what i mean to say is but
00:32:12this lib need to be used by other programs what i mean to say is lib may be used by the other programs
00:32:18which are running here maybe we're going to create the uh docker compose docker compose requires the
00:32:25docker related library so which will which will fetch from this lib right so something like that fine so
00:32:33now you understood the lib meaning the libraries so see programming library files needed by commands and apps
00:32:42whatever the c programming c programming files is there so which for example in our windows windows we
00:32:51have the c program files so c program files so which will contain the softwares like this is equivalent to
00:32:58usr and uh what is this lib so this lib is equivalent to uh so this lib is equivalent to uh
00:33:05um so this lib is equivalent to c program files library so do we have any library directory in the c
00:33:14um maybe something like c shareable directory mean to mean to say some
00:33:23yeah some some shareable directly for example let me go to uh here and then check for any lib directory no it is
00:33:30is not here and if i go to program files let us say any lib directory no it is also not here what i
00:33:37mean to say is commonly shareable commonly shareable application specific library library meaning what you
00:33:43know for example to run something we need this library okay um for example if i want to run this application
00:33:54so this is one application just in case so to run this this application i want some library
00:34:02so if you can see those are all placed in this directory so these are all called as the library
00:34:09which will help us to or which us which are required to run this application similarly
00:34:16docker is also one of the application to run the docker application we docker also requires a lot of
00:34:23libraries so those dot lot of libraries will be put into this slash usr slash lib directory
00:34:33you got it right meaning the application specific dependencies will be put into this user lib directory
00:34:41which are called as the library which are called as the libraries okay uh just let us i have a question
00:34:49so yeah so i mean this means that whatever software installed basically it will be shared across all the
00:34:56users right and that application it all the all the files and everything will be there in usr lib
00:35:03except the configuration file configuration file will be there in etc so the question is like
00:35:09uh uh if i i i as a user installed the software and tomorrow some xyz users want to access it
00:35:18so he cannot bring in any changes in the configuration file right since not having uh okay that's also
00:35:27that that's what i wanted to know sure yeah fine
00:35:32fine fine fine so now let's uh let's move on to the next directory that is the temp directory
00:35:42so this tmp directory for the temporary files so we never use this temp directory because you know
00:35:51these are all unsafe directories we can say so this is something called temporary directory we can put
00:35:59something there inside the temporarily but those are all un un uh non-guaranteed kind of uh directories
00:36:07meaning the data put into these directories are non not guaranteed there are temporary purpose for
00:36:14example i'm i'm i opened one tab or i opened one shell that shell specific things are coming and then here
00:36:20when i close the shell uh related artifact or related sorry related uh directories will be deleted from here
00:36:27so the temporary purpose they have created and uh for example i am opening one more shell maybe one
00:36:33file create here one directory will create here when i close it then that will be gone from here so for
00:36:40a temporary in-memory management this temp directory will be used we never use this temp directory
00:36:47throughout our devops job no no no need to be used meaning not suggestable and we never touch that even
00:36:54okay so next directory slash home directory very very very very important directory
00:37:01slash home directory slash where directly we keep on work we keep on work we keep on work
00:37:09these direct it's very very important so just to pay your attention please so home directory so directory
00:37:17for user what does it what does it mean what does it mean is so many times we discussed about this home
00:37:24directory again let us do one discussion so slash home is the directory which will be the slash home is the
00:37:35directory for the users who are not not root users or who are not admin users
00:37:46so that means what there is a root user and this is the root user's directory
00:37:54and the other users non non root the other users those will be created inside this home directory
00:38:03so home directory is saved to be a home of the users directory it's like a home of the users each and every
00:38:09user created will have this home directory and remember remember this users can only be created by the root
00:38:17user not other users for example let me create one user not i am not a root user now i am just ubuntu user
00:38:26i am just adding one user add user maybe demo demo user demo underscore user now see what it is saying only
00:38:39root may add a user or group to the system so users can be added by only the root users
00:38:48okay let me switch to root user and now let me execute the same command one more time that is add user
00:38:56space demo underscore user
00:38:59now what is happening add user is the user creating and adding to the new group 1003 already 1001 1002 is
00:39:12there so this is the 1003 third user is creating inside here of course there is a meaning for that
00:39:17i will discuss later in time so test user is the password and then i am giving test user is the retype
00:39:23password just this is the demo user and just entered other other yes now if we refresh see this demo user came here
00:39:39so when the demo user is created by default for that user a profile is created a profile is screened
00:39:49and for that user login logout and then for that user activities so some bosch script is also created
00:39:58we'll discuss about this coming up sessions this is not the right time to discuss but you just remember
00:40:04for now every user will be created inside the linux operating system by only the root user and every user
00:40:12who is a non-root user that every non-root user will have a directory inside this home slash home directory
00:40:22so slash home is the home of the users non-root users make sense this is we keep on using this directory
00:40:31we keep on using this directory you can't believe um they i will tell you going forward i will tell you
00:40:38uh when we start the cicd pipeline i will tell you so we we should not use the machines for example we
00:40:47have created the ec2 mission isn't it aws ec2 mission is what we have created so that ec2 mission we should
00:40:55not use as is because the ec2 mission is coming up with the default user called ubuntu which is unsecured
00:41:01user that means what you know that user whoever know that this is the ubuntu operating system they will
00:41:10expect the user as by default ubuntu only isn't it of course in order to log into the ubuntu operating system
00:41:18they require the private key like pem file or ppk they require that but however they can spoof the user
00:41:28they can you know malicious or they can expect the user correct so ubuntu is the default user for that
00:41:35operating system so what i mean to say is when a machine will be created we have to create one
00:41:43specific administrator user on that machine and that specific administrator user will be created inside
00:41:51this home directory and every time we have to log into this machine with that user only
00:41:57not with that default users like ubuntu and then the other users like root user okay when the cicd
00:42:03pipeline will will start there we will take a lot of missions jenkins we will take three missions two
00:42:09missions a minimum jfrog we will take one mission and nexus will take another mission docker we will take
00:42:15one mission kubernetes will take three missions ansible will take one mission many machine here in this
00:42:21easy two missions so as a complete cicd pipeline when we start setting up practically we will do these
00:42:27things so at that moment you came to know fine what i am saying is now slash home is the directory
00:42:35which contains all the non root users inside in it fine let us go to the next directory that is the var
00:42:45directory this is this is very very very very important directory where directory system logs so what is
00:42:56this var directory contains you know uh yes it is containing variable data like mails log files server
00:43:06logs will be put in this var directory server logs will be put in put into this var directory
00:43:15so what i mean to say is let us go to slash var now clear everything ls-l now see this var contains what
00:43:29mail log catchy opt spool and www and temp and log so these are all the directories inside
00:43:45is var meaning it contains the logs logs logs mail support and then the basically the server related logs will be keep here
00:43:58so so i will showcase you one thing now what i would like to showcase you is
00:44:05let me also start another instance maybe let me start this uh darker devops 8 pm instance as well quickly
00:44:18because i would like to showcase you something so let me quickly start this darker devops 8 pm session so
00:44:27there i can show you something just bear with me me in the time it will start let us go to hub dot
00:44:34darker dot com let us go to hub dot darker dot com and here let us say the post grace post grace sql post
00:44:45grace post grace let us see the postgres now scroll down now scroll down click on any of the postgres
00:44:53postgres version now scroll down somewhere you can see now just volume
00:45:04uh yes what is it what is it postgres is a database server it is a database server so the server specific
00:45:20files are putting into where into the var directory so var is a directory which contains the server logs
00:45:29logs mail settings mail logs and then the other other things but basically server logs directory var meaning
00:45:38similarly i just have started uh this mission right so let me also log into the 8 pm devops machine
00:45:45just quickly because i would like to showcase you something so where is this one yes docker devops 8 pm
00:45:52okay okay now i would like to showcase you something just a moment
00:46:07yes now what i will do is just let me go back just let me go back just let me go back var var lib
00:46:25series did you find anything yes docker that means what docker is the software right which we will
00:46:37install in our linux machine so that docker related server the docker engine is one server we can say
00:46:46so the docker engine related files will be inside this so let me go to slash var
00:46:56slash lib slash docker series so docker specific files are here for example let me go to
00:47:04docker containers and lsfml since docker container specific directories are here right mounts configurations
00:47:13and all what did you understand from this discussion what did you understand from this discussion so when
00:47:20we install the docker the docker related files are kept inside the var directory so let us also see one more
00:47:34one more docker image one more docker image mysql this is also the database let us go to this database
00:47:44and scroll down select any of the version and go here and search for volume see this it is also referring
00:47:55where var lib mysql that means what all the server specific logs server specific data all the server
00:48:06specific logs server specific data will kept in a directory called slash var got it right so this is
00:48:15most most most most commonly used frequently used directory like home is one directory i i already
00:48:23have listed which will use keep on okay fine so i hope you understand with this var directory
00:48:29hello sir i kind of confused so i thought when we install the application all the libraries are placed in
00:48:39in slash lib but looks like here they are placed in slash var slash lib
00:48:46slash war also contains slash lib the slash war contains what logs server logs meaning
00:48:53slash var slash lib is keeping the server logs right logs logs meaning what for example my scale if we take the
00:49:04my scale database i can show you just let me reload and just let me reload cd come back cd come back
00:49:15cd come back ls so here the data for example let me take the my scale my skill is not here it seems to
00:49:25be let me let me go to um any other for example uh this one uh major or apt or we can say
00:49:40python uh that means what the logs for example i can say python python so it only plays logs not the
00:49:51libraries ah correct correct correct okay okay okay got it yeah thank you sir yeah
00:49:57fine so now let us go to the next directory that is the run diet we never touched it is
00:50:06run directory we never touch system demons that start very early to store temporary runtime files
00:50:13like pid files which will be inside the pid files okay let us go to this run first
00:50:21so without confusion so without confusion let us go to the run so this is the run directory
00:50:28which contains what pseudo uh screen mount log temp files and then the docker and then the
00:50:42user that means what here this is the devops 8pm machine don't confuse
00:50:49so whatever currently running processes right so currently running applications
00:50:56will be also keep in this run for example let me go to don't confuse with all these director structures
00:51:04all looks to be saved and don't confuse just let me go to pseudo iphone i single application you can
00:51:13find it many directories but not the application files different different files will be in the
00:51:18different different directories let me go to cd space slash run and this contains the for example docker
00:51:30docker if you can see lsa funny see this container dd container dd is a docker runtime
00:51:39docker runtime meaning what a docker engine when the docker will start this docker engine will start
00:51:45when the docker will stop then this docker engine will stop that means the running running docker engine
00:51:53is inside this run meaning whatever the running processes we have for example let me uh lsfn l and then cd
00:52:04uh let us go to this sshd not ss you you may confuse my if i discuss that cd space user lsfn l this is
00:52:19contains the thousand thousand thousand thousand lsfn l now series um it contains the other directories
00:52:30systemd socket and all let me go to for example systemd lsfn l so if we can see there are notify
00:52:42private units is one another directory this is what you know currently running currently
00:52:49running currently running processes proc directory contains the process ids right what are the
00:53:00process ids created meaning the applications what are the applications running that contains inside
00:53:07the run directory and further running applications process ids will be created so these process ids will
00:53:14be will be will be each and every process having the process ids this process ids specific directories
00:53:22will be placed inside the proc but the process running right so this process running runtime configurations
00:53:30meaning runtime running engines basically for example if you run the docker best example docker engine is one
00:53:39executable engine so that is kept inside this run directory so whatever the runnable things
00:53:47whatever the whatever the you know kind of the engines which are required to run meaning the engine
00:53:54component which are required to run those are running things will be inside this run directory
00:53:59maybe i'm not properly explaining but let me try to showcase you something uh not here
00:54:06just let me try to showcase you something uh in the run directory lsfnl let us go to this sshd so lsfnl
00:54:18now this sshd doesn't contains anything right so sshd is a directory doesn't contains anything but
00:54:25for sshd there is a process id so sshd process id cat cat sshd dot pid
00:54:34sorry sorry i have to come back right now lsfnl so cat sshd dot pid now 662 is the process id
00:54:53662 is the process id which is key kept now inside the sshd meaning what i'm trying to explaining you is
00:55:03when you modify any file in the linux operating system that modifications in order to effect
00:55:15we need to run this sshd what i am explaining one more time so you changed one file you saved it
00:55:25you changed one file you saved it whatever the changes that need to reflect right
00:55:30throughout the operating system in order to reflect then we need to run this sshd so that is the reason
00:55:37it is inside the run director got my point similarly system d if if any up if any any software we would
00:55:46like to run as a service continuous service continuous process maybe when i talk the networking
00:55:53you will get the clarity on this directory structures maybe i will do it in the next weekend
00:55:58sorry next week early in the next week let's start so system d is what you know in order to make a
00:56:05particular software to be run continuously in the background then use this system d which is again
00:56:13talking about what running particular software so all such a run related things will be inside this
00:56:21slash run directory makes sense any questions here because i feel i am not properly explained this one so
00:56:28are you clear with this one any questions i am confused between run and proc okay proc contains the
00:56:36process id right it just contains the process id process meaning what how it will be talked to the
00:56:44kernel that process id for for every process meaning for every running application where process id is created
00:56:52that is keeping inside this proc directory that is just a process id now when the process id is created
00:56:59the application is started isn't it but how the application is starting so to start the application
00:57:07process is there but process should have to invoke something what i mean to say is maybe let me draw some
00:57:12diagram if possible let me try to draw some diagram so so that i can explain we try to explore that so for example
00:57:26nginx is there so nginx is there nginx is a web server isn't it so nginx is a web server assume this is the nginx
00:57:44nginx so when the nginx is is running the server is running for this one a process will be created
00:57:58for this one a process will be created so this process contains what process id this contains what
00:58:08process id so we know where the process id will be created so we know where the process id will be created
00:58:13inside the where the process id will be stored from inside the perfect this will be inside the
00:58:21perfect when the process is started this process will triggered one of the runtime component in this
00:58:31server for example if it is nginx let us take nginx every time we are talking about
00:58:38so let me go to usr share lsf and l and then cd space ng inx lsf and l so there is cd html lsf and l so cat
00:58:57index dot htmd so this index dot html is by default triggering isn't it when we access when we access
00:59:06carl localhost colon 80 by default html index dot html is coming for me that means what when the
00:59:16process is started this process is also enabling the other components to be start the engine server so
00:59:25these other components are called as what you know runnable components so which are runnable components for
00:59:33example you are uh using your notepad so this notepad notepad you installed notepad is running as a
00:59:42process in my windows machine but when the notepad will be open when you type notepad then only it will
00:59:47be open that means what it is already running but to to start the application some some runnable component
00:59:55will be there here so such runnable components will be inside this slash run directory how i make sense
01:00:04now is it clear at least yes sir making sense yeah yeah great fine so that's all folks i have to jump to
01:00:15the 8 pm batch i thought i will take literally a little extra but uh 8 pm guys yesterday i have not
01:00:22taken the class so that is the reason i have to join there so i'm stopping next week let us do a
01:00:30better progress not better the best progress we will do because i have two laptops with me now
01:00:35so there is no problem of the laptop issues definitely going forward every day let us have
01:00:40a class from the next week onwards meaning from the monday onwards fine so that's all for uh that's all
01:00:50yeah go ahead please sir uh if possible like can you please explain this once again or like uh now or
01:00:57like monday if possible monday i will explain one more time this is i will explain monday
01:01:02uh proc directly yeah hello i am jay yesterday video is not available i think i didn't look last
01:01:14due to some reason okay yesterday video is still not yet uploaded right yes yes let me check right away
01:01:21let me bring to madam if madam will be there she will actually after 15th
01:01:27no no no classes were not happening after 15th 16th is not there 17th only 17th then we introduce
01:01:37correct correct correct and this class note is also not updated uh because uh i have not running
01:01:46typing much in the uh texture pad because you know from the session we started this linux file system
01:01:52i'm explaining in this uh notes only so but when something is typed then definitely i will upload it
01:01:58in our classroom oh okay yeah yeah i'm typing yesterday video was not uploaded uploaded can you please
01:02:09uh okay fine i ping to uh oh okay actually uh durgosoft online is not in this meeting okay i'll talk to
01:02:24madam okay fine so i'm stopping myself can you please add me to the google classroom classroom right away
01:02:32let us do one thing let me give this uh google classroom link um yes copy just click on here and then add
01:02:43everyone in the meeting whoever are joined today just click on this link and then register yourself
01:02:51thank you yeah thank you so much folks i'm stopping my screen share and then see you on monday