Basic Unix Commands

Here is a brief list of commands for the UNIX environment:

Note: fn.ft is used as a generic file name and file type.

  1. cat
    display file contents
    Usage: cat fn.ft

  2. cd
    change directory
    Usage: cd dir_name

  3. cp
    copy file
    Usage: cp source target

  4. ls
    list contents of a directory
    Usage: ls

  5. more
    display file contents one page at a time
    Usage: more fn.ft

  6. head
    displays the first count lines of a fn.ft
    Usage: head -n count fn.ft

  7. tail
    displays the last count lines of a fn.ft
    Usage: tail -n count fn.ft

  8. mkdir
    create a new directory
    Usage: mkdir dir_name

  9. mv
    move file or rename
    Usage: mv old_name new_name


    Usage: mv old_name new_directory

  10. passwd
    change password

  11. pwd
    displays current directory
    Usage: pwd

  12. rm
    deletes a file
    Usage: rm fn.ft

  13. rmdir <directory name>
    deletes a directory
    Usage: rmdir dir_name

  14. w, who
    display all current users
    Usage: w
    Usage: who

  15. rwho
    display all current users logged on the local network
    Usage: rwho

  16. finger
    user information lookup
    Usage: finger
    Usage: finger user

  17. man <command>
    manual pages for a command
    Usage: man command

  18. apropos <topic>
    list commands related to a topic
    Usage: apropos topic_of_interest

  19. find
    recursively descends the directory tree from dir_name to find the path to fn.ft
    Usage: find dir_name -name "fn.ft"

  20. lpr
    Usage: lpr fn.ft

  21. dos2unix
    converts DOS text files to UNIX style text files
    Usage: dos2unix dos.file unix.file

  22. unix2dos
    converts UNIX text files to DOS style text files
    Usage: unix2dos unix.file dos.file

  23. lynx
    text based browser
    Usage: lynx url_of_interest

  24. links
    a nicer text based browser
    Usage: links url_of_interest

  25. ps
    process status
    Usage: ps

  26. top
    show system usage statistics
    Usage: top

  27. whoami
    display effective userid
    Usage: whoami

  28. frm
    display from and subject of email messages
    Usage: frm

Syntax of a directory name in the UNIX environment:


Not all commands are available on every machine, although all of them mentioned here are available on prime. There are many variations on how to use these commands. The user is urged to use the man pages to learn more about each command.


Last modified: 1/22/08, WKA