01
2021-12-17
jrmu
================================================================================
03
2021-12-17
jrmu
Shell Prompt
05
2021-12-17
jrmu
When you first login, you should see something like below:
07
2021-12-17
jrmu
username$
09
2021-12-17
jrmu
This is a shell prompt that will accept your input. We are using the Korn
10
2021-12-17
jrmu
Shell (ksh). This shell is how we interact with the computer. This environment
11
2021-12-17
jrmu
is often called the "command line" because you type commands to the computer and
12
2021-12-17
jrmu
it responds to you. We don't use mice or touchscreens much. Once you get used
13
2021-12-17
jrmu
to it, you will come to like it.
15
2021-12-17
jrmu
If you see a # dollar sign instead, it means you are logged in as the superuser
16
2021-12-17
jrmu
(root). If you are root, you have system administrator powers. The superuser
17
2021-12-17
jrmu
has total control over the computer, whereas a normal user has limited powers.
18
2021-12-17
jrmu
In UNIX, every command must be run by a user. The $ sign you see at the
19
2021-12-17
jrmu
beginning of the shell prompt means you are running as normal user.
21
2021-12-17
jrmu
Note that all of our commands begin with either a $ dollar sign or # pound
24
2021-12-17
jrmu
$ less .shell
25
2021-12-17
jrmu
# whoami
27
2021-12-17
jrmu
We don't actually type the $ dollar sign or # pound symbol. The $ dollar sign
28
2021-12-17
jrmu
means to run the command as a normal user, and the # pound symbol means to
29
2021-12-17
jrmu
run the command as superuser (root).
31
2021-12-17
jrmu
If you type commands that don't exist:
33
2021-12-17
jrmu
username$ ircnow of the users by the users for the users
34
2021-12-17
jrmu
ksh: ircnow: not found
36
2021-12-17
jrmu
The shell ksh (korn shell) will tell you the command is not found.
38
2021-12-17
jrmu
================================================================================
40
2021-12-17
jrmu
Practice Some Commands
42
2021-12-17
jrmu
Press q to quit, then
44
2021-12-17
jrmu
$ less .shell
46
2021-12-17
jrmu
to return to this tutorial.
48
2021-12-17
jrmu
To find out what user you are running as, type $ whoami
50
2021-12-17
jrmu
To view the current date, type $ date
52
2021-12-17
jrmu
To view a calendar, type $ cal
54
2021-12-17
jrmu
To see how much space we have on our disk, type $ df
56
2021-12-17
jrmu
Cool Tip: If you press the up arrow key, you can scroll through your previous
57
2021-12-17
jrmu
commands. Press on the down arrow key to scroll through more recent commands.
58
2021-12-17
jrmu
You can also use the left and right arrow key to edit your previous commands.
59
2021-12-17
jrmu
To view all your old commands, type $ history
61
2021-12-17
jrmu
To move on to the next level, open the file .unix102.txt (note the period in
64
2021-12-17
jrmu
$ less .unix102.txt
66
2021-12-17
jrmu
================================================================================