[Intro music]
Wow, what achievement.
You have spent so much time on this course and
now finally you have finished it and now it's time
to do a recap and we will go over commands
that we actually have learned in this course.
Do you know how many commands so
far we have learned in this course?
Take a guess.
Well, approximately we have learned
about 146 to 150 commands.
So to be specific, because I will be adding
a few commands later or I have added a
few commands now that are not part of it,
but anyway, approximately we have learned 150 commands.
That is awesome, guys.
You should pat yourself on the back
that you have done an amazing job.
So I'm going to cover in this lesson or in
this recap all the commands that we have covered.
So let's go over my spreadsheet that I have
it open and at the same time I have
a window terminal open to my Linux machine.
So go over one by one.
So the first command I have right here, every
command you'll see, they are all alphabetically sorted.
So they are starting from A all the way to Z.
So we'll go one by one.
So the first command that we have here is alias.
What does an alias do?
alias creates a shortcut or a
short name for a long command.
If you just type simply alias and you will see
all the aliases that have already been created for you.
To remove an alias, you could just do unalias.
Then we have arch.
arch is the command that tells you the system
architecture, whether it's 64 bit or 32 bit.
at command is used to schedule ad hoc jobs,
meaning there is a command called Cron tab.
If you wanted to schedule a job repetitively, or
if you want to schedule a job just one
time, you will just type at command and the
complete syntax can be found by running man at
and you'll find all the options with that.
Then we have awk. awk command shows the
output of a file by field.
So if you do ls -ltr on your home directory
and let's say you want to list only the first column.
So then you do ls -ltr, you awk
it, and you print it with dollar one, and you
hit enter, and you'll get only the first column.
Moving on. Then we have bash.
bash is just a shell, it just
tells you what shell you are running.
So if you do echo and do
$SHELL, you'll see our shell is bash.
Then we have bc.
bc stands for Calculator.
If you want to do some computation, some calculations,
we just type bc and you get into Calculator
mode and just simply type your calculations like two
plus two and it will give you the four.
And of course to get out of it you can
just do control C to get out of it.
Then we have cal. cal is for calendar. case is
a script that provides the options that is used
in a script and it gives you the option.
Like if you want to press A or
B or C gives you those option.
cat is to read a file.
Then we have cd is to change the directory.
Some of these commands that you already know by heart.
So I'm not going to go into detail.
chage, this command is used if you wanted
to change the properties of a password
and the password should expire or not.
We have learned that and I believe in module three.
Then chgrp,
to change the ownership of a file
on a directory, a group ownership sorry.
chmod is to change file permission.
chown is to change file ownership.
Meaning if you are doing ls -l, you'll see this is,
to change the first column you need to use chmod.
To change this, you need to use chgrp, and
to change this ownership you need to use chown.
Then we have the next one is chronyc which is a
newer program that is used for NTP system or NTP service.
clear is used to clear your screen.
So you can simply type clear,
it'll clear up the screen.
cmp is to compare files byte by byte. command
then --help is if you want to get a
quick help on any command that you want.
Then cp is to copy files and directories.
Very simple command. createrepo,
this is a command that we
learn, I believe in module eight.
When we actually, module seven I believe sorry,
and when we wanted to create a
local repository to download the packages.
Then we have crontab.
This is to schedule the jobs, whether you want
to schedule one time job or regular job.
cut is to cut the characters or fields in an output. So if
you have ls -ltr or cat or whatever you're doing.
So if you want to cut the first character,
so you will do cut -c1.
This will give you all the ds in every line.
So you hit enter and you'll see it'll give
you all the d. So this is cut, of course you have practiced that.
Then we have date.
It gives you the time and date.
dd converts or copy of file.
Just like copy but it is mostly used to do the backups.
Then we have df, file system disk space usage.
When you do df -h, you'll get
the space utilization of the entire file system.
Next one number 27 command diff.
Compare files line by line.
dig is the DNS lookup utility.
Remember we did that in lesson in module seven where
if you wanted to find out the IP address of
a hostname, we use dig or nslookup.
Same thing at DNS Utility.
dmesg, it's a print kernel ring buffer.
Or if you wanted to see system messages, any
hardware related messages, you just simply type dmesg.
But of course to run dmesg you have to be root.
So just be careful because if you run
dmesg right here okay, so sorry,
you don't have to be root. You could just run.
There is another command that is dmidecode,
which is the next command. For this command,
yes, you do have to run,
you do have to be root.
Let's see, right here says, Permission
denied. You have to be root.
This one tells you about the
system information, the hardware information.
What is the CPU memory you have in your system?
Moving on. do is the command that is used
in a scripting language with conjunction,
the for loop or while loop scripting.
Then du is used for file space usage.
If you wanted to check a usage of a specific file.
Let's say I have this file in my home directory.
Let's say pictures. If I wanted to know the space
I do du -sh Pictures/ and
it tells me it is zero byte.
So just like that you could pick any of the
files, run du -sh followed by the file name
or directory name to get the specific size information.
echo is just a display input on the screen.
It's nothing but whatever that
you type like echo Imran.
So it's bringing back Imran.
So it's just like as if you were standing
in the middle of all the mountains that you
echo your voice and your voice comes back. It's just like that.
This is kind of tool or command
that is mostly used in scripting.
And as you know, scripting we
have covered in module six.
Then we have else, else is also a scripting command,
works in conjunction with for loop.
It is used to create a script.
Then ethtool tells you
the information about the NIC.
If it is speed, it's other properties of that NIC.
Then we have exit. exit is just to simply exit your terminal.
fdisk is to display disk information.
And of course you need to be root to run this command.
fdisk -l, and it says Permission denied.
So be root. So let's see, we become root.
[No audio]
And now if you type fdisk -l, you'll see
all the disks that we have available in the system.
We covered in module eight.
And then fg bring a process in
the foreground. fi is again used in a scripting
language with conjunction with if. find is to find
files and directories, then firewall-cmd command.
This is the command to
enable firewall or configure firewall.
It's a command line.
If you want to use the GUI, then you will run firewalld,
actually config which brings up the GUI.
Oh, sorry, there's no d here.
It's just firewall-config.
So when you run that, it brings
up a GUI to configure firewall.
So quit out of it.
Then we have for.
Again, for is used in the scripting language. free,
it tells you how much memory you have used, available.
ftp to transfer files from one system to another.
grep we learned that as well.
I believe in module three to grep a specific keyword
from a file or a directory or a directory structure.
There is another command called egrep, which
is an enhanced version of grep.
So if you want to learn that as well,
do man on egrep you'll find that out.
groupadd is to create a new
group, users new group. Then groupdel,
as you could say it's a delete a group.
Then we have, we covered the system administration module.
gunzip is to compress a file,
gzip is to compress a file.
All choose the same way, different, different tools.
halt, if you want to shut down the
system immediately without waiting on the process.
head if you wanted to get a few top lines of a file.
So if you don't specify an option with the head, then
it will give you the first ten lines by default.
history commands tells you how many commands
have been ran in your terminal.
hostname tells you the hostname of the system.
hostnamectl is the utility or command
you use to manage the hostname.
If you want to change the hostname, you could use hostnamectl.
This is a newer command or newer utility
introduced in Redhat 7 or CentOS 7.
id is just print user information. if,
it's scripting command works conjunction with fi.
ifconfig tells you your network information.
If you run ifconfig, you ran that many times
and you should know this command by heart.
ifdown, if you want to bring down the network, the
NIC. Let's say if you want to bring this down, you
run ifdown followed by this NIC name. Right now,
if you see it's up right here and running.
ifup, again opposite of down. init is
if you want to bring the system
in different levels, we talked about different
levels from level zero through level six.
So there are total seven levels. What are those?
I believe you know that.
If you forget any of these, please
go back and review those modules.
iostat is about input output status.
What is being coming into the
system, what is leaving the system.
Then we have ip.
It's a newer command which will be replacing the
ifconfig command, does the same thing as ifconfig.
iptables is an older command
which a few systems still has it.
This command has been replaced by the
new command firewall-cmd or firewall-config.
kill is to kill a process by process.
ID. last shows the listing of last logged in users.
less is the opposite of more.
And you guys know what more is, right?
If you wanted to read a file one page at
a time on the screen, then you use more.
And if you want to do the
opposite of it, then you do less.
ln, tell me what ln is.
Well, it's to create a link. It's that simple.
locate if it works the same way as if
you are trying to find a file, the only
difference between file and locate is locate,
if you're creating a file right now and run
locate to find that file, it won't work because
there's another utility, updatedb command that runs every
day which will tell the system hey, this system,
there's a newer file that's been created.
So if you want to use locate
command right away, run updatedb command.
ls, you don't tell me you don't know this command.
Okay. lvcreate is to create a logical volume.
It's covered in module 8. lvdisplay is to display
the logical volume. mail and to sendmail,
if you want to send mail from one system
to another or from outside of the system. man,
we use man commands many times.
Very helpful command. Creating a directory, you know that
and then keep moving on to number 76.
Make file system if you want to create an xfl
file system, if you're adding a new disk to the
system, then you will create a file system.
This is covered in module eight.
mkswap. Swap as something that is taken
out from your hard disk.
And once you dedicate some space from your
hard disk for your swap, then you will
run the command mkswap. Again
it's part of module eight. modprobe,
program to add and remove modules.
We covered this command if you forgot about it.
We covered this when we are doing our NIC bonding.
And NIC bonding is a lesson that
is covered in module in module seven. Yes.
more we just talked about more.
mount is used if you want to mount
a file system, we used this command in module eight.
mv is to move files around
from one system to another.
We covered that in the earlier modules.
mv is also used to rename a file, right? Yes.
netstat is telling you about the network statistics.
You could use many different options
and a lot of system administer
use netstat to troubleshoot many issues.
See, it tells you what's coming in, what's
leaving, about only the network status related things.
I usually run this command as netstat -rnv to check the
system gateway, the IP address and stuff like that too.
nice, nice is to prioritize the process.
I think it's a part of the system administration.
I believe module five. Check
if it's not module five, then
probably module five, I think. Yes.
If you want to run a process and you want
to prioritize with different levels, you can run nice.
nohup is the command to
avoid interruption upon terminal exit.
What does it mean by that? If I'm running
a command right now and I close this
window, it will also close my program,
so you run nohup with it.
We cover that, of course, and
it's look up just like dig.
Then we have ntpq.
It's an NTP utility.
Just like Chronyc.
It tells you which system what NTP
clock that we are syncing to.
So if you run ntpq, it brings you
to ntpq mode and then you run peers.
[No audio]
Oh, it says connection refused. I know why?
Because remember we stopped NTP and we
ran the chronyd, so that's why we cannot get the connection.
Anyway, if you're on the older system, you
will see the ntpq utility there,
if not, then run chronyc.
Then we have pwd to change the password,
very beginning lessons, ping beginning lessons or lesson
7th module. pipe if you want to,
pipe is mostly used to change the output of a command.
So if you do ls -l, and you want
to view the second column that you pipe it to
another command, which is let's say awk and print
let's say second column.
It'll give you second column. Yes.
Okay, so it'll give you the second column.
Actually I wanted to get the third column,
then it'll give you the third column.
Anyway, the pipe actually translates
or changes the output.
So it actually deals not with the
command, it deals with the output.
Okay, moving on.
pkill, kills the process by process name.
If you have a process running xyz,
you could just type pkill xyz.
It will kill the process.
You don't need to know the process.
ID. ps command, very powerful command,
and when it comes to system administration, when you
run ps with different options, let's say -ef
and then we do more, because it's going to
throw so much processes on the screen.
This one tells you all the processes
that are running in our system.
pvcreate, lvm commands is to create a
physical volume displays to display the physical volume.
pvs works pretty much the same.
pwd is print working directory.
That is something you don't know, right?
Come on, don't tell me you don't know. You do know.
Okay, read is again command used in conjunction
with the scripting language which reads and waits
for the input from a user.
We covered that in module six.
reboot as you could see,
reboot as name says reboots the system,
rm removes the files and directory.
rmdir, it just removes the directory.
Now, why do we have rmdir?
Why can't we just use rm space
-r to remove a directory?
Well, seriously, I don't know.
Well, they want to have a separate
dedicated command to remove a directory.
Well, that's fine. Moving on.
rpm is about package management.
We use the command to install a package in our system.
rsync, rsync is something to synchronize your packages
or your system from one server to another.
scp is again doing the same thing.
Copy file from one system to another.
script, script is something, if you are running script
and then you want to record all your commands
that you're going to run, then you type script.
sestatus is about SELINUX status.
If you type sestatus, you will see SELinux is enabled.
We've talked about SELinux as well of course. sh
is the shell, just like bash or KornShell. shutdown,
you know that. sort one of the beginning commands to sort your
output in alphabetical order or reverse order. sosreport, that
is part of system administration module five, that is something
that was added late after the entire course. So if
you have not covered this lesson please go back module
five, cover this lesson as well. split, splitting files into different
files by size or lines. ssh is just a protocol
that is used to connect from one machine to another.
stat is a command that will tell you the attributes
or properties of our directories, mostly used for SELinux. If
you want to switch user from one user to another what do you do?
You do su space dash. If you do not specify a
user, then it will change it to root, yes.
sudo, sudo allows you to run command as root. swapon,
swapoff, once you create a swap it works
the same way as we have mkswap
remember, but once you make a swap then you do swapon
and swapoff to enable or disable. systemctl is a
newer command to enable start or stop the services. If you
wanted to start let's say Apache service, remember we covered that
in module seven. If you want to stop the service you
do systemctl stop follow by the name of the service.
In older version you would do system service the name of
the service and stop or start or restart. tail gives you
the last few lines of an output. Usually by default gives
ten. tar is to put everything all the files into one
container so that becomes a tar file. tcpdump show every
in and out traffic of a system. So if you do ifconfig,
and do tcpdump -i is for interface and
then enp0s3, and hit enter, you're going to see every
package that is leaving your system and every transaction that's coming
into the system. It's going to throw so many messages on
my screen, so I'm not going to run it. Moving on,
telenet it works just like SSH but it is not secured
just like SSH. So a lot of companies don't use telnet
anymore. then is the command that used in conjunction with the
for a while loop in a scripting. top is one of
the favorite commands of system administrators to check system resources. touch
is to create a new empty file. unmount or umount
is to unmount a file system, it is the opposite of
mount. uname tells you about your system and when you run
uname, it tells you that it's a Linux, but when
you type uname -a which is for all, then it
will give you all the information about your system like Kernel,
version, or when it was created, and so on. uniq removes
all the duplicates from an output. One of the initial lessons
that we covered. uptime shows system uptime and load information.
useradd, you create a new user. userdel, is to delete a user right.
usermod, it says it's just modify user properties or attributes.
When you run just users, it will actually print
all the usernames of user currently logged in.
vgcreate or vgdisplay,
both commands are for LVMs, it is to create
a new group and a new volume,
and to display the volume group. vi, you really
need to know that is a vi editor.
When you run vi followed by the file name, it will create
a new file and we'll put you into an editing mode. w,
show who is logged on and what they are doing.
So when you do clear and do just w,
you'll see, it tells you there are two users
logged in with the terminal and how much CPU
they're using and what time they're logged in,
and what they are doing. wget is the network, sorry,
wall, wall is to send a message to everyone's terminal.
So if you want to send hi or if you
want to send hey, I'm bringing down the system, you
type wall, hit Enter and then you send a message.
And then you do control d which will broadcast
message to everyone who is logged into the system.
wc, count word, characters, lines, and so on.
wget, network downloader program. So if you have a
complete URL, you can just do wget followed by
the URL and it will download that package.
whatis, is the short description of a command.
If you want to know something about command without
going through the man pages, then you just type
whatis followed by the command name. which will
show the full path of a shell command.
So, let's say if you were doing which wall so
it tells you that this wall command is located in
/bin/wall. while again subscripting command works in conjunction with do loop, while-do.
who, shows who is logged on just like w.
But the difference between w and who is that
who does not show all that information after login
idle CPU, PCPU, and WHAT. whoami,
remember that command?
You better, right?
It's whoami tells you your username. write is to send a message
to a specific user. xfs_growfs that is
also used when we were creating or extending file system.
So it's in module seven, last command right here,
but of course not the least,
that's how everybody says this, right.
yum, yum is to download and
install packages in your system.
So here is the summary of everything we have learned.
And if you remember every single command that we
just covered and of course covered an entire
training course, then you did an amazing job.
You know everything inside out and again, good luck.
[No audio]