1
00:00:06,719 --> 00:00:11,823
All right, so how are we
going to do all of this? Well,

2
00:00:11,823 --> 00:00:16,926
the appropriate way is to use
sudo vim and then we are going

3
00:00:16,926 --> 00:00:22,030
to vim etc profile D and
I'm going to call it sander sh.

4
00:00:24,289 --> 00:00:27,170
The only requirement is that
your extension ends in sh.

5
00:00:28,589 --> 00:00:32,789
So what do
we need? We need

6
00:00:32,789 --> 00:00:36,990
alias IP config
is IP addr show.

7
00:00:37,990 --> 00:00:40,009
It's important if
you define aliases.

8
00:00:40,750 --> 00:00:45,600
If the command that you want to run contains
spaces, you put the entire command between double quotes.

9
00:00:46,380 --> 00:00:52,825
Then we have this variable with the name color that
is set to the value red. Well, I'm going to

10
00:00:52,825 --> 00:00:59,270
use export color is red and this export makes sure
that the variable is available in sub shells as well.

11
00:00:59,990 --> 00:01:06,650
In the question I was asking to ensure the
aliases available in subshells aliases will always be available in

12
00:01:06,650 --> 00:01:13,310
subshell. No need to do anything about that. Now
a fun fact is that while I was explaining in

13
00:01:13,310 --> 00:01:19,969
the lessons, we also created a variable color with
the value green. Now who is going to win?

14
00:01:20,409 --> 00:01:21,510
Well, let's
figure out.

15
00:01:22,090 --> 00:01:26,849
The best way to figure out is to
close your terminal and to open a new terminal.

16
00:01:27,879 --> 00:01:33,890
And then I'm going to use
ipconfig and ipconfig. Well, that is working.

17
00:01:34,510 --> 00:01:38,340
And echo dollar
color is showing red.

18
00:01:39,019 --> 00:01:42,810
Now why is that? Well,
that is because of alphabetic order.

19
00:01:43,409 --> 00:01:49,859
I use center sh in the alphabetic order. That comes
after custom sh and that is why it is winning.

20
00:01:50,799 --> 00:01:53,989
No more sophisticated reason than
that. That's how it works.
