1 00:00:00,120 --> 00:00:00,750 Hello everyone. 2 00:00:00,840 --> 00:00:04,960 And welcome back to the part three of Linux basic commands. 3 00:00:05,080 --> 00:00:10,830 And in this tutorial we will cover some of the comments mostly used in order to communicate with the 4 00:00:10,830 --> 00:00:12,000 system. 5 00:00:12,060 --> 00:00:19,920 So let me just open the two terminals once again so I can write the comments in one terminal and execute 6 00:00:19,920 --> 00:00:22,020 them in another terminal. 7 00:00:22,990 --> 00:00:27,780 We'll basically just cover some of the comments for networking. 8 00:00:27,780 --> 00:00:34,080 The most known and basic ones and some of the comments in order to check for example the running processes 9 00:00:34,470 --> 00:00:39,750 or check for example the version of your headers and so on and so on. 10 00:00:40,790 --> 00:00:47,810 So first of all we just now know commands to stay right here and first command that they want to cover 11 00:00:47,870 --> 00:00:52,770 which is a simple command and you probably already know what it does is. 12 00:00:52,790 --> 00:01:00,560 For example shutdown now most of you that know this command will know that this command won't really 13 00:01:00,560 --> 00:01:03,080 shut down my P.C. right away. 14 00:01:03,080 --> 00:01:09,260 For example if I click here enter right here it will say shut down scheduled for Monday and then the 15 00:01:09,260 --> 00:01:12,220 time I believe this is one minute. 16 00:01:12,920 --> 00:01:16,520 Yes it is one minute from me typing enter to this command. 17 00:01:16,520 --> 00:01:21,500 So in about 50 seconds this Linux machine will shut down. 18 00:01:21,500 --> 00:01:25,190 Now we do not want that since we have other comments to cover. 19 00:01:25,190 --> 00:01:30,920 So we will just cancel it with shutdown minus C. 20 00:01:31,220 --> 00:01:34,070 And right now our machine will not shut down. 21 00:01:34,130 --> 00:01:40,490 Now if you want to restart from terminal for example you will type here reboot command reboot command. 22 00:01:41,000 --> 00:01:47,930 Most of you probably expected it to be restart while restart command does not exist in Linux. 23 00:01:47,930 --> 00:01:52,820 In order for you to restart the system you want to type here in terminal reboot. 24 00:01:52,880 --> 00:01:58,670 Now don't clean cut and don't click enter here since it will shut down your P.C. while it will restart 25 00:01:58,670 --> 00:02:04,880 it but automatically it doesn't have a one minute delay as it has with the shutdown command. 26 00:02:05,270 --> 00:02:10,310 So we will not run this command will just basic cameras basically showing you if you click here enter 27 00:02:10,400 --> 00:02:12,450 it for restart the machine. 28 00:02:12,560 --> 00:02:20,670 So let me just type here the commands here will deleted here since we do not want to run it. 29 00:02:20,720 --> 00:02:27,590 Now some of the comments that are towards the processes that are running in this machine are for example 30 00:02:27,610 --> 00:02:33,880 P.S. which will give you the process running in the current terminal that we have open. 31 00:02:34,460 --> 00:02:37,470 So this batch will be always open. 32 00:02:37,490 --> 00:02:40,890 You do not need to run anything in order for this process to be here. 33 00:02:41,180 --> 00:02:44,420 And the peace process is the process that we just ran. 34 00:02:44,630 --> 00:02:50,800 As you can see right here now this is just the processes that this Linux terminal is running. 35 00:02:50,840 --> 00:02:56,570 Now if you want to check all of the process you can just let me just in enlarges and launch this terminal 36 00:02:56,600 --> 00:02:58,900 for one second and type your top. 37 00:02:58,940 --> 00:03:07,010 This will open up all of the processes currently running on your carrier Linux machine. 38 00:03:07,290 --> 00:03:10,440 Now most of this we don't even start ourselves. 39 00:03:10,440 --> 00:03:15,600 This is just bunch of processes that the Linux itself starts up as it boot. 40 00:03:15,780 --> 00:03:22,720 You can also see some of the some of the outputs right here such as CPO percentage usage tasks. 41 00:03:22,720 --> 00:03:31,190 How many of them to running 176 sleeping available memory swap memory and bunch of other options. 42 00:03:31,200 --> 00:03:36,640 So right here you can also check who is running the process in our case. 43 00:03:36,650 --> 00:03:41,690 I believe all the process will be rolled since we don't even have any other account. 44 00:03:41,820 --> 00:03:48,540 So all of them will be Ruth now that we got that out of the way in order to close this. 45 00:03:48,540 --> 00:03:58,110 You just press here city roll plus X or Y and to just basically call this top comment which shows us 46 00:03:58,110 --> 00:04:00,420 the process in real time. 47 00:04:00,420 --> 00:04:07,260 Now you can see that it stopped so we can just clear the screen and put this terminal back to its size. 48 00:04:07,350 --> 00:04:09,020 Let me just type here Pierce and pop. 49 00:04:09,030 --> 00:04:11,350 We covered those for for no one. 50 00:04:11,430 --> 00:04:14,820 Now another comment which is a really simple comment is your name. 51 00:04:15,270 --> 00:04:20,370 So basically this will just give you out the name of your operating system which in our case is an x. 52 00:04:20,400 --> 00:04:22,280 So it is just your name. 53 00:04:22,770 --> 00:04:28,410 Now in order to check out all the options for this command you can just type here your man your name 54 00:04:28,950 --> 00:04:31,040 and it will open up manual for this command. 55 00:04:31,110 --> 00:04:35,520 And you can see things it is possible to do with this command. 56 00:04:35,520 --> 00:04:40,930 So for example a minus sir which we used in order to installed our chatters before. 57 00:04:40,950 --> 00:04:47,400 If you remember well basically to check our current headers it will print out the kernel release the 58 00:04:47,400 --> 00:04:51,520 minus S4 printout as it says with your colonel name minus able print. 59 00:04:51,520 --> 00:04:53,290 Also let's try minus eight. 60 00:04:55,860 --> 00:04:59,720 And it will print out the full name as you can see Linux. 61 00:04:59,730 --> 00:05:05,550 KELLY This is our Heather's version that we downloaded it in that image. 62 00:05:05,550 --> 00:05:07,810 As I said it is debian based. 63 00:05:08,070 --> 00:05:10,950 And there are a bunch of other additions to this kind. 64 00:05:11,400 --> 00:05:16,400 So this is not really that important command. 65 00:05:17,220 --> 00:05:22,310 Only in the process of installing the virtual box guest editions. 66 00:05:22,320 --> 00:05:29,250 We used it so we might be using it from time to time but it's not that important really. 67 00:05:30,120 --> 00:05:36,390 Now the next command that is important however is the command where you check out your I.P. address 68 00:05:38,300 --> 00:05:43,910 now some of you may know that in Windows in order for you to check your I.P. address you type IP config 69 00:05:45,210 --> 00:05:51,030 well in the next it is basically the same command except the second letter is switched with a F. 70 00:05:51,190 --> 00:05:58,390 So it basically is I f config and this command will print out all the network interfaces that are currently 71 00:05:58,390 --> 00:06:04,360 connected to the clinic's machine and also the IP addresses of those interfaces. 72 00:06:04,360 --> 00:06:09,250 If they are connected to the Internet so we can see that right now we only have one interface where 73 00:06:09,280 --> 00:06:14,710 basically two but one is a look back interface you will all have this one and you will probably all 74 00:06:14,710 --> 00:06:21,940 have this one as well which will be named the same but in case for example that you plug in our violence 75 00:06:21,940 --> 00:06:28,930 adapter you will be given another name for the marvelous interface which can be different from for all 76 00:06:28,930 --> 00:06:30,010 of you. 77 00:06:30,190 --> 00:06:35,440 Now here we can see our IP address which will probably be the same for you. 78 00:06:35,770 --> 00:06:42,490 If you didn't configure it in the network settings now in order for us to change this we will cover 79 00:06:42,490 --> 00:06:49,180 that in the next video where we changed this IP address to an IP address that basically belongs to our 80 00:06:49,180 --> 00:06:51,530 own local network. 81 00:06:51,640 --> 00:06:53,030 Now what do I mean by that. 82 00:06:53,060 --> 00:07:00,620 Well almost all the other machines in my local network are starting with 1 92 that 168 that one. 83 00:07:00,670 --> 00:07:04,870 And here we have a machine that starts with 10 0 2. 84 00:07:04,870 --> 00:07:09,250 And basically those are not same those those do not belong to the same local network. 85 00:07:09,370 --> 00:07:17,500 So we want to make this machine have the IP address that starts with 192 that 168 that one but we cover 86 00:07:17,500 --> 00:07:19,750 that in the next material for now on. 87 00:07:19,750 --> 00:07:25,080 This is just the command to check out your IP address and it is very important. 88 00:07:25,120 --> 00:07:29,640 You should remember it as you will be using it extensively. 89 00:07:29,710 --> 00:07:37,890 So next command is nuts that's not a separate comment because it has a bunch of options. 90 00:07:37,900 --> 00:07:47,200 For example you want to type here net set and for example minus an R this command right here will basically 91 00:07:47,200 --> 00:07:53,370 give you a gateway as you can see right here and the IP address of the gateway that you can check out. 92 00:07:53,380 --> 00:07:59,800 I use it a lot in order to find out what is the IP address of the router on some of my files that I 93 00:07:59,800 --> 00:08:06,460 do not know the IP address of the routing and in this case it is standard 0 2 the 2 but this is only 94 00:08:06,460 --> 00:08:10,820 because we are using the net in order to connect to the Internet. 95 00:08:10,960 --> 00:08:17,710 Once we configure the network in the next tutorial we will be having I believe 1 92 that 168 that one 96 00:08:17,770 --> 00:08:21,790 that one as that is my router IP address. 97 00:08:21,790 --> 00:08:30,140 So with nets that you can also check out for example your current connections DP connections and the. 98 00:08:30,190 --> 00:08:33,010 Right now we don't have any connection as you can see. 99 00:08:33,520 --> 00:08:39,550 Let me just check here with out a no doesn't have. 100 00:08:39,550 --> 00:08:45,100 So basically we are not connected anywhere right now which is skewed because we are not even on the 101 00:08:45,100 --> 00:08:51,130 Internet and we didn't fund any program in order to connect somewhere so we wont be having any connections 102 00:08:51,130 --> 00:08:54,750 to the other IP addresses or servers right here. 103 00:08:54,790 --> 00:09:02,620 But if you for example run some of the programs front for example Tor or run open firefox solid just 104 00:09:02,680 --> 00:09:07,300 open firefox it should open up connection I believe 105 00:09:10,790 --> 00:09:16,680 let's just open up and wait for it to connect and it is connected right now. 106 00:09:16,700 --> 00:09:21,860 If we want to run the same command you can see that we are connected to the bunch of IP addresses different 107 00:09:21,890 --> 00:09:26,420 IP addresses which are basically just the IP addresses of this website. 108 00:09:27,680 --> 00:09:33,710 And here we have you can see that the process the program name that is making the connection is Firefox 109 00:09:34,250 --> 00:09:40,050 and the program idea with 1 6 6 9. 110 00:09:40,310 --> 00:09:43,920 So if we close this right here it shouldn't have them anymore. 111 00:09:44,390 --> 00:09:46,190 Well it basically just has them. 112 00:09:46,310 --> 00:09:46,940 Oh yes. 113 00:09:46,940 --> 00:09:51,570 Right here you can see that before we closed it it was an established connection. 114 00:09:51,570 --> 00:09:57,920 And right now we have a time wait state which basically means we are not connected anymore so we cannot 115 00:09:59,030 --> 00:10:04,280 make communication with that site anymore since here it was established as we were opening that website 116 00:10:04,310 --> 00:10:08,090 and here as we closed it there is no connection anymore. 117 00:10:08,180 --> 00:10:13,280 I believe this will disappear in a few seconds or minutes but we wont be waiting for that large screen 118 00:10:13,280 --> 00:10:23,930 to screen and they appear at nets that as we cover that now there are two probably two most important 119 00:10:23,930 --> 00:10:28,480 commands that you want to run now. 120 00:10:28,670 --> 00:10:35,910 Most people teach this at the beginning as one of the first commands but I only thought it right here 121 00:10:35,910 --> 00:10:41,940 at the end because basically one of these commands will take hours to finish at least for me when I 122 00:10:41,940 --> 00:10:44,380 install a new Kleenex machine. 123 00:10:44,400 --> 00:10:53,460 It takes about an hour to finish so first command is apt apt update or you can just type your app to 124 00:10:53,460 --> 00:10:55,070 get updates. 125 00:10:55,890 --> 00:10:57,030 What this will do it with. 126 00:10:57,060 --> 00:11:04,250 It will connect to the Linux repositories that you have linked in these sources of list file and it 127 00:11:04,250 --> 00:11:06,660 will check for any updates. 128 00:11:06,660 --> 00:11:10,600 Now you can see right here it is to carry the download. 129 00:11:11,810 --> 00:11:14,900 And it will check if there are any current updates right there. 130 00:11:18,380 --> 00:11:22,710 Now once that command finishes you want to go with app upgrade. 131 00:11:22,710 --> 00:11:31,010 And as you can see this will print out a bunch of new files that need to be upgraded and it will possibly 132 00:11:31,010 --> 00:11:32,330 be the same for you. 133 00:11:33,680 --> 00:11:35,000 And if you click here why. 134 00:11:35,120 --> 00:11:37,370 Which we for example want to. 135 00:11:37,400 --> 00:11:43,490 This will take a lot of time to finish but you must do it now. 136 00:11:43,640 --> 00:11:48,340 Not a lot of time but about an hour maybe 40 minutes I'm not really sure. 137 00:11:48,380 --> 00:11:49,730 It depends. 138 00:11:49,850 --> 00:11:53,860 And we won't be waiting of course for that to finish. 139 00:11:53,870 --> 00:11:59,900 We will just cut to the next trial and for that time I want to show you the this simple last command 140 00:12:00,290 --> 00:12:05,600 in order to communicate with the terminal in system which is basically just exit and maybe you will 141 00:12:05,600 --> 00:12:08,560 need to run it twice because it has some process opened. 142 00:12:08,570 --> 00:12:11,660 So if you type your exit it will basically just call the terminal. 143 00:12:11,660 --> 00:12:21,020 Simple as that now if you run this command to operate which you should have and the you should wait 144 00:12:21,020 --> 00:12:26,750 for it basically to finish it might ask you some of the questions along the process of installation 145 00:12:26,750 --> 00:12:30,610 of these files and you basically want to answer yes to all of them. 146 00:12:31,310 --> 00:12:34,780 So we won't be waiting for this to finish right now. 147 00:12:34,790 --> 00:12:41,030 We will just cut it right here and I hope I see you in the next story where we will be configuring our 148 00:12:41,030 --> 00:12:43,430 IP address in network settings. 149 00:12:43,430 --> 00:12:45,010 Hope I see you there and take care.