1 00:00:00,150 --> 00:00:06,780 Today, we will talk about the environment variables in cowardliness, environment variable is like 2 00:00:06,780 --> 00:00:12,660 a variable in any programming language that we can set to a value and use it any time in our terminal 3 00:00:12,810 --> 00:00:16,300 when we need it, when we open a terminal window. 4 00:00:16,320 --> 00:00:21,140 A new batch process will be created and which it has its own environment variable. 5 00:00:22,680 --> 00:00:27,840 If we want to create a new environment variable, we simply use the export command. 6 00:00:29,340 --> 00:00:35,460 Let us try to create an environment variable that holds our Kelly Linux IP address, and we will name 7 00:00:35,460 --> 00:00:37,470 it DSD IP. 8 00:00:41,900 --> 00:00:47,870 Let's check if our variable is created by using the echo and calling our variable with a dollar sign. 9 00:00:54,710 --> 00:00:55,220 Perfect. 10 00:00:55,820 --> 00:00:59,450 Now let's ping our own local IP using this new variable. 11 00:01:10,210 --> 00:01:18,070 Notice this environment battle will be only available in the terminal window, but if we are open another 12 00:01:18,070 --> 00:01:19,990 one, this variable will be gone. 13 00:01:20,920 --> 00:01:26,650 If we want to make it through old shells, we must add it to the up to the our dot Benghazi. 14 00:01:26,860 --> 00:01:37,150 Or if you're using the Z shell, then we add it to the dot Z S.H., our C file, the dot Benghazi or 15 00:01:37,330 --> 00:01:39,250 the Dot S.H. Z. 16 00:01:39,250 --> 00:01:43,330 S HRC should be located in the home directory of your user. 17 00:01:43,660 --> 00:01:47,080 If it's not found then simply created using the touch command. 18 00:01:48,550 --> 00:01:54,580 But before we do that, let's open another shell and see if we can call the same variable we just created. 19 00:02:03,570 --> 00:02:09,660 As you can see, there was no output from the command simply because the variable we created in the 20 00:02:09,660 --> 00:02:11,340 other terminal, not this one. 21 00:02:12,810 --> 00:02:18,000 Now let's open our DOD Benghazi file and add the export line to it. 22 00:02:35,020 --> 00:02:39,520 Now, let's open another Besch window and see if we can use this variable. 23 00:02:54,280 --> 00:03:01,360 Perfect, we were able to use the variable we just added to our Dubash RC file, and since this file 24 00:03:01,360 --> 00:03:07,300 is loaded, every time the user logs into the system, all the environment variables in the file were 25 00:03:07,300 --> 00:03:08,260 loaded as well. 26 00:03:09,610 --> 00:03:11,640 Now, we have reached the end of this lesson. 27 00:03:12,010 --> 00:03:12,580 Thank you. 28 00:03:12,580 --> 00:03:13,830 And see you in the next one.