Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Basic UNIX Commands for Running SHELL ACCOUNTS

  1. #1
    Banned
    Join Date
    Oct 2003
    Posts
    19

    Basic UNIX Commands for Running SHELL ACCOUNTS

    [gloworange]**********THIS TUTORIAL BELONGS TO TH3 SpId3R*****************[/gloworange] Here are a list of commands newbies might find helpful for using shell accounts. (To get a list of some good shell account providers, see the tutorial ***Bypassing Web Censorship****)

    BASIC COMMANDS (some of these command might be restricted by your shell provider)
    _______________________________________________________________________

    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 [directory_name] .................. change current directory
    "cd .." ................ Typing this command (without the quotes) takes you to one level below current level
    pwd ................... Lists current working directory
    man (command_name) ...... shows help on a specific command. Provides information about the 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 edtor to edit files
    pine ................... easy to use mailer
    more (file) .......... views a file, pausing every screenful

    sz ..................... send a file (to you) using zmodem
    rz ..................... recieve a file (to the unix system) using zmodem

    telnet (host) ...... connect to another Internet site
    ftp (host) ...........connect 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 (filename.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

    [glowpurple](Thanks to Chris for reminding me to include the following..)[/glowpurple]

    cat [options][file(s)] [Standard I/O]............. Description: concatinates and displays files. It reads from standard input or from the specified file(s) and displays them to standard output.

    grep [options] [expression] [file(s)] ................. we use grep to pick out particular key strings from a file. For example, if a file myfile contains lines of data for many samples, and we wish to consider the data for a single sample mysamp, lines containing the word mysamp can be "grepped'' out by: % grep ``mysamp'' myfile

    % diff thisfile.txt thatfile.txt ............... displays difference between the files, shows which lines in 'thisfile.txt' would need to be changed to match 'thatfile.txt'

    [glowpurple](Thanks to SeaBass55 for reminding me to include the following..)[/glowpurple]


    bzip2 - another popular compression (alternative to gzip)
    uptime - uptime and load
    tree - directory/file listing (-H switch outputs in HTML..great for file listings)
    mc - midnight commander rocks!
    clear - clears screen
    su - switch user (su <username> changes to a different user..just "su" will change to root and "su -" is root with login script...passwords are always required unless you are root...then you can "su whateveruseryouwant")

    Some switches often used:

    rm -rf - deletes everything be it directory or not...be careful as it doesn't ask you are you sure either
    df -h - shows df listing in MB



    _______________________________________________________________________
    Those were some basic commands for the Shell. Here are some mail commands in Unix....



    MAIL COMMANDS FOR READING MAIL

    When you connect to the Antionline.com network, the system will check to see if you have any mail. You will see either the message "You have mail" or "You have new mail". The MAIL prompt is the "?" symbol.

    # ......... display (read) contents of specified message number "#" from header list.

    more # .......... Read contents of long messages (pauses display, press [Space Bar] to continue).
    z ............... Move forward between screens if list of messages is more than one screen.
    z- .............. Move backward one screen level if list of messages is more than one screen.
    CTRL+c .......... Stop reading a message & return to ? mail prompt.
    d ................ Delete currently displayed message.
    d# .............. Delete specific message number "#" from header list.
    d#-# ............. Delete a range of messages at a time (all messages between & including #-#).
    h ................. Redisplay messages in your E-mail account (header list).
    q .................. Quit & save mail you have read to your MBOX & return to UNIX prompt.
    r .................. Reply to sender of currently read message.
    r# ................ Reply to sender of message number "#" from header list.
    R ................ Reply to sender of message & to all original recipients of message.
    s [filename] ............ Save current message as a text file under specified filename.
    u .......... Undelete messages erased in error.
    x ........... Exit & leave messages intact as they first appeared before you accessed mail.
    [ENTER] ............ Show the next new message in your list.
    pipe # lp ............. Print message number "#" from header list.

    MAIL COMMANDS FOR COMPOSING

    (Assuming that you are logged on into the shell of Antionline.com)

    mail spider ......... Compose and send a message to a single person who is on the local server
    (spider@antionline.com)
    mail spider@hacker.ag ............ Compose and send a message to a single person who is not on
    the local server.
    mail spider raven nokia ............ Compose and send messages to several people. (Entering No domain name defaults to local server, i.e. @antionline.com)
    ~r[filename] ........... Insert text from a file into your message
    [CTRL]+c ............ Pressing this key combination twice will abort message composing and return to
    Unix Prompt
    "." ................... Typing the Period (without the quotes ofcourse) as first character on a line will end
    the message composing
    mail ................ connect to E-mail utility & display a list of all messages. (new & old messages not
    reviewed since last mail session)
    more mbox .............. List the full contents of all messages stored in MBOX file. (screen pauses as it is filled)

  2. #2
    Junior Member
    Join Date
    Oct 2003
    Posts
    7
    th3spid3r:

    good list! May I also suggest the additionf of diff, cat, grep? I've found these invaluable commands as I use UNIX as well (especially grep in conjunction with the | ).

    chris...

  3. #3
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,323
    I moved this from Tutorials as it's not really a tutorial but rather a listing of commands (that would still be useful for new users to have).

    For anyone writing a tutorial please read the thread called Read Me First and specifically the first post. Remember that a tutorial is something that is designed to teach:

    sourced from: http://www.m-w.com

    Main Entry: 2tutorial
    Function: noun
    Date: 1923
    1 : a class conducted by a tutor for one student or a small number of students
    2 : a paper, book, film, or computer program that provides practical information about a specific subject
    and derives from the word tutor

    sourced: http://www.m-w.com
    Main Entry: 1tu·tor
    Pronunciation: 'tü-t&r, 'tyü-
    Function: noun
    Etymology: Middle English, from Middle French & Latin; Middle French tuteur, from Latin tutor, from tueri
    Date: 14th century
    : a person charged with the instruction and guidance of another: as a : a private teacher b : a teacher in a British university who gives individual instruction to undergraduates
    Imagine that your "tutorial" is what you are using to teach another person something in conversation. Reading them a list of commands and what the commands do doesn't usually go over well (in fact, that's the number one complaint by students who have teachers who do exactly that).

    So when you write your tutorial, imagine how you'd want to learn the topic. Write it almost like a conversation.

    I hope this helps somewhat.

    P.S. Just as a side note, I do not believe there is a shell here at Antionline. Using Google, one should be able to find numerous free shells to play around with. Alternatively you could get something like Knoppix or Cygwin to play around with some (not necessarily all) of the commands. For those more adventurous, pick a distrobution from Linux Online.
    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  4. #4
    Banned
    Join Date
    Oct 2003
    Posts
    19
    thanks a lot for the info dude
    Ill be sure to follow

    __________________________
    Th3 SpId3R

  5. #5
    Banned
    Join Date
    Apr 2003
    Posts
    3,839
    thanks a lot for the info dude
    LMFAO

    MsMittens.

  6. #6
    Just a Virtualized Geek MrLinus's Avatar
    Join Date
    Sep 2001
    Location
    Redondo Beach, CA
    Posts
    7,323
    Hehehe.. I don't mind that here.. Now, if it was in RL and one of my students did that... Well..

    You never know who's behind a handle..

    Goodbye, Mittens (1992-2008). My pillow will be cold without your purring beside my head
    Extra! Extra! Get your FREE copy of Insight Newsletter||MsMittens' HomePage

  7. #7
    Junior Member
    Join Date
    Jul 2003
    Posts
    28
    Lets not forget to add....

    bzip2 - another popular compression (alternative to gzip)
    uptime - uptime and load
    tree - directory/file listing (-H switch outputs in HTML..great for file listings)
    mc - midnight commander rocks!
    cd.. should actually be cd .. (space between cd and .. )
    clear - clears screen
    su - switch user (su <username> changes to a different user..just "su" will change to root and "su -" is root with login script...passwords are always required unless you are root...then you can "su whateveruseryouwant")

    Some switches often used
    rm -rf - deletes everything be it directory or not...be careful as it doesn't ask you are you sure either
    df -h - shows df listing in MB

  8. #8
    Banned
    Join Date
    Oct 2003
    Posts
    19
    thanks seabass

  9. #9
    Right turn Clyde Nokia's Avatar
    Join Date
    Aug 2003
    Location
    Button Moon
    Posts
    1,696
    A handy thing to have next to you when using UNIX!

    Thanks dood!

  10. #10
    Junior Member
    Join Date
    Oct 2003
    Posts
    7
    two more I forgot (perhaps the most important to me)...ps and netstat.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •