Information Technology Services







UNIX Command Reference  


Here you will find detailed information on Basic Commands such as "changing your password" and "how to edit files" as well as a Quick Command Reference that should fit your needs. However, if you cannot find what you are looking for here, we have provided several outside resources.

If you would rather search for a particular command through an alphabetical listing of commands or by the category in which you need help specifically then hopefully these links will get you where you need to be. Either way, you'll find everything right here!

Easy References:

Commands by categorical function:


BASIC COMMANDS FOR YOUR UNIX ACCOUNT:

  • Getting into your E-Mail...
    Actually it is very simple to start up either of the e-mail programs that are installed on Atlas or KSUWeb.
    * To use Pine, you just type "pine" at the prompt.
  • Changing your password...
    It is actually very easy to change your account password. All you have to do is type passwd (not "password") at the prompt.
    * NOTE: KSUWeb will tell you what to do next but will not give you the specific information on password criteria (found below). A quick summary of what Atlas users will see on their screen follows:
    * You type passwd
    * Enter your old password
    * Enter a new password. [The new password must be at least 6 characters long and contain at least two alphabetic characters (a, A, b, B, etc.). In addition, the password must contain at least one numeric or special character (1, 2, @, #, etc.). The password must differ from the user's login name and any reverse or circular shift of that login name. Each time your change your password, it must differ from your last password by at least 3 characters.]
    * Enter the new password again to confirm your selection. Once entered, if the two passwords you typed match, you have successfully changed your password! If not, Atlas will say that the two don't match and ask you to try again. In that event, just type passwd and start all over!
  • How to know where you are in the system...
    If you look closely at your Atlas prompt, the right side of your prompt is telling what directories you are currently in. See figure below:
    Atlas{30}/home/mjohnson
    %

    The underlined part of the Atlas prompt above is the current working directory. However, if you are ever on a UNIX system that is not quite as nice as Atlas and you can't easily tell where you are, there is a command that you can type that will tell you where you are. That command is pwd, or print working directory. You would just enter that command at the system prompt as shown below:
    % pwd
  • Getting help while you are on the system...
    The man command - the man command (stands for manual) gives you a print out of an on-line manual page. Most system commands can be found this way. To use the man command, you type the man command at the Atlas
    prompt, followed by the name of the command you want to find information about. For instance, if you want to find information about the rm command, you would type:
    man rm
    * NOTE: To get help on the "man" command, type "man man". If you do not know the name of a command, use the
    "man -k" option. To get a list of all mail programs available type "man -k mail".
  • How to change to a different directory...
    To change to another directory you must know what directory you want to change to. You can find out what directories you have around your current position by doing a ls -l. Once you know where you want to go, going there is a breeze! You just use the UNIX cd (change directory) command, as shown below:
    cd directory
    For example, if I am in /home/mjohnson and I want to change directory to a directory within /home/mjohnson called "nails," all I would type is: cd nails. Or you can type:
    cd /home/mjohnson/nails
  • Commands to communicate with others...
    Talk, Write, or Chat
  • To make a directory...
    To make directories in UNIX, you use the mkdir command. For example, if you are in /home/mjohnson and you want to make a directory called "contacts," you would type the following at the Atlas prompt: mkdir contacts and then press return.
    The command to use to get into that new directory is cd.
  • To remove directories...
    If the directory has files in it, you need to make sure that those files are disposable because once you delete them ... there is no getting them back! Once your sure that they are indeed disposable, you would need to do a rm -r. For example, to remove the directory "contacts", you would type: rm -r contacts and press return.
    This tells the system to remove (rm) recursively (r) all files from contacts down.
  • To see who is on-line and what they are doing...
    At the Atlas prompt:
    * To see who is on-line simply type "who."
    * To see what a particular person is doing type "w." [w tells you the login name of the person logged in, when they logged in, and what they are doing]
  • To find more information...
    The command that gives the most information about users on UNIX systems is the finger command. If you type the finger command at the Atlas prompt and press return, you will see all the users login names on the system, their full name, the date and time that they logged in, and where they logged in from.
    You can also use finger to find out more detailed information on a certain person by typing finger login name. If you use finger this way, you will see the following information:
    * The person's login name, their full name, their home directory, their user shell, when their last login was, and the last time they checked their mail. It will also show you if the person has their messaging turned off. If the user has a .plan file, the finger command will read that information in and display it as well.
  • To personalize your account...
    Your "plan" file is read in when the finger command is used. The actual name for the Plan file is the .plan
    (pronounced dot-plan) file. You must name it .plan for the system and finger command to recognize it. To edit
    this file you must use one of the system-supported text editors, such as the Vi editor or PICO. Most users use
    the .plan file to tell a little about themselves but, users can add any information they want to add to the .plan file. *NOTE: Whatever information you put it the .plan
    file is readable by the world, so keep that in mind when you edit it. You do not want to put very personal
    information in this file. You can finger other users to find out what kind of information is appropriate for your plan
    file. To do this, you need to type the command followed by the login name of the person you want to look at, for
    example: finger bhelmes.
  • To edit files...
    Vi-Editor, or PICO
  • To Exit the system ... [how to know if you are logged in or out and how to log out]
    To "log out" from the system, simply type "logout" or "exit" at the Atlas prompt.
    * NOTE: It is very important that you always "logout" from the system. If you stay logged in and then leave your machine (especially in the lab), anyone can come in and destroy your files, work, etc. This poses a problem, both to the individual user as well as the system's security. Furthermore, if you stay logged in to the system, leave the machine, and someone cuts the machine off, your account may still be running what are called "ghost processes." Those processes take up valuable computing resources. So please make sure to ALWAYS LOGOUT.
    If you have successfully logged in to Atlas, the system will greet you with the "message of the day." In addition, the system will tell you whether you have new mail or not, and you will see the system prompt (or the Atlas Prompt). The Atlas prompt should look like this:
    Atlas[1]/home/mjohnson
    %

    The prompt waits on the user to enter commands and then executes them.

Quick Reference Command Summary

ls ................. show directory, in alphabetical order
logout ............. logs off system
mkdir .............. make a directory
rmdir .............. remove directory (rm -r to delete folders with files)
rm ................. remove files
cd ................. change current directory
man (command) ...... shows help on a specific command
talk (user) ........ pages user for chat - (user) is a email address
write (user) ....... write a user on the local system (control-c to end)
pico (filename) .... easy to use text editor to edit files
pine ............... easy to use mailer
more (file) ........ views a file, pausing at every screen full
sz ................. send a file (to you) using zmodem
rz ................. receive a file (to the unix system) using zmodem
telnet (host) ...... connect to another Internet site
ftp (host) ......... connects to a FTP site
archie (filename) .. search the Archie database for a file on a FTP site
irc ................ connect to Internet Relay Chat
lynx ............... a textual World Wide Web browser
gopher ............. a Gopher database browser
tin, trn ........... read Usenet newsgroups
passwd ............. change your password
chfn ............... change your "Real Name" as seen on finger
chsh ............... change the shell you log into
grep ............... search for a string in a file
tail ............... show the last few lines of a file
who ................ shows who is logged into the local system
w .................. shows who is logged on and what they're doing
finger (emailaddr).. shows more information about a user
df ................. shows disk space available on the system
du ................. shows how much disk space is being used up by folders
chmod .............. changes permissions on a file
bc ................. a simple calculator
make ............... compiles source code
gcc (file.c) ....... compiles C source into a file named 'a.out'
gzip ............... best compression for UNIX files
zip ................ zip for IBM files
tar ................ combines multiple files into one or vice-versa lharc, lzh, lha .... un-arc'ers, may not be on your system
dos2unix (file) (new) - strips CR's out of dos text files
unix2dos (file) (new) - adds CR's to unix text files


 
 

 

 

 



Webmaster Email: itweb@kennesaw.edu
This page last modified 12/11/2008 8:47 AM
Copyright © 2006 Information Technology Services