In this
video lecture I am talking about Terminal and it prompt
In short,
if the screen shows a dollar sign ($) or hash
(#) on the left of the blinking cursor, you are in a
command-line environment.
$, #, % symbols indicate the user
account type you are logged in to.
- Dollar sign ($) means you are a normal
user.
- hash (#) means you are the system
administrator (root).
- In the C shell, the prompt
ends with a percentage sign (%).
- Tilde (~) sign means home
directory that is the default directory when you first logging in
There are
differences on prompts in different Unix or GNU/Linux distributions because of
their default settings.
For example, the prompt of Debian/Ubuntu is guest@linux:~$,
the one
of Fedora/CentOS/RedHat is [guest@linux ~]$ and the
one of SuSE Linux/OpenSUSE is guest@linux:~>.
In general, the prompt usually show the login
user name, machine hostname, and current working directory and ended with a
dollar ($), percentage (%), or hash (#) sign.
guest@linux:~$
- guest - username: the user
account you are logged in to.
- linux - machine hostname: the
machine you are operating.
- ~ - current working
directory: the directory you are in. Tilde (~) means home directory, i.e. the default
directory when first logging in.
Lets do some practical-
Terminal windows and text consoles
To launch a text console in , click on the Terminal
icon. You can find this by clicking on the dash iconin the top left corner of
your screen, and typing 'terminal' in the search box, like this:Clicking on the
Terminal icon will start a new terminal.
The another way to
open Terminal ,with shortcut is press Ctrl+Shift+T.
You will
see some text that looks like this in the graphical terminal window or the
plain text console :Kali@Kali:~$
The text
at the start of the line is called the “prompt” and its purpose is to prompt
you to enter some commands.
Note that the exact form of the prompt may
vary depending on the names of your account and the machine.
The
prompt can be changed but the default prompts on Linux have these components
:Kali The
currently logged in user
@Separator
KaliThe name of your computer
:Separator~The
directory your session is “in”, also known as the “current working directory”.
“~” is shell short hand for “your home directory”.
$Final separator –The Account type
Logging
out
Once we
are finished with a terminal or a terminal window we need to quit. We will
illustrate three ways to do this.
Close the
window In the
graphical environment the terminal window is just another window. At its top
right corner are the three buttons for minimising, maximising and closing. If
you click in the [×] button the window is closed and the session cleanly ended.
The exit
command In either
a terminal window or a text console you can issue the command “exit”; this will end the session. In the graphical
environment ending the session running in a window closes the window too. In a
text console the console is typically cleared and a fresh login prompt
presented.
[Ctrl]+[D]Recall that “[Ctrl]+[D]” means to
press down the [Ctrl] key at the same time as the [D] key. In practice we press
the [Ctrl] key down, press and release the [D] key, and then release the [Ctrl]
key.On a Unix system [Ctrl]+[D] means “end of input”. Here it signals to the
shell that we have no more input forit so it might as well quit. And quit it
does
No comments:
Post a Comment
If you have any doubt please let me know..