General BSD Unix Commands
Login Procedure:
login:someid
Your login id is assigned to you by the system administrator
or your instructor. This is something you need to know
before you can login to a Unix system.
Remember: Case always counts in Unix. Your login id will
typically be in all lower case with possibly some digits.
Password Creation:
passwd
You usually have an initial password on a system. This is
something you need to know before you can login to a Unix
system. You use the passwd command to change it.
Remember: It is very important to change your password
occasionally. A user who knows your password can do
anything to your work! If you forget your password contact
the system administrator who can change it for you.
Logging Out:
ctrl-d or logout
Basic Commands
ls Lists the contents of a directory.
ls -l Lists the contents of a directory
in long form.
cd a_directory_name Changes the user's location to that
directory in the file system.
Example: cd /usr/local
cd Changes the user's location to their HOME
directory. A user's HOME directory is the
directory they see when they log in.
Other students home directories cannot be
accessed.
pwd Shows the user's present working directory.
mkdir a_directory_name Creates a directory.
rmdir a_directory_name Remove a directory. Must be empty.
cat file_name Shows a file on the screen.
Do Not Use On Non-text Files!
lpr file_name Prints a file on the default printer.
cp oldfile newfile Copies a file.
mv oldfile newfile Moves a file. Oldfile does not
exist after execution.
rm file_name Removes a file.
You can never change your mind!
more file_name Shows a file on the screen a page at a time.
man a_command Shows the manual page for that command
on the screen.
mail Read your mail. See other sources on
how to use the mail program.
vi file_name Invoke the vi editor on a file. See other
sources on how to use vi.
history This command will show the commands
recently executed.
Examples: !! Repeat last command
!# Repeat command number #
!pat Repeat first command that
matches pattern.
NOTE: The arrow keys are used in the editor only.
Comments to: webmaster@dca.fee.unicamp.br
Revised: April 9, 1996
URL: http://www.dca.fee.unicamp.br/sysadmin/helpstuff/cmdsummary.html
Copyright © 1996 - DCA