[No audio]
Terminal Control keys. Several key combinations on your
keyboard, usually have a special effect on the
terminal regardless of you are logged in with
a PuTTY session or you're logged in through a
terminal through within your console. These control,
which is control ctrl, is the key on your
keyboard, are accomplished by holding the ctrl key, while
typing the second key. So if you're doing ctrl,
hold on to it, and then type the second key. For example,
ctrl c means to hold the ctrl key while you type
the letter c .The most common ctrl keys are listed below
that are used in Linux. The first one is ctrl-u,
which erases everything you have typed on a command line. ctrl-c,
stops or kills a command, ctrl-z suspends a command, ctrl-d
exit from an interactive program. We'll try each of these
keys one by one.
[No audio]
Okay. We are root, because we have pound, we'll exit out of it.
Clear it, cd, go back to our home,
clear it again. The ctrl key, let's say if
you are typing ps -ef,
grep, awk,
sorry, awk, print, dollar one, and you're typing a
a long command basically, and you realize oh,
this is not the command you have to type.
So you could hit back key and it will erase everything
one character at a time, of course it's going to take
a little longer or you could just simply type ctrl and
hit u. It will erase everything you have typed. So that's
what ctrl-u is used for. Second one is, if you
are in an interactive program, let's say you're running top, and
now you see you don't have your prompt back. To get
your prompt back you could type ctrl-c. So ctrl-c is
one of the keys that you're going to be using a
lot more than other terminal ctrl keys because every time you
find yourself stuck, and you cannot get out, and you're not
getting your prompt back, type ctrl-c to get out. Then
you have ctrl-z.
ctrl-z is if you are running a process and
you're stuck in that process, ctrl-z will kill that
process, and it will get you out of it. Then
the last one we have, ctrl-d. ctrl-d, once again, it
does exit you out from an interactive program as well
which is running, let's say if you are running bc,
which is a binary calculator, you're doing two plus
ten, hit enter, you got to do quit to
get out of it, or you could just simply
do ctrl-d. Many of these interactive programs have
their different ways to get out, sometimes quit work,
sometimes simply key works, but ctrl-d is the
one regardless of which interactive program you are in,
that ctrl-d will get you out. These are the
few ctrl keys that you should remember in Linux environment,
they will help you if you are stuck in anywhere.
[No audio]