0% found this document useful (0 votes)
47 views2 pages

Unix/Linux Tutorial: $ Chmod 700 Phigbee

This document provides an overview of basic UNIX/Linux commands such as cat, cd, chmod, cp, lpr, ls, mkdir, more, mv, rm, rmdir, pwd, logout, kill, passwd, ps, who, and who am i. It also discusses tools for editing files like pico and pine as well as referencing manual pages and info pages for learning about commands. The document recommends the book "A Practical Guide to the Linux System" by Mark G. Sobell for learning more about Linux and provides contact information for the author.

Uploaded by

Can Fidan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views2 pages

Unix/Linux Tutorial: $ Chmod 700 Phigbee

This document provides an overview of basic UNIX/Linux commands such as cat, cd, chmod, cp, lpr, ls, mkdir, more, mv, rm, rmdir, pwd, logout, kill, passwd, ps, who, and who am i. It also discusses tools for editing files like pico and pine as well as referencing manual pages and info pages for learning about commands. The document recommends the book "A Practical Guide to the Linux System" by Mark G. Sobell for learning more about Linux and provides contact information for the author.

Uploaded by

Can Fidan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIX/LINUX TUTORIAL

 
Here is a minimal set of commands for the UNIX/LINUX systems:

  cat Display or join files


cd Change to another working directory
chmod Set access mode for a file or directory, for example
$ chmod 700 phigbee
The above command will allow me to read, write, and execute files
in my directory. Note that I am in the directory immediately
above the “phigbee” directory when I do this. Students should set
the access mode on their home directory in the same way.
cp Copy a file from one directory to another or make a copy of a file in the
same directory using a different name.

cp source-file_name destination-directory
cp current_file_name new_file_name

lpr Print files, or example


lpr filename
   or
lpr -Pprintername filename

Where filename is the name of the file you want to print. The
first version sends the file to the default printer. The second
version sends the file to the printer you name immediately
following the -P (no spaces in between). The assistants in our
labs can give you the names of printers in the lab or tell you
which one is the default printer.
ls    Display Information About Files
mkdir    Make a Directory
more Dislay a file one screenfull at a time
mv    Move (rename) a file
rm    Remove a file
rmdir Remove a directory
pwd    Show pathname of working directory
logout    Exit Linux (if this doesn't work, try lo, exit, or bye .
kill   Terminate a Process
passwd    Assign or change a password
ps   Display process status
who Display names of users
who am i   Display login information about you
For editing a file, reading mail, and sending mail you can use:

pico -- to create and edit a file


pine -- to mail a file or read your mail
Both pico and pine have online help that can easily teach you everything you
need to know to use the editor and email. You will learn a lot faster using the
help facility as a convenient tutor than you will using trial and error.

Editing the Unix/Linux Command Line

When you are typing a command beside the $ prompt, you can use the
backspace key to move backwards over the line, erasing characters so you can
make a correction.

If you want to erase the entire line, you can use ^u, then start over again. ^
stands for “control” and you hold down the control key labeled Ctrl while you
press the ‘u’ key.

If you happen to press the escape key when you are using the Korn Shell, you
will be put in a more powerful editing mode which works in a way similar to the
vi editor (if you are already familiar with the vi editor).

If you don’t want to learn vi just yet, but accidentally press the escape key
while entering a command, just press the <return> key. You may get an error
message, but you should also get a new $ prompt and be able to enter a new
command.

A good reference book is “A Practical Guide to the Linux System” by Mark G. Sobell
(Sun OS and BSD). I have a copy in my office that you are welcome to look at. I
recommend it to any student who is serious about learning Linux. Computer Science
track students will definitely benefit from having and studying this book. The first few
chapters should provide most of what you need for an introductory programming
course.

You can learn about the above commands by using the manual  or the info facilities
that are available on UNIX/Linux systems.
 
Example: Either man ls    or    info ls
Will give a description of the ls command.
man ls | lpr   or   info ls | lpr
Will print the manual pages on the default printer.
You can also ask me for help.

 Paul Higbee
620-2985 [email protected]

You might also like