1 00:00:00,000 --> 00:00:02,230 [No audio] 2 00:00:02,230 --> 00:00:04,682 Finding system information. 3 00:00:04,970 --> 00:00:08,910 Every time you log into a Linux machine, it is 4 00:00:08,960 --> 00:00:12,678 very important for everyone to know which system they are 5 00:00:12,704 --> 00:00:15,138 logged in, in terms of what operating system it is 6 00:00:15,164 --> 00:00:19,578 running, or what hardware it has underneath or what's under 7 00:00:19,604 --> 00:00:21,918 the hood. There are a few commands to find that 8 00:00:21,944 --> 00:00:25,954 out. If you cat out the /etc/redhat-release 9 00:00:26,002 --> 00:00:28,234 file, it will give you the information about its operating 10 00:00:28,282 --> 00:00:31,962 system, the uname -a, which will also give you 11 00:00:31,976 --> 00:00:35,358 the information about operating system and some kernel information, and 12 00:00:35,384 --> 00:00:39,342 the last one is dmidecode, this command will also 13 00:00:39,416 --> 00:00:43,174 give you the information about processor, memory, the hardware that's 14 00:00:43,222 --> 00:00:46,434 underneath the operating system. Let's look at each of them 15 00:00:46,472 --> 00:00:50,358 one by one, and this time you log into our 16 00:00:50,444 --> 00:00:52,410 Linux machine through console. 17 00:00:52,410 --> 00:00:59,790 [No audio] 18 00:00:59,790 --> 00:01:05,400 Ok, let's clear this out. We are, whoami. 19 00:01:05,970 --> 00:01:08,182 We are root. I want you to exit out 20 00:01:08,196 --> 00:01:11,160 of it and become yourself, who am I?whoami. 21 00:01:11,610 --> 00:01:12,770 We are ourself. 22 00:01:12,890 --> 00:01:13,906 Where are we? 23 00:01:14,028 --> 00:01:16,310 Home directory. What's inside of our directory? 24 00:01:16,370 --> 00:01:21,682 The same listing of the files. Now let's make this a 25 00:01:21,696 --> 00:01:29,002 little bigger. When you do cat /etc/redhat-release, this is 26 00:01:29,016 --> 00:01:32,278 the file, it's a text file. It would tell you that 27 00:01:32,304 --> 00:01:40,702 we are running CentOS Linux 7.4, and the update 1708. The 28 00:01:40,716 --> 00:01:43,252 next command we have that we're going to learn is, you 29 00:01:43,252 --> 00:01:48,926 uname -a. This one tells you this is Linux. 30 00:01:48,998 --> 00:01:52,658 The hostname of the Linux,this is the kernel version, 31 00:01:52,814 --> 00:01:58,474 this is the el7.x86_64 bit, tells you the date and 32 00:01:58,572 --> 00:02:04,358 time, and when was the system actually was built, or packaged 33 00:02:04,394 --> 00:02:08,782 together and again what's the architecture of it. It tells you 34 00:02:08,794 --> 00:02:12,602 all the information about the operating system, and the last command 35 00:02:12,686 --> 00:02:17,098 is dmidecode. You won't be able to run it if 36 00:02:17,124 --> 00:02:18,974 you are a regular user. 37 00:02:19,142 --> 00:02:23,494 So see it says Permission denied, so what we do? We become root. 38 00:02:23,494 --> 00:02:29,050 [No audio] 39 00:02:29,050 --> 00:02:32,702 All right we are root, let's clear our screen. You want to 40 00:02:32,716 --> 00:02:38,978 type dmidecode, hit enter. All right, so it threw a lot 41 00:02:39,004 --> 00:02:41,822 of information on the screen, if you notice, very fast, see if 42 00:02:41,836 --> 00:02:46,406 you scroll up, so we could either do the scroll up, or 43 00:02:46,528 --> 00:02:49,550 what's the other way to do? You do dmidecode, 44 00:02:49,600 --> 00:02:51,160 hit up arrow key, space, 45 00:02:51,790 --> 00:02:54,314 pipe it, and do more, so we could 46 00:02:54,352 --> 00:02:57,650 view the output one page at a time. 47 00:02:57,700 --> 00:03:01,418 So hit enter, and here you will see, the 48 00:03:01,444 --> 00:03:05,834 BIOS information, the VirtualBox, what kind of computer 49 00:03:05,932 --> 00:03:11,478 it has underneath, what's the ROM size, we created 50 00:03:11,514 --> 00:03:16,658 the memory information, the system information, the manufacturer here, 51 00:03:16,744 --> 00:03:23,742 manufacturer information, base board information, also up here we missed 52 00:03:23,766 --> 00:03:26,246 one thing, it has a serial number, the product 53 00:03:26,308 --> 00:03:27,630 name is VirtualBox. 54 00:03:27,690 --> 00:03:30,066 Remember, we are running on Oracle VirtualBox. 55 00:03:30,198 --> 00:03:34,926 The manufacturer is Oracle Corporation, Chassis specified 56 00:03:34,998 --> 00:03:38,318 because there is no chassis underneath, and it gives 57 00:03:38,344 --> 00:03:42,470 you some processor, and some information about memory. So 58 00:03:42,580 --> 00:03:46,418 the few three basic commands that I think a 59 00:03:46,444 --> 00:03:50,966 system administrator or engineer should know, about which system 60 00:03:51,028 --> 00:03:53,654 they are logged into, because the first thing every 61 00:03:53,692 --> 00:03:58,180 time whoever logs into the system they should check 62 00:03:58,570 --> 00:04:00,774 they should run the first command as uname minus 63 00:04:00,822 --> 00:04:04,238 a, which should give them the exact information about 64 00:04:04,264 --> 00:04:06,266 the operating system they are logged in. 65 00:04:06,448 --> 00:04:09,618 Also, another good command is always run hostname 66 00:04:09,774 --> 00:04:12,194 sorry, hostname, and this will tell you which 67 00:04:12,232 --> 00:04:13,718 hostname you are logged in. 68 00:04:13,804 --> 00:04:17,618 So the reason I'm saying the hostname is important 69 00:04:17,704 --> 00:04:21,954 because if you are tasked to reboot a Linux machine, 70 00:04:22,002 --> 00:04:25,777 and you log into a different Linux machine by accident, 71 00:04:25,777 --> 00:04:29,102 and you do reboot the machine, then you 72 00:04:29,176 --> 00:04:31,434 could cause a lot of trouble. 73 00:04:31,542 --> 00:04:33,314 So just be careful, always log 74 00:04:33,352 --> 00:04:36,210 in and just type hostname. Thank you. 75 00:04:36,210 --> 00:04:39,616 [No audio]