Instructor: Hello everyone.
Before we get on to module three
there's something important I wanted to talk about,
and that is command prompts
and how we could get a command prompt back if it gets stuck.
So what is a command prompt?
Command prompt, also referred to simply as a prompt
is a short text at the start of the command line
followed by a prompt symbol on a command line interface.
So if you have your Linux machine
and you have your GUI and you open up your terminal,
it will look like this.
And if you notice in this terminal window,
you have this root@MyFirstLinuxVM
and then close brackets and hash sign.
So the first part of this entire command prompt
is the username root.
The second part is the host name
and the third part is the prompt symbol.
Now, depending on which system
you are logged in as in Linux, most of the Linux systems
will show up the command prompt like this.
But maybe there are certain Linux systems
that are configured differently
where you will not see username or host name
or a different prompt symbol.
But by default when you install Linux,
this is how the prompt will look like.
When you see the symbol, the prompt symbol,
you see the hashtag.
Hashtag means that you are logged in as root.
If you're logged in anyone else but route,
then you will see a dollar symbol.
Again, this can be reconfigured
or you could change the symbol as well,
which can be done at your profile level.
Anyway, so you have the prompt,
now, if you get stuck at certain commands
and you don't get your prompt back,
you could simply type Control + C
on your terminal to get your prompt back.
Now, let me quickly go into my Linux machine
and I will show you how the prompt looks like.
So this is the prompt.
If you are logged into your Linux console, you installed it,
you logged in, you right click on your desktop,
it will open up the terminal.
Again, this part here looks like it's a username
and this is the host name.
You could also get the username by typing whoami,
it will show you you are logged in as root.
You could type hostname
and it will show you the name of your machine.
Again, this is something that I will definitely cover
in the later lectures,
but I'm just showing how the prompt looks like.
And since I am root, I have a default prompt of hashtag.
Now, getting the prompt back,
meaning every time you need to run the command,
you have to have this prompt back.
So if you do not have that prompt back
you cannot run a command.
So if you're stuck at certain point,
let's say if you are trying to run a command,
a command, let's say cat,
again, something we'll cover later.
If you're doing cat and you just accidentally hit Enter,
you see, your command is stuck.
Now, anything you type here is not gonna work
so you have to get that prompt back.
To get that prompt back, you have to type Control + C,
just like that.
If you're running another command, let's say top
and it is giving you some information
on the screen at real time,
if you wanted to get out of this and get your prompt back,
type Control + C again.
Just like that.
If you wanted to use another command,
let's say ls - l, to let's say pipe it,
and you see it's giving you this redirect sign thing,
it means it's also stuck.
That means your command was not fully executed.
So in order to get your prompt back again, type Control + C.
So this lecture is all about command prompts.
If you are stuck anywhere
and you do not have your prompt back,
type Control + C to get your prompt back.