February 5th, 2002, 01:50 AM
This tutorial was originally posted by Terr.... Just thought I would clear up any misconception
What is Telnet, Anyway?
The term "TELNET" refers to the remote login that's possible on the Internet because of the TELNET Protocol. Telnet allows you to remotely access a computer over the Internet. In other words, you can tell that computer to create, edit, execute and delete files just as if you were sitting at that computer.
The use of this term as a verb, as in "Telnet to a host" means to establish a connection across the Internet from one host to another. Usually, you must have an account on the remote host to be able to login to it once you've made a connection. However, some hosts provide public services that do not require a personal account.
Telnet Fundamentals (Terminal Emulation)
A long time ago, computers were behemoths that occupied entire rooms. In order for more than one person to use the computer, "terminals" were connected to the computer. At first these terminals were teletypes - just fancy typewriters called TTYs. The computers could tell these TTYs to print characters, do line feeds and carriage returns, and read input from the person typing at them. Then CRT (video) terminals were introduced, and ways of handling characters displayed on a screen had to be developed. These early terminals included the DEC family of VTs (Video Terminals) like the VT-52 and the VT-100. They were pretty fancy. They allowed users to do "full screen editing" by moving a cursor around the screen and deleting characters at will. They also allowed the computers to print special characters like lines and dashes, display bold text, or clear the screen entirely.
Nowadays we don't live in caves and hunt mammoth, but we still use this emulation for remote login sessions like Telnet. The emulation of old terminal types, like TTY or VT-100, are good ways of controlling a computer through another computer because they were character based and were designed to transmit and receive data quickly and efficiently.
Connecting to Sites with Telnet
How do I Telnet with a Mac?
For Telnet on the Macintosh I recommend you visit the following site for a thorough tutorial and to obtain the program: NCSA Telnet for the Macintosh.
How do I Telnet with a PC? Pc Tutorial
For Telnet on a PC you can read our brief PC Telnet tutorial.
Useful UNIX Commands
Basic UNIX Commands
Some of the more useful UNIX commands
Basic UNIX Commands
List Contents of Directories - and [options]
ls lists files in current directory
ls -l provides long listing of current directory
ls -l /usr/jane provides long listing of directory /usr/jane
ls -a list all entries (including ones starting with a decimal)
ls -i print inode numbers
ls -t sort by modification time
ls -x multi-column list, sorted across each row
What would you like to do?
ACTION Command Examples
append to file cat >> cat >> file
change access chgrp chgrp GroupName FileOrDirectory
combine 2 files cat cat File1 File2 > File3
copy files cp cp MyFile CopyOfMyFile
create a file cat cat > NewFile
edit files ed ed File
list files ls ls usr/mac
move a file mv mv MyFile docs/html/mine
remove a file rm rm UnWantedFile
rename a file mv mv OldFilename NewFilename
view files cat cat plan.dec
view files page page plan.dec
edit password passwd passwd
change to dir cd cd /usr/tmp
make dir mkdir mkdir /usr/paul/budget
where am i pwd pwd
go to homedir cd cd
remove dir rmdir rmdir junk
Redirection of Output or Input
> redirects the output of a command to a file
>> redirects the output of a command to the end of an existing file
< takes the input of a command from a file, not the terminal
chmod --- Change Access Modes
chmod [mode] files
modes can be numeric or symbolic
The symbolic case consists of the form of [agou][+-=][rwx] where: a group, other and user access permissions(all)
g group access permissions
o other access permissions
u user access permissions
r read permission
w write permission
x execute permission
Example: add write permission for user and group to a file: chmod ug+w files
For numeric case consult above sites for more details.
X-- owner's permission
-X- group's permission
--X other's permission
where X is the octal sum of 04 (read), 02 (write), 01 (execute) for user, group and other.
Numeric Example: chmod 640 FileOrFolderName
changes permissions so user has read, write permission (4+2+0=6), group has read permission(4+0+0), and other has no permissions. This makes 640.