 Hi everyone, in this video, we will learn about the proc file system. So what is a proc file system? Proc file system is a virtual file system which gives us information about all the different processes running in the kernel, about the hardware and the kernel itself. So let's open a terminal and see what all files are there in the proc file system. So I will do cd slash proc and if I do ls. So we have a handful of files with some names and then there are many directories, all of them have some numbers as their names. So what does each of this number signify? So each of this is a process pid. So whenever we start a new process, we will have a new directory in this folder and each of that directory will contain information about that process. So for instance, one is the pid of init process, so this directory will contain information about the init process. Let's start a sleep process, sleep thousand and okay, so we have 9386 is the pid. Let's do ls. So you can see that here we have 9386 directory. Let's go inside that directory and let's see what all files are there. There are a couple of files. Let's start with cmd line. It will give me all the cmd line arguments which were used to start this process. So we use sleep thousand, so it's showing me that and then there are couple of soft links here. You can see cwd, exe, all of these are soft links. Let's list all the files in long form. So here you can see that exe points to the executable which is running in this process. So it is pointing to slash bin slash sleep which contains the code for sleep command and then there is this cwd link which is pointing to slash proc, so it's pointing to the current working directory for this process and then there is this root which is pointing to slash and mostly in all of the processes it will be slash except when we use chroot to change the root. Let's see what does this status has. So if I do current status, so it shows me the PID of this process which is 9386, then the parent PID which is 30776, then the state of this process which is sleeping, so on and so forth. And let's see what else do we have. Then there is this fd folder which contains links to all the open file descriptors. So if I do cdfd and let's list all the file descriptors. So here all the input, output and error are pointing to this terminal which is dev slash pts slash 0, alright. Then we have this environment file which contains all the environment variables for this process. So if I cat environment, so it has a lot of environment variables set for instance Clutter IAM module is set to XIM, so on and so forth. Let's go back and see what all files were there. Then there is this CPU info file which gives me information about the CPU. If I do CPU info, so it gives me information about each of the processors because I have 8 processors, so at least all of them from 0 to 7 and it shows me the vendor which is Intel then it is a 1.80 GHz processor and some other information. Similarly there is a mem info file which gives me information about the memory which shows me the total memory, free memory, available memory etc. So that's how you can get various information and one more thing if I list it in a long format then you can see that all of these directories have size 0 and why is that so because as I had mentioned it is a virtual file system so it doesn't use any disk space any space in the hard drive so all of these are of size 0 and it is created in memory when the system boots up and when the system shuts down it dissolves this and then we just have an empty proc folder. Then we had learned in the previous videos about different commands such as ps which lists the current processes. So all of these commands actually use data from the proc file system and just display it in a user friendly format. And we also have a man page for proc file system so if you do man proc so it shows that there is a numerical subdirectory for each running process in slash proc slash pid and then within each pid folder there are various other subdirectories or files. You can read about all of these if you want. So that's it about the proc file system thanks and have a nice day.