Unit 2 Using The System: Course Code LX13 Linux Basics
Unit 2 Using The System: Course Code LX13 Linux Basics
To log in
host1 login: tux1
Password: (the password does not appear)
Last Login: Fri Feb 26 17:35:14 on tty1
[tux1@host1 tux1]$
To log out
$ <ctrl-d>
or
$ exit
or
$ logout
Passwords
Creating or Changing
$ passwd
Changing password for tux1
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
$
Command Format
For example:
$ ls
$ ls -l
$ ls /dev
$ ls -l /dev
Command Format Examples
RIGHT WRONG
1. Separation
$ mail -f personal $ mail - f personal
$ who -u $ who-u
2. Order
$ mail -f personal $ mail personal -f
$ who -u $ -u who
3. Multiple options
$ who -m -u $ who -m-u
$ who -mu $ who -m u
The date and cal Commands
Looking at a month
$ cal 3 1999
March 1999
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Looking at a year
$ cal 1999
Who Is on the System
$ finger
Login Name Tty Idle Login Time
peter 2 Mar 5 11:04
root root *1 7 Mar 5 11:10
Finding Information about Users
$ clear
$ wc [-l][-w][-c] filename
-l counts the number of lines
-w counts the number of words
-c counts the number of bytes (characters)
$ wc .bash_profile
15 31 230 .bash_profile
Sending Mail
$ mail allet
Subject: Meeting
There will be a brief announcement meeting today.
<ctrl-d>
Cc: <enter>
$ mail team02@host1
Subject: Don't forget!
Don't forget this Linux course!!!
<ctrl-d>
Cc: <enter>
Receiving Mail
You have mail in /var/spool/mail/allet
$ mail
Mail version 8.1 6/6/93 Type ? for help
"/var/spool/mail/allet": 2 messages 1 new 2 unread
U 1 peter@host Thu Mar 4 16:10 35/1185 "Status"
>N 2 peter@host Fri Mar 5 11:34 13/350 "Meeting"
& 2
Message 2:
From peter Fri Mar 5 11:34:10 199
Date: Fri, 5 Mar 1999 11:34:09 +0100
To: allet@host
Subject: Meeting
$ wall
I'm back
<ctrl-d>
Talk with Another User
JOHN FRED
The mesg Command
$ mesg [y|n]
End of transmission or
end of line
<ctrl-d>
Temporarily stops output to
the screen
Resumes output
<ctrl-s>
<ctrl-q>
<ctrl-u>
Keyboard Tips (2)
Previous
<arrow up>
command
<arrow down>
<arrow left>
<arrow right>
One character
<shift page-up>to the left
<shift page-down>
One character to the right