1 00:00:06,600 --> 00:00:07,770 - So the Bash Shell is 2 00:00:07,770 --> 00:00:10,290 offering many different features. 3 00:00:10,290 --> 00:00:12,870 Let's explore some others 4 00:00:12,870 --> 00:00:14,805 like alias, for instance. 5 00:00:14,805 --> 00:00:18,270 Alias allows you to define your own commands. 6 00:00:18,270 --> 00:00:20,850 Normally these aliases are made permanent 7 00:00:20,850 --> 00:00:22,740 through one of the Bash startup files 8 00:00:22,740 --> 00:00:24,390 like /etc/profile. 9 00:00:24,390 --> 00:00:26,820 I'll talk about these Bash startup files later, 10 00:00:26,820 --> 00:00:28,863 but first I want to show you alias. 11 00:00:30,930 --> 00:00:32,640 So let me type alias. 12 00:00:32,640 --> 00:00:34,290 That is showing me all aliases 13 00:00:34,290 --> 00:00:36,960 that have been provided by the system, 14 00:00:36,960 --> 00:00:39,663 including, for instance, grep. 15 00:00:39,663 --> 00:00:44,610 Grep is grep, minus minus color is auto. 16 00:00:44,610 --> 00:00:45,480 That makes a grep 17 00:00:45,480 --> 00:00:47,790 showing us these wonderful colors. 18 00:00:47,790 --> 00:00:50,430 Now, if I want to, I create my own alias. 19 00:00:50,430 --> 00:00:54,720 Alias sander is ls minus l. 20 00:00:54,720 --> 00:00:55,980 Does that make sense? 21 00:00:55,980 --> 00:00:56,813 I'm not sure, 22 00:00:56,813 --> 00:00:58,980 but what I am sure about is that right now 23 00:00:58,980 --> 00:01:01,410 I have a command with the name sander. 24 00:01:01,410 --> 00:01:04,320 Aliases behave as best internal commands. 25 00:01:04,320 --> 00:01:06,780 They become a part of the best shell 26 00:01:06,780 --> 00:01:10,170 and that makes that aliases are very, very fast. 27 00:01:10,170 --> 00:01:12,420 And if you want to configure your aliases 28 00:01:12,420 --> 00:01:14,550 in a persistent way, then you should put them 29 00:01:14,550 --> 00:01:17,116 in one of your best startup files. 30 00:01:17,116 --> 00:01:19,110 Now let me use unalias. 31 00:01:19,110 --> 00:01:20,310 That's the counterpart. 32 00:01:20,310 --> 00:01:22,260 If I use unalias sander 33 00:01:22,260 --> 00:01:25,290 I have just removed the alias sander. 34 00:01:25,290 --> 00:01:28,110 As you can see it, no longer exists. 35 00:01:28,110 --> 00:01:30,780 Now there's some more nice best features 36 00:01:30,780 --> 00:01:32,013 that I wanna talk about. 37 00:01:33,750 --> 00:01:35,550 In Bash you will also find a couple 38 00:01:35,550 --> 00:01:37,770 of useful keyboard shortcuts. 39 00:01:37,770 --> 00:01:39,480 We have already seen a couple of them 40 00:01:39,480 --> 00:01:41,310 and some of them we have not. 41 00:01:41,310 --> 00:01:43,320 Control-l is for clear screen. 42 00:01:43,320 --> 00:01:46,590 You can type clear but Control-l is so much easier. 43 00:01:46,590 --> 00:01:48,870 Or control-u which is allowing you 44 00:01:48,870 --> 00:01:50,730 to wipe the current command line. 45 00:01:50,730 --> 00:01:52,290 You just typed this lengthy command 46 00:01:52,290 --> 00:01:54,630 and then you realize, "Oh, I don't wanna do this." 47 00:01:54,630 --> 00:01:57,060 Control-u and it disappears. 48 00:01:57,060 --> 00:02:00,030 Control-a moves your cursor to the beginning of the line. 49 00:02:00,030 --> 00:02:02,730 And Control-e moves it to the end of the line. 50 00:02:02,730 --> 00:02:05,820 Control-c is a generic interrupt 51 00:02:05,820 --> 00:02:07,170 to the current process. 52 00:02:07,170 --> 00:02:08,130 It will break it, 53 00:02:08,130 --> 00:02:10,950 which means that it will basically stop it. 54 00:02:10,950 --> 00:02:12,840 And if Control-c doesn't work, 55 00:02:12,840 --> 00:02:14,220 try Control-d. 56 00:02:14,220 --> 00:02:16,980 Control-d is a generic exit command 57 00:02:16,980 --> 00:02:19,830 that might also get you out of the situation 58 00:02:19,830 --> 00:02:21,903 where you are in right now.