[No audio]
Finding system information.
Every time you log into a Linux machine, it is
very important for everyone to know which system they are
logged in, in terms of what operating system it is
running, or what hardware it has underneath or what's under
the hood. There are a few commands to find that
out. If you cat out the /etc/redhat-release
file, it will give you the information about its operating
system, the uname -a, which will also give you
the information about operating system and some kernel information, and
the last one is dmidecode, this command will also
give you the information about processor, memory, the hardware that's
underneath the operating system. Let's look at each of them
one by one, and this time you log into our
Linux machine through console.
[No audio]
Ok, let's clear this out. We are, whoami.
We are root. I want you to exit out
of it and become yourself, who am I?whoami.
We are ourself.
Where are we?
Home directory. What's inside of our directory?
The same listing of the files. Now let's make this a
little bigger. When you do cat /etc/redhat-release, this is
the file, it's a text file. It would tell you that
we are running CentOS Linux 7.4, and the update 1708. The
next command we have that we're going to learn is, you
uname -a. This one tells you this is Linux.
The hostname of the Linux,this is the kernel version,
this is the el7.x86_64 bit, tells you the date and
time, and when was the system actually was built, or packaged
together and again what's the architecture of it. It tells you
all the information about the operating system, and the last command
is dmidecode. You won't be able to run it if
you are a regular user.
So see it says Permission denied, so what we do? We become root.
[No audio]
All right we are root, let's clear our screen. You want to
type dmidecode, hit enter. All right, so it threw a lot
of information on the screen, if you notice, very fast, see if
you scroll up, so we could either do the scroll up, or
what's the other way to do? You do dmidecode,
hit up arrow key, space,
pipe it, and do more, so we could
view the output one page at a time.
So hit enter, and here you will see, the
BIOS information, the VirtualBox, what kind of computer
it has underneath, what's the ROM size, we created
the memory information, the system information, the manufacturer here,
manufacturer information, base board information, also up here we missed
one thing, it has a serial number, the product
name is VirtualBox.
Remember, we are running on Oracle VirtualBox.
The manufacturer is Oracle Corporation, Chassis specified
because there is no chassis underneath, and it gives
you some processor, and some information about memory. So
the few three basic commands that I think a
system administrator or engineer should know, about which system
they are logged into, because the first thing every
time whoever logs into the system they should check
they should run the first command as uname minus
a, which should give them the exact information about
the operating system they are logged in.
Also, another good command is always run hostname
sorry, hostname, and this will tell you which
hostname you are logged in.
So the reason I'm saying the hostname is important
because if you are tasked to reboot a Linux machine,
and you log into a different Linux machine by accident,
and you do reboot the machine, then you
could cause a lot of trouble.
So just be careful, always log
in and just type hostname. Thank you.
[No audio]