System, utility commands.
These are very basic commands that are being used in Linux environment.
Some of those commands are just like in Windows.
We have time, we have calendar.
Now, Windows is a good environment and you could view those time and calculators and stuff like that
by going to the accessories.
But in Linux it's not possible.
So so that's why they are commands that are being built to tell you to the date, the uptime information,
the host name, the you name about the operating system, which means where the commands are located,
the calculator sorry, the calendar and the BCC is binary calculators.
Now let's look at our Linux machine and run these commands one by one in the next machine.
When you are logged in through the GOI to the console, you'll see the time here.
You also have the option to go into the applications and pull up the calendar and you'll see all the
information that are automatically viewed without running any command.
But what if you are logging in through the putty or the terminal client?
And as I said before, 98% of the time you will be logging in to the putty client to the terminal where
you're not going to be able to see all those environment.
So let's look at the view through the putty again.
We'll put in our IP address.
It's 192, 168 56.101.
And I remember by now and if you don't, you can just simply go back to your console and type if config
it enter and in the top right here, this is the IP address you punch in that IP address right here
and click on open terminal.
It will open up.
You log in as yourself, put in the password and you are locked in.
Once you clear the screen and you will see here there is nothing but the black terminal.
So when you want it to run and you wanted to find out what time is it or what data it is, you just
type date and it tell you Today is Tuesday, March 13th, the time and the seconds and Eastern Daylight
Saving time and the year.
So that's what the date command is used for.
It's very simple.
And sometimes the day command is used to combine with the script.
So a script will wake up and checks the date and it will run certain scripts.
We will cover that in our scripting session.
The next one is uptime.
Uptime simply tells you along been the system up for and how many users have been logged into the system
and the load average.
The next one.
It tells us about the host name.
Right here.
The host name.
Let's move this a little to the side.
First name.
We could go back to our console.
We could do the host name and you'll see this is the host name of our Linux machine.
And hostname is one of the important command that I would recommend you to run every time you log into
the system so you would know you are not logging in to the wrong system and you are not running a critical
commands on the wrong system.
You clear the screen.
The next one we have you name and you type, you name, it will tell you it's a Linux machine.
Again, the Linux machine you do need to run this command because sometimes in an environment you have
Linux, you have Solaris, you have many different Linux Unix flavors.
So it's good to run you name.
If you want to know more details about your name, you type your name minus A it will give you a lot
more detail than just Linux will give you the host name, the kernel version, the time it was built
and other architecture information.
The next command we need to learn is which which command tells you the location of your command that
you run.
Let's say you run the command pwt right and it tells you that the command is telling you which directory
you are in.
So where is that command located?
Of course, every command is a file itself and is located located somewhere to find out your type which
keyword and it tells you this command is located.
End user Ben, P.W. RD.
If you want to know more attributes about this command, you'll learn less minus L user Ben, P.W. RD.
And you will see right here, this is the script.
Actually, the command itself is a script.
The script itself is a text file that has been written by developers.
And it tells you right here it is owned by Root and the group is owned by a root.
And these are the permissions of this file.
Everybody has the right to execute it.
If I take this bit out, then I cannot run or nobody else can run this command.
So this is what which command does.
Let's clear this out.
If you wanted to know where is that command located?
The command is also located in his user Ben Date.
So as you can see, most of the commands are located in user Ben and you do LS minus L and you see a
whole bunch of commands.
If you want to view one page at a time, you could do more and you could see all these commands that
we have there, bunch of commands that Linux has.
But if I wanted to know how many total commands are in Linux, very simple.
You do LS minus L and if you remember, you pipe it, you do word count minus L.
This would gives me the total number of all these lines that coming up.
It's telling me there are 597 commands that are inside of this Linux machine.
Moving on.
What if I wanted to know the calendar?
If I just type Cal, if it will give me the calendar off this month and this year?
What if I wanted to know the month when I was born, let's say for.
For training.
I'll do.
Cal September 18, 1977.
So I'll type September nine nine.
Sorry, September, which is the month 1977.
And it will give me I could look at it as September 18 was Sunday.
So you could type any month followed by the calendar if you just wanted to know all the months in the
year 2016.
So you just have Cal 2016 and it'll give you all those months, starting with, of course, January,
ending with December.
That's what the command is used for.
Next command we have let's clear this week B.C..
B.C. stands for Binary Calculator.
If you want to do the calculation, of course you could go in here and bring the calculator, but you
don't want to bring the calculator going mode.
You are in terminal mode, so you want to use a calculator.
Then what do you do?
You type again, B.C. C hit enter.
Now if you want to do two plus two hit enter, we'll give you four.
What if 256 times 321.
That's the answer.
So this is just a basic calculator.
You could do division, multiplication, anything that you want.
If you want to quit out of it, just type quit and you will be out of it.
So these are a few system utility commands and you can run that.
These are fun commands.
Come up with the different options.
And of course, to look at the options, you could do man on every command and run with few options.