Tab completion an up arrow key in this lesson you will learn how when we run the tab button on your
keyboard How can it completes your directory or your command that you're trying to run and how the up
arrow key works and how it returns last round command.
Hitting tab key completes available commands files or directories such as when you are running.
Change mine.
Maade this command has 0 at the end as well so if you just type c h m and hit tab it completes the command
for you.
The same way when you do ls space J and it tab it will list all the files that starts with J.
Then you have c d d s.
So if you do TDD as tab it will bring you any of the directories that matches the first three letters
uppercase d s.
So basically the tab makes the typing a lot easier.
And so you don't have to run the whole long commands again and again you could just simply tab.
If you know the comment and it auto completes it for you this is a very useful feature.
And then I'm telling you this is very useful once you're going to become a real expert in Linux.
You're going to be using this tab button almost every day and every time you logged into Linux machine
then we have another cool feature of Linux is hitting the up arrow key.
What that does is every time you hit up arrow key it will bring you the last ran command on your Linux
terminal.
Isn't that cool.
It is cool because you don't have to run the commands again and again and again.
So you just hit up arrow key and boom and hit enter and we're on that last comment.
So let's see how these CO-2 tab and up arrow key works in our Linux machine.
Let's clear the screen.
So the first command I want to show you is let's see if you have seen m Modi This is the command.
So what if I just take out c h o d and just right now I hit tab.
It completes that command for me.
What if I do see it and hit tab twice now it will give you all the commands.
You see that starts with C H.
Now you know there are many other different commands that start with C H and you can try different commands
to see as long as you know about the command so don't run any command that you really don't know or
you would I would recommend you run man command on that before you running it.
So another way we could check our tab is if you want to do list and I want to do J.
I want to list all the files.
Has Gerry and I will hit tab.
Go see it auto completes my Jerry.
Why did that.
Because most likely I only have J files starting with just one file which is this is the one J.
Let's say there are two files that start with three files actually that starts with L Lex lease and
loss.
And let's see what happens when I do this and do l and hit tab twice.
It gave me all three files start with L.
Isn't that cool you don't have to actually go into the directory.
You do as well.
Look for your file.
As long as you remember the first letter and you hit tab it will give you everything that starts with
it.
Same way we'll do ls minus L and let's see if we want to do Deathstar I want it to CD in style.
Let's say there is this folder we have in our home directory desktop right.
We could do cd deaths.
The desktop type the whole thing get and turn and go in.
Let's go one step back again or we could just do a CD desk and hit tab and it auto completes it for
you and you hit enter.
Isn't that cool.
It'll save you a lot of time.
I love this.
This feature of latex and I'm sure you're going to love it too.
Now the second one what I was talking about is the up arrow key.
So if you hit up key right now on your desktop you'll see it will return the last command that we ran
if you hit it again it will keep bringing all the commands that we ran in a sequential order.
See so far we have ran so many commands and everything.
So now if you type the lower case the down key it will bring you back to all the commands that you last
ran to.
Now we didn't run any command after CD desktop.
If wanna go back again.
Up Arrow key desktop.
So now let's say I want to do this Semmelweis to do.
Let's say what is this and what is PWT and clear.
And one more command we will run let's say day to day it is another command that will Khowar later on.
And you run it it will give you the date of your system.
So now you run a few commands four or five commands.
Now instead of typing all those commands you can run up arrow key one time two times three times four
times five times.
And it is bringing all the commands you ran.
So guys this is what this is all about the up arrow key and tab key.
I'm telling you this is going to make things so much easier once you're going to become expert at the
end of this course.
All right.
I hope you're really like this one and I really want you to practice this tab an up arrow key again
and again again so you will know how these bold features work.