Next: Files
Up: Commands
Previous: Commands
Contents
- Let us begin with a simple command: we want the computer to tell us today's date. Here is how to do it:
$date then the output is
Monday 02/06/0601:11:10 AM
Note also that you didn't type "$"; that is the prompt that the computer types. It does this when it is listening for your next command. (Prompts can be different from "$".)
- $whoami then the output is
ozdogan
whoami displays the login name of the current user, who (for the purpose of these lessons) is "ozdogan". Try this now. The computer should respond with your login name.
- $echo This is a test then the output is
This is a test
textbfecho does just that: it tells the computer to retype the string "This is a test". Here is another use of echo:
$echo $SHELL then the output is
/bin/bash
Cem Ozdogan
2009-05-11