Before you type, read the prompt. It tells you who you are and where your line goes.
learnerusername@tidepoolhostname:~folder (Chapter 3)$account type
| Part | Meaning |
|---|---|
| Username | The account that you use |
| Hostname | The computer that gets your line |
$ | A normal account |
# | The administrator account, root. It can change everything, so type with care. |
You can also ask the computer.
New command
whoami
Read it as "who am I?". It writes the name of the account that you use.
Usagewhoami
Example
whoami
kai
On Kai's computer, as Kai.
New command
hostname
Writes the name of the computer that runs it.
Usagehostname
Example
hostname
lighthouse
On a computer called
lighthouse.This lab uses a different computer and a different account.
Objectives
- Print the username, using a command.
- Print the hostname, using a command.
- Is this a normal account or the administrator account?