Theory
Getting your bearings
Beyond moving files around, you constantly need small facts about the system: Who am I logged in as? Who else is on this server? What is the date? And crucially, how do I find out how a command works?
A set of short 'system' commands answers these. Most are trivial to use, but one, man, is arguably the single most valuable command in this whole course, because it lets you help yourself with every other command. This lesson covers the family, with man as the star.
At a glance
| Command | What it does |
|---|---|
| whoami | Print your own username |
| who | List the users currently logged in |
| date | Show the current date and time |
| echo text | Print text (or a variable's value) to the screen |
| clear | Clear the terminal screen |
| man cmd | Show the manual page for a command (built-in help) |
Practical
Orienting yourself
$ whoami
riya
$ date
Sun Jul 12 09:15:04 IST 2026
$ echo "Hello from the lab"
Hello from the lab
$ echo $HOME # echo can print a variable's value
/home/riya
$ man ls # open the manual for ls; press q to quitFormula
man is your lifeline
You do not have to memorise every option of every command. When you are unsure, run `man <command>`, for example man chmod, and Linux shows its manual page: what the command does, every option, and how to use it. Press q to quit the manual, and use the arrow keys or space to scroll.
Getting comfortable reading man pages is a skill that will serve you for your entire career. Whenever this course introduces a command, try man on it to see the full story. Self-sufficiency starts here.
Quiz
You have forgotten which option of the sort command sorts numerically. What is the best way to find out on the server itself?
- whoami, to check your permissions first
- man sort, which shows sort's manual page with all its options
- clear, to get a clean screen and guess
- echo sort, to print how it works
Show the answer
man sort, which shows sort's manual page with all its options
man sort opens the manual page for sort, listing what it does and every option (including the one for numeric sorting), the built-in, always-available way to answer 'how does this command work?'. Option A, whoami, only prints your username; it tells you nothing about sort's options. Option C, clear, just wipes the screen; guessing is not a method. Option D, echo sort, simply prints the word 'sort'; echo displays text, it does not explain commands. Whenever you are unsure how a command works, reach for man; it makes you self-sufficient and is available right there on the server.
Think first
Why does such a simple command as echo matter so much later?
echo just prints text. Why is it worth learning properly, given how trivial it looks? Then tap.
Show the answer
Because echo is how you SEE VALUES, and that becomes essential the moment you start scripting. Right now echo "hello" just prints hello, which looks trivial. But echo can also print the value of a VARIABLE: echo $HOME prints /home/riya, and echo $SHELL prints your shell. When you write shell scripts (coming in Unit 3), variables hold your data, filenames, counts, user input, and echo is your main way to display and check them, both as output for the user and as a debugging tool to see 'what is actually in this variable right now?'. Countless scripts use echo to report progress ('Backing up files...'), to show results, and to inspect values while you hunt a bug. So the humble echo you learn today as 'print some text' is really the foundation of communicating from a script and of debugging one. Learn it well now; you will use it in almost every script you ever write. Small command, large role.
Summary
Key takeaways
- whoami prints your username; who lists everyone currently logged in to the server.
- date shows the current date and time; clear wipes the terminal screen.
- echo prints text, and importantly the value of a variable (echo $HOME), which matters for scripting.
- man <command> shows a command's manual page: what it does, its options, and usage; press q to quit.
- man is the key survival skill: you look up commands rather than memorising every option.
- Try man on each new command this course introduces to see its full behaviour.
- Memory hook: whoami/who who's here, date the time, echo print, man the manual, clear the screen.