1 00:00:00,000 --> 00:00:10,510 [Intro music] 2 00:00:10,510 --> 00:00:12,118 Wow, what achievement. 3 00:00:12,214 --> 00:00:15,030 You have spent so much time on this course and 4 00:00:15,080 --> 00:00:18,582 now finally you have finished it and now it's time 5 00:00:18,656 --> 00:00:22,474 to do a recap and we will go over commands 6 00:00:22,522 --> 00:00:25,760 that we actually have learned in this course. 7 00:00:26,270 --> 00:00:27,894 Do you know how many commands so 8 00:00:27,932 --> 00:00:29,322 far we have learned in this course? 9 00:00:29,396 --> 00:00:30,320 Take a guess. 10 00:00:31,190 --> 00:00:34,090 Well, approximately we have learned 11 00:00:34,150 --> 00:00:38,374 about 146 to 150 commands. 12 00:00:38,542 --> 00:00:41,398 So to be specific, because I will be adding 13 00:00:41,434 --> 00:00:43,866 a few commands later or I have added a 14 00:00:43,868 --> 00:00:46,878 few commands now that are not part of it, 15 00:00:46,904 --> 00:00:51,870 but anyway, approximately we have learned 150 commands. 16 00:00:52,310 --> 00:00:53,790 That is awesome, guys. 17 00:00:53,900 --> 00:00:56,442 You should pat yourself on the back 18 00:00:56,576 --> 00:00:58,134 that you have done an amazing job. 19 00:00:58,172 --> 00:01:00,618 So I'm going to cover in this lesson or in 20 00:01:00,644 --> 00:01:04,530 this recap all the commands that we have covered. 21 00:01:05,690 --> 00:01:08,178 So let's go over my spreadsheet that I have 22 00:01:08,204 --> 00:01:11,406 it open and at the same time I have 23 00:01:11,468 --> 00:01:14,674 a window terminal open to my Linux machine. 24 00:01:14,722 --> 00:01:16,422 So go over one by one. 25 00:01:16,496 --> 00:01:19,350 So the first command I have right here, every 26 00:01:19,400 --> 00:01:24,802 command you'll see, they are all alphabetically sorted. 27 00:01:24,886 --> 00:01:28,266 So they are starting from A all the way to Z. 28 00:01:28,388 --> 00:01:29,910 So we'll go one by one. 29 00:01:29,960 --> 00:01:33,082 So the first command that we have here is alias. 30 00:01:33,226 --> 00:01:34,782 What does an alias do? 31 00:01:34,916 --> 00:01:37,422 alias creates a shortcut or a 32 00:01:37,436 --> 00:01:39,178 short name for a long command. 33 00:01:39,274 --> 00:01:42,090 If you just type simply alias and you will see 34 00:01:42,140 --> 00:01:45,198 all the aliases that have already been created for you. 35 00:01:45,344 --> 00:01:48,982 To remove an alias, you could just do unalias. 36 00:01:49,126 --> 00:01:50,362 Then we have arch. 37 00:01:50,446 --> 00:01:53,540 arch is the command that tells you the system 38 00:01:53,930 --> 00:01:57,920 architecture, whether it's 64 bit or 32 bit. 39 00:01:58,250 --> 00:02:02,614 at command is used to schedule ad hoc jobs, 40 00:02:02,662 --> 00:02:05,710 meaning there is a command called Cron tab. 41 00:02:05,770 --> 00:02:09,150 If you wanted to schedule a job repetitively, or 42 00:02:09,199 --> 00:02:11,032 if you want to schedule a job just one 43 00:02:11,072 --> 00:02:14,874 time, you will just type at command and the 44 00:02:14,972 --> 00:02:18,066 complete syntax can be found by running man at 45 00:02:18,128 --> 00:02:21,858 and you'll find all the options with that. 46 00:02:21,944 --> 00:02:24,654 Then we have awk. awk command shows the 47 00:02:24,692 --> 00:02:26,370 output of a file by field. 48 00:02:26,480 --> 00:02:29,674 So if you do ls -ltr on your home directory 49 00:02:29,782 --> 00:02:35,218 and let's say you want to list only the first column. 50 00:02:35,254 --> 00:02:37,906 So then you do ls -ltr, you awk 51 00:02:37,918 --> 00:02:41,922 it, and you print it with dollar one, and you 52 00:02:41,936 --> 00:02:44,110 hit enter, and you'll get only the first column. 53 00:02:44,230 --> 00:02:45,730 Moving on. Then we have bash. 54 00:02:45,790 --> 00:02:48,114 bash is just a shell, it just 55 00:02:48,152 --> 00:02:49,710 tells you what shell you are running. 56 00:02:49,760 --> 00:02:51,906 So if you do echo and do 57 00:02:51,968 --> 00:02:56,254 $SHELL, you'll see our shell is bash. 58 00:02:56,422 --> 00:02:57,658 Then we have bc. 59 00:02:57,754 --> 00:02:59,326 bc stands for Calculator. 60 00:02:59,398 --> 00:03:02,410 If you want to do some computation, some calculations, 61 00:03:02,470 --> 00:03:05,554 we just type bc and you get into Calculator 62 00:03:05,602 --> 00:03:08,034 mode and just simply type your calculations like two 63 00:03:08,132 --> 00:03:10,566 plus two and it will give you the four. 64 00:03:10,688 --> 00:03:12,522 And of course to get out of it you can 65 00:03:12,536 --> 00:03:14,958 just do control C to get out of it. 66 00:03:14,984 --> 00:03:18,978 Then we have cal. cal is for calendar. case is 67 00:03:19,004 --> 00:03:21,906 a script that provides the options that is used 68 00:03:21,968 --> 00:03:25,110 in a script and it gives you the option. 69 00:03:25,160 --> 00:03:26,994 Like if you want to press A or 70 00:03:27,032 --> 00:03:28,746 B or C gives you those option. 71 00:03:28,808 --> 00:03:30,690 cat is to read a file. 72 00:03:31,130 --> 00:03:34,102 Then we have cd is to change the directory. 73 00:03:34,246 --> 00:03:37,566 Some of these commands that you already know by heart. 74 00:03:37,628 --> 00:03:39,320 So I'm not going to go into detail. 75 00:03:40,010 --> 00:03:42,870 chage, this command is used if you wanted 76 00:03:42,920 --> 00:03:45,118 to change the properties of a password 77 00:03:45,214 --> 00:03:47,250 and the password should expire or not. 78 00:03:47,360 --> 00:03:50,442 We have learned that and I believe in module three. 79 00:03:50,576 --> 00:03:51,834 Then chgrp, 80 00:03:51,932 --> 00:03:54,358 to change the ownership of a file 81 00:03:54,394 --> 00:03:56,550 on a directory, a group ownership sorry. 82 00:03:56,720 --> 00:03:58,906 chmod is to change file permission. 83 00:03:58,978 --> 00:04:02,134 chown is to change file ownership. 84 00:04:02,302 --> 00:04:07,614 Meaning if you are doing ls -l, you'll see this is, 85 00:04:07,712 --> 00:04:11,334 to change the first column you need to use chmod. 86 00:04:11,492 --> 00:04:14,634 To change this, you need to use chgrp, and 87 00:04:14,672 --> 00:04:18,166 to change this ownership you need to use chown. 88 00:04:18,298 --> 00:04:22,386 Then we have the next one is chronyc which is a 89 00:04:22,387 --> 00:04:26,779 newer program that is used for NTP system or NTP service. 90 00:04:27,529 --> 00:04:30,510 clear is used to clear your screen. 91 00:04:30,560 --> 00:04:31,926 So you can simply type clear, 92 00:04:31,988 --> 00:04:33,426 it'll clear up the screen. 93 00:04:33,608 --> 00:04:38,338 cmp is to compare files byte by byte. command 94 00:04:38,434 --> 00:04:41,442 then --help is if you want to get a 95 00:04:41,516 --> 00:04:44,262 quick help on any command that you want. 96 00:04:44,396 --> 00:04:47,206 Then cp is to copy files and directories. 97 00:04:47,278 --> 00:04:50,590 Very simple command. createrepo, 98 00:04:50,710 --> 00:04:52,758 this is a command that we 99 00:04:52,784 --> 00:04:54,930 learn, I believe in module eight. 100 00:04:55,040 --> 00:05:00,022 When we actually, module seven I believe sorry, 101 00:05:00,096 --> 00:05:02,638 and when we wanted to create a 102 00:05:02,664 --> 00:05:05,342 local repository to download the packages. 103 00:05:05,486 --> 00:05:06,914 Then we have crontab. 104 00:05:06,962 --> 00:05:11,782 This is to schedule the jobs, whether you want 105 00:05:11,796 --> 00:05:13,666 to schedule one time job or regular job. 106 00:05:13,728 --> 00:05:20,278 cut is to cut the characters or fields in an output. So if 107 00:05:20,304 --> 00:05:23,494 you have ls -ltr or cat or whatever you're doing. 108 00:05:23,532 --> 00:05:26,198 So if you want to cut the first character, 109 00:05:26,234 --> 00:05:31,834 so you will do cut -c1. 110 00:05:31,992 --> 00:05:36,310 This will give you all the ds in every line. 111 00:05:36,480 --> 00:05:38,662 So you hit enter and you'll see it'll give 112 00:05:38,676 --> 00:05:42,600 you all the d. So this is cut, of course you have practiced that. 113 00:05:43,170 --> 00:05:44,386 Then we have date. 114 00:05:44,508 --> 00:05:46,138 It gives you the time and date. 115 00:05:46,224 --> 00:05:48,218 dd converts or copy of file. 116 00:05:48,254 --> 00:05:53,378 Just like copy but it is mostly used to do the backups. 117 00:05:53,474 --> 00:05:57,098 Then we have df, file system disk space usage. 118 00:05:57,134 --> 00:06:00,826 When you do df -h, you'll get 119 00:06:00,888 --> 00:06:04,080 the space utilization of the entire file system. 120 00:06:04,770 --> 00:06:07,394 Next one number 27 command diff. 121 00:06:07,442 --> 00:06:09,898 Compare files line by line. 122 00:06:10,044 --> 00:06:13,142 dig is the DNS lookup utility. 123 00:06:13,226 --> 00:06:18,142 Remember we did that in lesson in module seven where 124 00:06:18,336 --> 00:06:20,482 if you wanted to find out the IP address of 125 00:06:20,496 --> 00:06:23,138 a hostname, we use dig or nslookup. 126 00:06:23,234 --> 00:06:24,850 Same thing at DNS Utility. 127 00:06:25,230 --> 00:06:28,886 dmesg, it's a print kernel ring buffer. 128 00:06:29,018 --> 00:06:31,234 Or if you wanted to see system messages, any 129 00:06:31,272 --> 00:06:34,366 hardware related messages, you just simply type dmesg. 130 00:06:34,488 --> 00:06:36,998 But of course to run dmesg you have to be root. 131 00:06:37,034 --> 00:06:38,854 So just be careful because if you run 132 00:06:38,892 --> 00:06:43,510 dmesg right here okay, so sorry, 133 00:06:43,560 --> 00:06:45,298 you don't have to be root. You could just run. 134 00:06:45,384 --> 00:06:48,142 There is another command that is dmidecode, 135 00:06:48,276 --> 00:06:50,618 which is the next command. For this command, 136 00:06:50,654 --> 00:06:52,066 yes, you do have to run, 137 00:06:52,188 --> 00:06:54,650 you do have to be root. 138 00:06:54,770 --> 00:06:57,182 Let's see, right here says, Permission 139 00:06:57,206 --> 00:06:58,454 denied. You have to be root. 140 00:06:58,502 --> 00:07:00,178 This one tells you about the 141 00:07:00,204 --> 00:07:02,290 system information, the hardware information. 142 00:07:02,460 --> 00:07:05,100 What is the CPU memory you have in your system? 143 00:07:05,730 --> 00:07:08,700 Moving on. do is the command that is used 144 00:07:10,350 --> 00:07:12,470 in a scripting language with conjunction, 145 00:07:12,590 --> 00:07:16,418 the for loop or while loop scripting. 146 00:07:16,514 --> 00:07:20,318 Then du is used for file space usage. 147 00:07:20,414 --> 00:07:23,486 If you wanted to check a usage of a specific file. 148 00:07:23,618 --> 00:07:27,266 Let's say I have this file in my home directory. 149 00:07:27,338 --> 00:07:29,362 Let's say pictures. If I wanted to know the space 150 00:07:29,436 --> 00:07:33,382 I do du -sh Pictures/ and 151 00:07:33,396 --> 00:07:35,534 it tells me it is zero byte. 152 00:07:35,642 --> 00:07:38,578 So just like that you could pick any of the 153 00:07:38,604 --> 00:07:42,058 files, run du -sh followed by the file name 154 00:07:42,084 --> 00:07:47,100 or directory name to get the specific size information. 155 00:07:48,630 --> 00:07:52,486 echo is just a display input on the screen. 156 00:07:52,668 --> 00:07:54,838 It's nothing but whatever that 157 00:07:54,864 --> 00:07:57,734 you type like echo Imran. 158 00:07:57,902 --> 00:08:00,566 So it's bringing back Imran. 159 00:08:00,638 --> 00:08:02,462 So it's just like as if you were standing 160 00:08:02,486 --> 00:08:04,198 in the middle of all the mountains that you 161 00:08:04,224 --> 00:08:07,174 echo your voice and your voice comes back. It's just like that. 162 00:08:07,212 --> 00:08:09,434 This is kind of tool or command 163 00:08:09,542 --> 00:08:11,342 that is mostly used in scripting. 164 00:08:11,426 --> 00:08:12,802 And as you know, scripting we 165 00:08:12,816 --> 00:08:14,400 have covered in module six. 166 00:08:15,090 --> 00:08:19,214 Then we have else, else is also a scripting command, 167 00:08:19,262 --> 00:08:21,794 works in conjunction with for loop. 168 00:08:21,962 --> 00:08:24,518 It is used to create a script. 169 00:08:24,614 --> 00:08:26,362 Then ethtool tells you 170 00:08:26,436 --> 00:08:28,226 the information about the NIC. 171 00:08:28,298 --> 00:08:33,789 If it is speed, it's other properties of that NIC. 172 00:08:34,169 --> 00:08:39,073 Then we have exit. exit is just to simply exit your terminal. 173 00:08:39,241 --> 00:08:42,240 fdisk is to display disk information. 174 00:08:42,570 --> 00:08:45,638 And of course you need to be root to run this command. 175 00:08:45,794 --> 00:08:48,145 fdisk -l, and it says Permission denied. 176 00:08:48,217 --> 00:08:51,669 So be root. So let's see, we become root. 177 00:08:51,669 --> 00:08:53,610 [No audio] 178 00:08:53,610 --> 00:08:57,070 And now if you type fdisk -l, you'll see 179 00:08:57,120 --> 00:09:00,120 all the disks that we have available in the system. 180 00:09:00,810 --> 00:09:02,150 We covered in module eight. 181 00:09:02,210 --> 00:09:04,618 And then fg bring a process in 182 00:09:04,644 --> 00:09:10,178 the foreground. fi is again used in a scripting 183 00:09:10,214 --> 00:09:14,110 language with conjunction with if. find is to find 184 00:09:14,160 --> 00:09:17,870 files and directories, then firewall-cmd command. 185 00:09:17,930 --> 00:09:20,770 This is the command to 186 00:09:20,940 --> 00:09:23,654 enable firewall or configure firewall. 187 00:09:23,702 --> 00:09:24,634 It's a command line. 188 00:09:24,732 --> 00:09:30,190 If you want to use the GUI, then you will run firewalld, 189 00:09:30,190 --> 00:09:33,590 actually config which brings up the GUI. 190 00:09:35,110 --> 00:09:36,914 Oh, sorry, there's no d here. 191 00:09:37,012 --> 00:09:39,138 It's just firewall-config. 192 00:09:39,234 --> 00:09:41,322 So when you run that, it brings 193 00:09:41,346 --> 00:09:46,518 up a GUI to configure firewall. 194 00:09:46,674 --> 00:09:48,302 So quit out of it. 195 00:09:48,436 --> 00:09:49,442 Then we have for. 196 00:09:49,516 --> 00:09:51,926 Again, for is used in the scripting language. free, 197 00:09:51,988 --> 00:09:55,286 it tells you how much memory you have used, available. 198 00:09:55,408 --> 00:09:58,310 ftp to transfer files from one system to another. 199 00:09:58,480 --> 00:10:00,554 grep we learned that as well. 200 00:10:00,652 --> 00:10:05,586 I believe in module three to grep a specific keyword 201 00:10:05,718 --> 00:10:08,910 from a file or a directory or a directory structure. 202 00:10:09,090 --> 00:10:11,678 There is another command called egrep, which 203 00:10:11,704 --> 00:10:14,030 is an enhanced version of grep. 204 00:10:14,710 --> 00:10:16,994 So if you want to learn that as well, 205 00:10:17,032 --> 00:10:19,420 do man on egrep you'll find that out. 206 00:10:19,930 --> 00:10:22,274 groupadd is to create a new 207 00:10:22,312 --> 00:10:24,858 group, users new group. Then groupdel, 208 00:10:24,894 --> 00:10:27,100 as you could say it's a delete a group. 209 00:10:28,570 --> 00:10:32,238 Then we have, we covered the system administration module. 210 00:10:32,394 --> 00:10:34,158 gunzip is to compress a file, 211 00:10:34,194 --> 00:10:35,694 gzip is to compress a file. 212 00:10:35,742 --> 00:10:39,822 All choose the same way, different, different tools. 213 00:10:39,906 --> 00:10:41,978 halt, if you want to shut down the 214 00:10:42,004 --> 00:10:44,620 system immediately without waiting on the process. 215 00:10:45,010 --> 00:10:49,458 head if you wanted to get a few top lines of a file. 216 00:10:49,494 --> 00:10:52,598 So if you don't specify an option with the head, then 217 00:10:52,624 --> 00:10:55,038 it will give you the first ten lines by default. 218 00:10:55,194 --> 00:10:58,398 history commands tells you how many commands 219 00:10:58,434 --> 00:11:00,710 have been ran in your terminal. 220 00:11:01,210 --> 00:11:04,240 hostname tells you the hostname of the system. 221 00:11:04,690 --> 00:11:07,734 hostnamectl is the utility or command 222 00:11:07,782 --> 00:11:09,462 you use to manage the hostname. 223 00:11:09,486 --> 00:11:14,826 If you want to change the hostname, you could use hostnamectl. 224 00:11:14,898 --> 00:11:17,226 This is a newer command or newer utility 225 00:11:17,298 --> 00:11:20,380 introduced in Redhat 7 or CentOS 7. 226 00:11:21,370 --> 00:11:24,710 id is just print user information. if, 227 00:11:24,760 --> 00:11:27,760 it's scripting command works conjunction with fi. 228 00:11:28,150 --> 00:11:32,306 ifconfig tells you your network information. 229 00:11:32,428 --> 00:11:35,066 If you run ifconfig, you ran that many times 230 00:11:35,128 --> 00:11:37,442 and you should know this command by heart. 231 00:11:37,636 --> 00:11:41,294 ifdown, if you want to bring down the network, the 232 00:11:41,332 --> 00:11:44,354 NIC. Let's say if you want to bring this down, you 233 00:11:44,392 --> 00:11:47,522 run ifdown followed by this NIC name. Right now, 234 00:11:47,536 --> 00:11:50,320 if you see it's up right here and running. 235 00:11:51,910 --> 00:11:54,950 ifup, again opposite of down. init is 236 00:11:55,000 --> 00:11:56,510 if you want to bring the system 237 00:11:56,560 --> 00:11:58,310 in different levels, we talked about different 238 00:11:58,360 --> 00:12:01,886 levels from level zero through level six. 239 00:12:01,948 --> 00:12:03,950 So there are total seven levels. What are those? 240 00:12:04,000 --> 00:12:05,666 I believe you know that. 241 00:12:05,848 --> 00:12:07,934 If you forget any of these, please 242 00:12:07,972 --> 00:12:10,158 go back and review those modules. 243 00:12:10,314 --> 00:12:13,310 iostat is about input output status. 244 00:12:13,810 --> 00:12:15,878 What is being coming into the 245 00:12:15,904 --> 00:12:17,942 system, what is leaving the system. 246 00:12:18,076 --> 00:12:19,206 Then we have ip. 247 00:12:19,278 --> 00:12:21,878 It's a newer command which will be replacing the 248 00:12:21,904 --> 00:12:25,434 ifconfig command, does the same thing as ifconfig. 249 00:12:25,434 --> 00:12:29,538 iptables is an older command 250 00:12:29,634 --> 00:12:32,320 which a few systems still has it. 251 00:12:32,710 --> 00:12:36,242 This command has been replaced by the 252 00:12:36,256 --> 00:12:40,430 new command firewall-cmd or firewall-config. 253 00:12:40,990 --> 00:12:42,974 kill is to kill a process by process. 254 00:12:43,072 --> 00:12:48,474 ID. last shows the listing of last logged in users. 255 00:12:48,642 --> 00:12:50,114 less is the opposite of more. 256 00:12:50,152 --> 00:12:52,106 And you guys know what more is, right? 257 00:12:52,288 --> 00:12:55,898 If you wanted to read a file one page at 258 00:12:55,924 --> 00:12:58,166 a time on the screen, then you use more. 259 00:12:58,288 --> 00:12:59,798 And if you want to do the 260 00:12:59,824 --> 00:13:01,660 opposite of it, then you do less. 261 00:13:02,230 --> 00:13:04,360 ln, tell me what ln is. 262 00:13:04,750 --> 00:13:07,106 Well, it's to create a link. It's that simple. 263 00:13:07,228 --> 00:13:09,518 locate if it works the same way as if 264 00:13:09,544 --> 00:13:13,154 you are trying to find a file, the only 265 00:13:13,192 --> 00:13:15,906 difference between file and locate is locate, 266 00:13:15,978 --> 00:13:18,926 if you're creating a file right now and run 267 00:13:19,048 --> 00:13:21,580 locate to find that file, it won't work because 268 00:13:22,270 --> 00:13:26,750 there's another utility, updatedb command that runs every 269 00:13:26,800 --> 00:13:30,338 day which will tell the system hey, this system, 270 00:13:30,424 --> 00:13:32,982 there's a newer file that's been created. 271 00:13:33,066 --> 00:13:34,578 So if you want to use locate 272 00:13:34,614 --> 00:13:38,030 command right away, run updatedb command. 273 00:13:38,530 --> 00:13:41,982 ls, you don't tell me you don't know this command. 274 00:13:42,126 --> 00:13:45,474 Okay. lvcreate is to create a logical volume. 275 00:13:45,582 --> 00:13:49,638 It's covered in module 8. lvdisplay is to display 276 00:13:49,674 --> 00:13:52,374 the logical volume. mail and to sendmail, 277 00:13:52,422 --> 00:13:54,110 if you want to send mail from one system 278 00:13:54,160 --> 00:13:57,914 to another or from outside of the system. man, 279 00:13:57,952 --> 00:13:59,834 we use man commands many times. 280 00:13:59,932 --> 00:14:03,302 Very helpful command. Creating a directory, you know that 281 00:14:03,376 --> 00:14:06,446 and then keep moving on to number 76. 282 00:14:06,628 --> 00:14:10,278 Make file system if you want to create an xfl 283 00:14:10,314 --> 00:14:13,838 file system, if you're adding a new disk to the 284 00:14:13,864 --> 00:14:16,622 system, then you will create a file system. 285 00:14:16,696 --> 00:14:18,410 This is covered in module eight. 286 00:14:18,580 --> 00:14:22,022 mkswap. Swap as something that is taken 287 00:14:22,096 --> 00:14:23,930 out from your hard disk. 288 00:14:24,730 --> 00:14:27,998 And once you dedicate some space from your 289 00:14:28,024 --> 00:14:29,678 hard disk for your swap, then you will 290 00:14:29,704 --> 00:14:32,450 run the command mkswap. Again 291 00:14:32,500 --> 00:14:35,910 it's part of module eight. modprobe, 292 00:14:36,030 --> 00:14:38,178 program to add and remove modules. 293 00:14:38,214 --> 00:14:40,442 We covered this command if you forgot about it. 294 00:14:40,456 --> 00:14:43,050 We covered this when we are doing our NIC bonding. 295 00:14:43,170 --> 00:14:45,014 And NIC bonding is a lesson that 296 00:14:45,052 --> 00:14:50,438 is covered in module in module seven. Yes. 297 00:14:50,584 --> 00:14:52,718 more we just talked about more. 298 00:14:52,804 --> 00:14:56,190 mount is used if you want to mount 299 00:14:56,250 --> 00:15:00,040 a file system, we used this command in module eight. 300 00:15:00,670 --> 00:15:03,280 mv is to move files around 301 00:15:04,150 --> 00:15:05,642 from one system to another. 302 00:15:05,716 --> 00:15:08,142 We covered that in the earlier modules. 303 00:15:08,226 --> 00:15:12,662 mv is also used to rename a file, right? Yes. 304 00:15:12,736 --> 00:15:16,190 netstat is telling you about the network statistics. 305 00:15:17,290 --> 00:15:18,962 You could use many different options 306 00:15:19,036 --> 00:15:20,598 and a lot of system administer 307 00:15:20,694 --> 00:15:23,978 use netstat to troubleshoot many issues. 308 00:15:24,124 --> 00:15:26,058 See, it tells you what's coming in, what's 309 00:15:26,094 --> 00:15:29,294 leaving, about only the network status related things. 310 00:15:29,452 --> 00:15:33,914 I usually run this command as netstat -rnv to check the 311 00:15:33,952 --> 00:15:37,300 system gateway, the IP address and stuff like that too. 312 00:15:37,300 --> 00:15:42,170 nice, nice is to prioritize the process. 313 00:15:42,340 --> 00:15:44,526 I think it's a part of the system administration. 314 00:15:44,598 --> 00:15:47,930 I believe module five. Check 315 00:15:48,040 --> 00:15:49,562 if it's not module five, then 316 00:15:49,636 --> 00:15:52,360 probably module five, I think. Yes. 317 00:15:53,470 --> 00:15:55,718 If you want to run a process and you want 318 00:15:55,744 --> 00:15:58,720 to prioritize with different levels, you can run nice. 319 00:15:59,770 --> 00:16:01,454 nohup is the command to 320 00:16:01,492 --> 00:16:03,966 avoid interruption upon terminal exit. 321 00:16:04,098 --> 00:16:05,654 What does it mean by that? If I'm running 322 00:16:05,692 --> 00:16:07,466 a command right now and I close this 323 00:16:07,528 --> 00:16:09,542 window, it will also close my program, 324 00:16:09,616 --> 00:16:11,222 so you run nohup with it. 325 00:16:11,296 --> 00:16:12,782 We cover that, of course, and 326 00:16:12,796 --> 00:16:14,380 it's look up just like dig. 327 00:16:14,770 --> 00:16:16,698 Then we have ntpq. 328 00:16:16,794 --> 00:16:18,486 It's an NTP utility. 329 00:16:18,558 --> 00:16:20,102 Just like Chronyc. 330 00:16:20,296 --> 00:16:24,234 It tells you which system what NTP 331 00:16:24,282 --> 00:16:27,494 clock that we are syncing to. 332 00:16:27,532 --> 00:16:29,798 So if you run ntpq, it brings you 333 00:16:29,824 --> 00:16:33,470 to ntpq mode and then you run peers. 334 00:16:33,470 --> 00:16:35,530 [No audio] 335 00:16:35,530 --> 00:16:37,334 Oh, it says connection refused. I know why? 336 00:16:37,372 --> 00:16:41,234 Because remember we stopped NTP and we 337 00:16:41,272 --> 00:16:46,974 ran the chronyd, so that's why we cannot get the connection. 338 00:16:47,022 --> 00:16:49,262 Anyway, if you're on the older system, you 339 00:16:49,276 --> 00:16:51,554 will see the ntpq utility there, 340 00:16:51,592 --> 00:16:55,416 if not, then run chronyc. 341 00:16:55,416 --> 00:16:58,134 Then we have pwd to change the password, 342 00:16:58,182 --> 00:17:03,162 very beginning lessons, ping beginning lessons or lesson 343 00:17:03,246 --> 00:17:06,880 7th module. pipe if you want to, 344 00:17:07,450 --> 00:17:11,010 pipe is mostly used to change the output of a command. 345 00:17:11,190 --> 00:17:16,934 So if you do ls -l, and you want 346 00:17:16,972 --> 00:17:21,460 to view the second column that you pipe it to 347 00:17:23,290 --> 00:17:27,174 another command, which is let's say awk and print 348 00:17:27,222 --> 00:17:28,670 let's say second column. 349 00:17:29,770 --> 00:17:34,117 It'll give you second column. Yes. 350 00:17:34,204 --> 00:17:36,773 Okay, so it'll give you the second column. 351 00:17:36,882 --> 00:17:39,050 Actually I wanted to get the third column, 352 00:17:39,970 --> 00:17:41,358 then it'll give you the third column. 353 00:17:41,394 --> 00:17:43,253 Anyway, the pipe actually translates 354 00:17:43,301 --> 00:17:45,185 or changes the output. 355 00:17:45,377 --> 00:17:48,998 So it actually deals not with the 356 00:17:49,023 --> 00:17:51,150 command, it deals with the output. 357 00:17:51,329 --> 00:17:52,406 Okay, moving on. 358 00:17:52,468 --> 00:17:56,018 pkill, kills the process by process name. 359 00:17:56,164 --> 00:17:58,170 If you have a process running xyz, 360 00:17:58,230 --> 00:18:00,090 you could just type pkill xyz. 361 00:18:00,150 --> 00:18:01,286 It will kill the process. 362 00:18:01,408 --> 00:18:02,966 You don't need to know the process. 363 00:18:03,088 --> 00:18:06,414 ID. ps command, very powerful command, 364 00:18:06,462 --> 00:18:08,582 and when it comes to system administration, when you 365 00:18:08,596 --> 00:18:12,470 run ps with different options, let's say -ef 366 00:18:13,690 --> 00:18:16,022 and then we do more, because it's going to 367 00:18:16,036 --> 00:18:18,038 throw so much processes on the screen. 368 00:18:18,184 --> 00:18:19,998 This one tells you all the processes 369 00:18:20,034 --> 00:18:21,820 that are running in our system. 370 00:18:23,290 --> 00:18:27,710 pvcreate, lvm commands is to create a 371 00:18:27,820 --> 00:18:31,350 physical volume displays to display the physical volume. 372 00:18:31,530 --> 00:18:33,520 pvs works pretty much the same. 373 00:18:33,970 --> 00:18:37,190 pwd is print working directory. 374 00:18:37,990 --> 00:18:40,058 That is something you don't know, right? 375 00:18:40,204 --> 00:18:42,566 Come on, don't tell me you don't know. You do know. 376 00:18:42,688 --> 00:18:47,394 Okay, read is again command used in conjunction 377 00:18:47,502 --> 00:18:50,418 with the scripting language which reads and waits 378 00:18:50,454 --> 00:18:52,130 for the input from a user. 379 00:18:52,690 --> 00:18:55,706 We covered that in module six. 380 00:18:55,888 --> 00:18:57,470 reboot as you could see, 381 00:18:57,520 --> 00:19:00,830 reboot as name says reboots the system, 382 00:19:00,940 --> 00:19:03,954 rm removes the files and directory. 383 00:19:04,122 --> 00:19:07,638 rmdir, it just removes the directory. 384 00:19:07,674 --> 00:19:10,314 Now, why do we have rmdir? 385 00:19:10,422 --> 00:19:13,854 Why can't we just use rm space 386 00:19:13,902 --> 00:19:16,038 -r to remove a directory? 387 00:19:16,194 --> 00:19:18,122 Well, seriously, I don't know. 388 00:19:18,316 --> 00:19:20,034 Well, they want to have a separate 389 00:19:20,082 --> 00:19:22,602 dedicated command to remove a directory. 390 00:19:22,686 --> 00:19:25,240 Well, that's fine. Moving on. 391 00:19:25,930 --> 00:19:28,602 rpm is about package management. 392 00:19:28,746 --> 00:19:34,360 We use the command to install a package in our system. 393 00:19:34,360 --> 00:19:42,270 rsync, rsync is something to synchronize your packages 394 00:19:42,270 --> 00:19:48,580 or your system from one server to another. 395 00:19:50,350 --> 00:19:52,898 scp is again doing the same thing. 396 00:19:52,924 --> 00:19:55,166 Copy file from one system to another. 397 00:19:55,348 --> 00:19:58,866 script, script is something, if you are running script 398 00:19:58,938 --> 00:20:01,722 and then you want to record all your commands 399 00:20:01,746 --> 00:20:04,550 that you're going to run, then you type script. 400 00:20:04,990 --> 00:20:09,230 sestatus is about SELINUX status. 401 00:20:10,210 --> 00:20:16,746 If you type sestatus, you will see SELinux is enabled. 402 00:20:16,878 --> 00:20:20,246 We've talked about SELinux as well of course. sh 403 00:20:20,368 --> 00:20:24,750 is the shell, just like bash or KornShell. shutdown, 404 00:20:24,750 --> 00:20:28,610 you know that. sort one of the beginning commands to sort your 405 00:20:28,660 --> 00:20:33,278 output in alphabetical order or reverse order. sosreport, that 406 00:20:33,364 --> 00:20:38,980 is part of system administration module five, that is something 407 00:20:39,670 --> 00:20:44,642 that was added late after the entire course. So if 408 00:20:44,656 --> 00:20:48,318 you have not covered this lesson please go back module 409 00:20:48,354 --> 00:20:53,740 five, cover this lesson as well. split, splitting files into different 410 00:20:54,250 --> 00:20:59,370 files by size or lines. ssh is just a protocol 411 00:20:59,550 --> 00:21:02,342 that is used to connect from one machine to another. 412 00:21:02,536 --> 00:21:07,410 stat is a command that will tell you the attributes 413 00:21:07,470 --> 00:21:12,242 or properties of our directories, mostly used for SELinux. If 414 00:21:12,256 --> 00:21:15,482 you want to switch user from one user to another what do you do? 415 00:21:15,556 --> 00:21:20,402 You do su space dash. If you do not specify a 416 00:21:20,416 --> 00:21:24,520 user, then it will change it to root, yes. 417 00:21:24,566 --> 00:21:28,730 sudo, sudo allows you to run command as root. swapon, 418 00:21:28,780 --> 00:21:31,874 swapoff, once you create a swap it works 419 00:21:31,912 --> 00:21:34,938 the same way as we have mkswap 420 00:21:34,974 --> 00:21:40,818 remember, but once you make a swap then you do swapon 421 00:21:40,818 --> 00:21:45,002 and swapoff to enable or disable. systemctl is a 422 00:21:45,016 --> 00:21:49,922 newer command to enable start or stop the services. If you 423 00:21:49,936 --> 00:21:52,634 wanted to start let's say Apache service, remember we covered that 424 00:21:52,672 --> 00:21:56,942 in module seven. If you want to stop the service you 425 00:21:56,942 --> 00:22:00,878 do systemctl stop follow by the name of the service. 426 00:22:01,000 --> 00:22:05,582 In older version you would do system service the name of 427 00:22:05,596 --> 00:22:11,798 the service and stop or start or restart. tail gives you 428 00:22:11,824 --> 00:22:16,346 the last few lines of an output. Usually by default gives 429 00:22:16,408 --> 00:22:21,350 ten. tar is to put everything all the files into one 430 00:22:21,400 --> 00:22:26,522 container so that becomes a tar file. tcpdump show every 431 00:22:26,716 --> 00:22:30,837 in and out traffic of a system. So if you do ifconfig, 432 00:22:30,837 --> 00:22:36,302 and do tcpdump -i is for interface and 433 00:22:36,316 --> 00:22:40,682 then enp0s3, and hit enter, you're going to see every 434 00:22:40,756 --> 00:22:45,000 package that is leaving your system and every transaction that's coming 435 00:22:45,088 --> 00:22:47,642 into the system. It's going to throw so many messages on 436 00:22:47,656 --> 00:22:51,530 my screen, so I'm not going to run it. Moving on, 437 00:22:51,580 --> 00:22:55,818 telenet it works just like SSH but it is not secured 438 00:22:55,974 --> 00:22:59,118 just like SSH. So a lot of companies don't use telnet 439 00:22:59,154 --> 00:23:04,780 anymore. then is the command that used in conjunction with the 440 00:23:05,110 --> 00:23:09,722 for a while loop in a scripting. top is one of 441 00:23:09,736 --> 00:23:15,386 the favorite commands of system administrators to check system resources. touch 442 00:23:15,448 --> 00:23:20,250 is to create a new empty file. unmount or umount 443 00:23:20,310 --> 00:23:23,510 is to unmount a file system, it is the opposite of 444 00:23:23,560 --> 00:23:27,170 mount. uname tells you about your system and when you run 445 00:23:27,220 --> 00:23:30,602 uname, it tells you that it's a Linux, but when 446 00:23:30,616 --> 00:23:34,190 you type uname -a which is for all, then it 447 00:23:34,240 --> 00:23:38,610 will give you all the information about your system like Kernel, 448 00:23:38,670 --> 00:23:44,778 version, or when it was created, and so on. uniq removes 449 00:23:44,814 --> 00:23:50,094 all the duplicates from an output. One of the initial lessons 450 00:23:50,142 --> 00:23:54,963 that we covered. uptime shows system uptime and load information. 451 00:23:54,963 --> 00:24:00,446 useradd, you create a new user. userdel, is to delete a user right. 452 00:24:00,568 --> 00:24:07,010 usermod, it says it's just modify user properties or attributes. 453 00:24:07,330 --> 00:24:10,434 When you run just users, it will actually print 454 00:24:10,482 --> 00:24:13,300 all the usernames of user currently logged in. 455 00:24:13,810 --> 00:24:15,438 vgcreate or vgdisplay, 456 00:24:15,474 --> 00:24:19,862 both commands are for LVMs, it is to create 457 00:24:19,936 --> 00:24:22,362 a new group and a new volume, 458 00:24:22,446 --> 00:24:26,774 and to display the volume group. vi, you really 459 00:24:26,812 --> 00:24:29,610 need to know that is a vi editor. 460 00:24:29,790 --> 00:24:32,594 When you run vi followed by the file name, it will create 461 00:24:32,632 --> 00:24:37,240 a new file and we'll put you into an editing mode. w, 462 00:24:37,810 --> 00:24:41,390 show who is logged on and what they are doing. 463 00:24:41,500 --> 00:24:44,294 So when you do clear and do just w, 464 00:24:44,392 --> 00:24:46,458 you'll see, it tells you there are two users 465 00:24:46,494 --> 00:24:49,518 logged in with the terminal and how much CPU 466 00:24:49,554 --> 00:24:52,334 they're using and what time they're logged in, 467 00:24:52,372 --> 00:24:57,940 and what they are doing. wget is the network, sorry, 468 00:24:58,870 --> 00:25:02,370 wall, wall is to send a message to everyone's terminal. 469 00:25:02,430 --> 00:25:04,922 So if you want to send hi or if you 470 00:25:04,936 --> 00:25:07,778 want to send hey, I'm bringing down the system, you 471 00:25:07,804 --> 00:25:10,658 type wall, hit Enter and then you send a message. 472 00:25:10,744 --> 00:25:13,050 And then you do control d which will broadcast 473 00:25:13,110 --> 00:25:16,000 message to everyone who is logged into the system. 474 00:25:16,000 --> 00:25:20,680 wc, count word, characters, lines, and so on. 475 00:25:21,310 --> 00:25:25,022 wget, network downloader program. So if you have a 476 00:25:25,036 --> 00:25:27,878 complete URL, you can just do wget followed by 477 00:25:27,904 --> 00:25:30,290 the URL and it will download that package. 478 00:25:30,610 --> 00:25:32,970 whatis, is the short description of a command. 479 00:25:33,030 --> 00:25:35,246 If you want to know something about command without 480 00:25:35,308 --> 00:25:38,030 going through the man pages, then you just type 481 00:25:38,080 --> 00:25:42,194 whatis followed by the command name. which will 482 00:25:42,232 --> 00:25:45,350 show the full path of a shell command. 483 00:25:45,350 --> 00:25:51,434 So, let's say if you were doing which wall so 484 00:25:51,472 --> 00:25:56,642 it tells you that this wall command is located in 485 00:25:56,836 --> 00:26:04,790 /bin/wall. while again subscripting command works in conjunction with do loop, while-do. 486 00:26:05,290 --> 00:26:09,280 who, shows who is logged on just like w. 487 00:26:09,610 --> 00:26:13,226 But the difference between w and who is that 488 00:26:13,288 --> 00:26:18,066 who does not show all that information after login 489 00:26:18,138 --> 00:26:22,960 idle CPU, PCPU, and WHAT. whoami, 490 00:26:24,430 --> 00:26:25,650 remember that command? 491 00:26:25,770 --> 00:26:27,160 You better, right? 492 00:26:27,730 --> 00:26:33,230 It's whoami tells you your username. write is to send a message 493 00:26:33,280 --> 00:26:37,982 to a specific user. xfs_growfs that is 494 00:26:38,056 --> 00:26:42,602 also used when we were creating or extending file system. 495 00:26:42,796 --> 00:26:47,762 So it's in module seven, last command right here, 496 00:26:47,956 --> 00:26:49,480 but of course not the least, 497 00:26:49,990 --> 00:26:51,940 that's how everybody says this, right. 498 00:26:51,940 --> 00:26:55,382 yum, yum is to download and 499 00:26:55,456 --> 00:26:57,820 install packages in your system. 500 00:26:58,510 --> 00:27:02,106 So here is the summary of everything we have learned. 501 00:27:02,238 --> 00:27:05,570 And if you remember every single command that we 502 00:27:05,620 --> 00:27:09,882 just covered and of course covered an entire 503 00:27:09,906 --> 00:27:12,638 training course, then you did an amazing job. 504 00:27:12,724 --> 00:27:16,327 You know everything inside out and again, good luck. 505 00:27:16,327 --> 00:27:17,675 [No audio]