1 00:00:03,080 --> 00:00:08,660 Well, I hope you've learned a good bit about Cally and Linux command line commands, and I hope you've 2 00:00:08,660 --> 00:00:15,530 enjoyed it, but I wanted to throw in a little bonus on some additional Linux terminal commands because 3 00:00:15,530 --> 00:00:22,040 the command line is such an important piece of the Kalli Linux history and the Kelly Linux experience 4 00:00:22,040 --> 00:00:27,780 that I wanted to give you a few more terminal commands for fun, for convenience, for speed, maybe 5 00:00:27,800 --> 00:00:28,490 for profit. 6 00:00:28,880 --> 00:00:34,940 If you decide to become a unique systems administrator or if you work with Linux a lot in your ethical 7 00:00:34,940 --> 00:00:37,210 hacking or other cybersecurity profession. 8 00:00:37,550 --> 00:00:39,080 So I've got a handful of commands here. 9 00:00:39,290 --> 00:00:45,800 You'll see Collum t Kalama will allow us to display output like a table so it can clean some things 10 00:00:45,800 --> 00:00:46,070 up. 11 00:00:46,400 --> 00:00:51,110 I'll give an example or two that we can go back to a previous directory with c.D space minus. 12 00:00:51,650 --> 00:00:55,100 We can turn on aliases that will make our commands shorter and faster. 13 00:00:55,100 --> 00:00:55,980 We could do L.L. 14 00:00:56,450 --> 00:00:57,350 To do a list. 15 00:00:57,410 --> 00:00:59,610 Long, endless space dash l. 16 00:01:00,230 --> 00:01:01,280 We'll see a couple of others. 17 00:01:01,280 --> 00:01:03,830 We could run multiple commands all the same time. 18 00:01:03,830 --> 00:01:08,540 You might have used the ampersand ampersand before to run two commands at the same time. 19 00:01:09,140 --> 00:01:12,110 We've got a semicolon that we can do as well, so it runs in order. 20 00:01:12,710 --> 00:01:15,370 We've got the ability reuse the last argument. 21 00:01:15,410 --> 00:01:20,930 So let's dig into a few of these and then we'll see a few down here at the bottom that are really just 22 00:01:20,930 --> 00:01:23,690 for fun and then a few extra that could help you out. 23 00:01:23,990 --> 00:01:27,250 So I'll go through maybe everything on this page, but I will go through a few of them. 24 00:01:27,260 --> 00:01:32,720 So let's run the column T so that we can see what the column Dashty does. 25 00:01:33,140 --> 00:01:37,370 So first of all, we need some output that we need formatted like a table. 26 00:01:37,400 --> 00:01:43,580 So Mount is the way we connect new directories, new USP drives, for example. 27 00:01:44,090 --> 00:01:47,600 So if I want to see that here, I'll make it a little bigger. 28 00:01:50,110 --> 00:01:57,030 So if I want to run the Mount Command, it'll tell us all the devices that are connected right now, 29 00:01:57,040 --> 00:02:03,760 everything that we could c.b into, everything that we could list and splay sometimes control L or you 30 00:02:03,760 --> 00:02:05,130 can type clear or control. 31 00:02:05,170 --> 00:02:07,030 That's another shortcut to put on the screen there. 32 00:02:07,030 --> 00:02:08,380 And I use it from time to time. 33 00:02:08,690 --> 00:02:13,330 Want to make sure that I show that we might want to see them out. 34 00:02:13,330 --> 00:02:17,470 Displayed a little more column friendly so I can say mount. 35 00:02:17,530 --> 00:02:18,610 And then we pipe it. 36 00:02:19,030 --> 00:02:24,600 That is the vertical pipe symbol on a U.S. keyboard that shift and the backslash. 37 00:02:25,030 --> 00:02:30,910 You may have to look around on your keyboard if you're using a non English non U.S. on UK keyboard. 38 00:02:31,540 --> 00:02:32,390 European keyboard. 39 00:02:32,410 --> 00:02:34,930 You can find that as a shift key as well. 40 00:02:35,860 --> 00:02:41,950 But the vertical pipe symbol will take the output of one command and send it to another. 41 00:02:42,100 --> 00:02:46,990 So column Dashti will do tab spaces for our columns. 42 00:02:47,380 --> 00:02:49,870 And that makes our mount much more readable. 43 00:02:49,870 --> 00:02:55,010 We can see what the name of the file system is or the name of the application. 44 00:02:55,010 --> 00:02:56,650 And we can see the type. 45 00:02:56,710 --> 00:02:58,720 We can see everything really nicely spaced up. 46 00:02:59,050 --> 00:03:01,030 Another place to use this control. 47 00:03:01,150 --> 00:03:03,720 L might be for your ETSI password. 48 00:03:03,760 --> 00:03:09,340 So cat slash etsi slash pass word. 49 00:03:10,210 --> 00:03:13,750 We'll show you all of the users on your system. 50 00:03:14,140 --> 00:03:18,100 And it used to be the place on really old versions of Linux where we'd actually store their password 51 00:03:18,100 --> 00:03:18,910 hashes as well. 52 00:03:18,910 --> 00:03:24,070 We do that Nazi shadow now, but we can actually display this a little more friendly. 53 00:03:24,250 --> 00:03:26,260 If I control L. 54 00:03:26,500 --> 00:03:30,340 I can hit the up arrow cat and see password and I can pipe it. 55 00:03:31,560 --> 00:03:32,400 Two column. 56 00:03:34,860 --> 00:03:35,910 Dash t. 57 00:03:36,360 --> 00:03:40,950 And this time you noticed that cannot see past where etsi password had a lot of colon's in there. 58 00:03:41,280 --> 00:03:45,010 I can specify and specify a separator dash s. 59 00:03:45,580 --> 00:03:47,850 S tab space on the colon's. 60 00:03:48,480 --> 00:03:54,240 So now I can read all the user names and I can see where their home directories might be for those that 61 00:03:54,240 --> 00:03:54,660 have them. 62 00:03:55,070 --> 00:03:59,240 And I can see some other information, their user I.D., things like this from group memberships. 63 00:03:59,280 --> 00:04:07,090 So this is a really handy way to to be able to display data in a nice column tab spaced format. 64 00:04:08,250 --> 00:04:12,150 Going back to a previous directory, that's a handy thing to do, especially when you're swapping back 65 00:04:12,150 --> 00:04:13,830 and forth between two locations. 66 00:04:14,220 --> 00:04:15,650 Let's say that we're in our home. 67 00:04:15,690 --> 00:04:22,830 So if I do PWP, you can say I'm at home Caleigh right now, but if I want to c.d into ETSI. 68 00:04:24,870 --> 00:04:26,030 And then I want to c.D back. 69 00:04:26,070 --> 00:04:28,080 I'm going to see T minus. 70 00:04:29,820 --> 00:04:31,390 And it will take me back to Hong Kalli. 71 00:04:31,830 --> 00:04:35,540 The good thing is to change directories back to Hong Caleigh seating slash Etsy. 72 00:04:35,640 --> 00:04:37,380 Oh wow, I can do c.D minus. 73 00:04:37,440 --> 00:04:41,040 And it'll bring me back and I'll swap back to Etsy CDE. 74 00:04:41,790 --> 00:04:46,350 That will bring me just a plain c.D will bring me back to my home directory. 75 00:04:46,350 --> 00:04:50,910 Or you can do c.D in the tilde but you can tell that we're in home because of the Tilda's symbol here 76 00:04:50,910 --> 00:04:51,440 on Kelly. 77 00:04:51,930 --> 00:04:54,870 So if I do PWP, it'll tell me I'm in home. 78 00:04:55,030 --> 00:04:55,420 Kalli. 79 00:04:56,190 --> 00:04:57,840 That's a really cool one to be able to use. 80 00:04:59,480 --> 00:05:05,330 Aliases, this is a really powerful thing to give yourself some shortcut commands, you can actually 81 00:05:05,330 --> 00:05:08,990 write your own commands all clear or control all the screen. 82 00:05:09,560 --> 00:05:14,740 If I do an L. s space dash l, I get more information about my listing. 83 00:05:14,750 --> 00:05:15,920 We've used it less before. 84 00:05:15,950 --> 00:05:18,530 But now Ellis Space Dash l. 85 00:05:19,010 --> 00:05:20,840 Gives us the ability to list long. 86 00:05:21,080 --> 00:05:24,950 Well, I might want to shorten that into a much shorter command. 87 00:05:25,340 --> 00:05:27,440 So the alias is one way to do that. 88 00:05:27,500 --> 00:05:29,000 Alias L l equals. 89 00:05:29,090 --> 00:05:31,420 And then a single quote around L'Estang Shell. 90 00:05:31,910 --> 00:05:33,170 So if I say alias. 91 00:05:36,130 --> 00:05:38,090 L l equals. 92 00:05:38,200 --> 00:05:43,240 And then I put a single quote, ellis' base dash l enter. 93 00:05:43,600 --> 00:05:47,290 If I press l l it's gonna give me a long listing. 94 00:05:47,720 --> 00:05:53,110 In fact, this was a command that I used to enjoy back when I was using Unix in the early 90s back at 95 00:05:53,110 --> 00:05:53,800 Georgia Tech. 96 00:05:54,110 --> 00:05:57,250 L l was one of the short aliases we always pregnant programmed in. 97 00:05:57,730 --> 00:06:05,560 If you're an old i.p, if you're an old older user of, of Linux, you might instead of wanting to do 98 00:06:05,560 --> 00:06:08,050 IPA, you might want to do I-F config. 99 00:06:08,470 --> 00:06:13,690 Well I have config is not a command anymore and most distributions but I could set up an alias. 100 00:06:14,140 --> 00:06:22,870 I have config equals quote I p hey and now if I run I have config. 101 00:06:24,850 --> 00:06:26,680 I've got my own command that will work. 102 00:06:27,010 --> 00:06:31,900 Usually we want to do this for convenience, to keep command shorter like we did with L. 103 00:06:31,930 --> 00:06:32,320 L. 104 00:06:32,830 --> 00:06:35,140 So we just type L as a command and it does it. 105 00:06:35,260 --> 00:06:37,810 Sometimes we like to have that backwards compatibility. 106 00:06:37,810 --> 00:06:43,150 So instead of type an IPA, even though that's shorter than I have config, we might still want to put 107 00:06:43,150 --> 00:06:44,110 that in just in case. 108 00:06:44,470 --> 00:06:45,760 So we don't mess up in the future. 109 00:06:46,330 --> 00:06:51,310 And there may be times that you actually want to make those aliases permanent. 110 00:06:51,640 --> 00:06:55,180 Right now, if I close out of everything. 111 00:06:57,390 --> 00:07:01,590 And blood back into this machine that's going to forget my alias, because it was just a command for 112 00:07:01,590 --> 00:07:03,840 this particular session. 113 00:07:04,380 --> 00:07:06,720 But if I change this in my back. 114 00:07:06,810 --> 00:07:07,560 Ah, see. 115 00:07:07,920 --> 00:07:11,860 So if I say nano dot bash. 116 00:07:11,920 --> 00:07:12,850 Ah, see. 117 00:07:15,110 --> 00:07:19,760 These are actually my Basche settings, so I will scroll down just a little bit. 118 00:07:20,270 --> 00:07:25,910 And this is the Nano Ed. If you haven't seen this before, Nano itself is a really cool way to get around. 119 00:07:26,450 --> 00:07:34,370 You can see I've got some aliases already set down in here, but I can actually just come to my aliases 120 00:07:35,060 --> 00:07:39,650 in the terminal and I can just delete a couple of the. 121 00:07:42,520 --> 00:07:45,620 Aliases delete a couple of the comments. 122 00:07:45,640 --> 00:07:47,920 The pound symbol is a comment in Basche scripting. 123 00:07:48,490 --> 00:07:56,200 And so when I change this in my Bashar Sea, it will actually make this every time I log in to Kalli 124 00:07:56,200 --> 00:07:58,120 or every time open a new terminal window. 125 00:07:58,410 --> 00:08:03,970 It's going to run this script and I'll always be able to enter L.L to Ellis long. 126 00:08:04,450 --> 00:08:07,420 I can do L a to list all the files. 127 00:08:07,450 --> 00:08:10,720 So it even shows this bash RC file. 128 00:08:11,170 --> 00:08:13,120 So those are some really cool things. 129 00:08:13,120 --> 00:08:14,030 And to get out an A.. 130 00:08:14,030 --> 00:08:23,260 You control oh control odah write it, enter and control X to get out and then the next time I log in 131 00:08:23,720 --> 00:08:28,230 I'll still be able to do my l l and see everything I'll even be able to do in L.. 132 00:08:28,240 --> 00:08:31,000 A. if I log back in to the terminal. 133 00:08:31,450 --> 00:08:33,280 So I'd have to kill my terminal window. 134 00:08:34,670 --> 00:08:36,560 And run it again. 135 00:08:37,820 --> 00:08:40,250 And now I list all my files. 136 00:08:42,290 --> 00:08:48,710 Not just my regular documents, music templates, videos actually have all my hidden files or my DOT 137 00:08:48,710 --> 00:08:55,910 files like my Basche history, my Bashar RC, some other really cool commands or some really other cool 138 00:08:55,910 --> 00:08:58,900 things that you can do with our command line terminal Linux. 139 00:08:59,450 --> 00:09:05,090 Since we're running just a little bit along, I will try to jump to one or two really fun ones are using. 140 00:09:05,090 --> 00:09:09,800 Your last argument is really handy and reusing the last command, especially if you forget to do pseudo 141 00:09:09,800 --> 00:09:17,090 before something like I wanted to do service net ing or manager. 142 00:09:19,040 --> 00:09:23,810 Restart and I forget to say pseudo, it's going to say, I don't know what that command is, but if 143 00:09:23,810 --> 00:09:31,190 I say pseudo bang bang the two exclamation marks, it will say, oh, you want to restart networking? 144 00:09:31,310 --> 00:09:32,570 Kelly and Kelly. 145 00:09:34,710 --> 00:09:36,650 Kia, I make sure I type it right. 146 00:09:36,730 --> 00:09:42,610 And we restarted our networking, so pseudo bang bang or pseudo with the two exclamation marks is a 147 00:09:42,610 --> 00:09:43,390 really useful one. 148 00:09:43,780 --> 00:09:45,780 And just for fun, Rev. 149 00:09:47,290 --> 00:09:52,400 It is a fun command, so if I echo hello and pipe it a rebuttal, reverse it, phablet. 150 00:09:52,610 --> 00:09:53,660 That's a fun little thing. 151 00:09:53,690 --> 00:09:58,400 So pseudo sorry I can say echo hello. 152 00:09:59,120 --> 00:10:02,960 And pipe that to Rav and it'll reverse it. 153 00:10:03,150 --> 00:10:05,870 Only if I say phablet. 154 00:10:06,860 --> 00:10:07,430 Hello. 155 00:10:08,490 --> 00:10:13,180 It will make it in nice bubley letters of fig lit for Eyssen. 156 00:10:14,560 --> 00:10:21,580 I get my name in a nice little ASCII art or some character art and then there are lots of other little 157 00:10:21,580 --> 00:10:21,930 commands. 158 00:10:21,940 --> 00:10:24,580 In fact, I encourage you to try a few those like the calendar. 159 00:10:24,850 --> 00:10:30,580 You can factor numbers from the command line clear I gave you on there with the control l head if you 160 00:10:30,580 --> 00:10:32,250 give head and the name of a file. 161 00:10:32,300 --> 00:10:34,920 It'll give me the first few lines of a file. 162 00:10:34,950 --> 00:10:38,110 Tail will give you the last few few lines instead of scrolling off the screen. 163 00:10:38,440 --> 00:10:43,120 If you have a reviewing logs, tail is a really good command because you can see just the last few updates 164 00:10:43,120 --> 00:10:45,430 added on grep is like our super find. 165 00:10:45,430 --> 00:10:51,760 If you want to find one line in a file that will give you the information you're looking for. 166 00:10:52,120 --> 00:10:58,090 Like if you're looking for information on your Caleigh user, you could cap etsi password and grep it, 167 00:10:58,150 --> 00:11:02,720 pipe that to grip and say grip Caleigh and it will find that username. 168 00:11:03,520 --> 00:11:09,520 The greater than symbol that we used earlier you can actually use to create an empty file by Peiping. 169 00:11:09,520 --> 00:11:10,660 Nothing into it. 170 00:11:10,990 --> 00:11:12,220 So for redirect nothing. 171 00:11:12,220 --> 00:11:15,850 Just the angle bracket greater than symbol file name. 172 00:11:16,210 --> 00:11:18,940 There's also another domain called Touch that does the same thing. 173 00:11:19,360 --> 00:11:22,180 So there's lots to learn out on the Linux command line. 174 00:11:22,420 --> 00:11:24,090 More than we can fit into this course. 175 00:11:24,310 --> 00:11:28,330 But hope that things are some useful commands and hope you've enjoyed learning something about Linux 176 00:11:28,330 --> 00:11:29,650 from the command line terminal.