Unix stuff


    /groups/isr/search/index.rss?tag=hotlist/groups/isr/search/?tag=hotWhat’s HotHotListHot!?tag=hot0/groups/isr/sidebar/HotListNo items tagged with hot.hot/groups/isr/search/index.rss?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomelist/groups/isr/search/?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcomeRecent ChangesRecentChangesListUpdates?sort=modifiedDate&kind=all&sortDirection=reverse&excludePages=wiki/welcome0/groups/isr/sidebar/RecentChangesListmodifiedDateallRecent ChangesRecentChangesListUpdateswiki/welcomeNo recent changes.reverse5search
    Here is a review of where we are so far:
    • fsck -yf file system check
    • cd change directory
    • ls list
    • pwd print working directory
    • ssh secure shell
    • say say something
    • mkdir make a directory
    • less look into it (also use more)
    • who who you are
    • last who last logged in
    • ctrl-z halt

    First thing today, log in to Jody or Kai's machine as victim or herobrine and say a message with your name in it.

    Module 2: wild cards, man pages, deleting files
    This is how wild cards work:
    Instead of typing out herobrine, you could type
    just make sure that nothing else matches the h part.
    Another example:
    These files are in a folder called test:
    malcolm mary tom
    if you type
    rm m*
    it will delete mary and malcolm
    if you type
    rm mal*
    it will delete only malcom
    if you type
    rm *
    it will remove everything.
    You can also use this to delete certain types of files (jpg, txt, mp4)
    rm *.jpg
    will remove every jpg file in the folder

    Now you try it:
    1. open terminal
    2. navigate to your desktop (remember, it is called Desktop)
    3. create a folder using mkdir called test
    4. navigate into that folder
    5. create three text files using sudo nano, the first will be called malcolm, then mary, then tom
    6. read each one using less or more
    7. take a screenshot of this folder from the gui (graphical user interface), command-3 takes a screen shot, command-4 is a screenshot of only what you select.
    8. copy this screenshot into your weblog, so you can remember how you did this
    9. remove one file at a time using the rm command, take more screenshots
    Ok, at this point, you can navigate around, login to remote computers, create and delete text files.
    What's next?
    Module 3: Internet
    Your computer needs 4 things to be able to get onto the internet:
    IP address, example
    Subnet mask, example
    Gateway/router, example
    Domain name server (DNS), example

    Here's what each one does:
    IP address:
    All traffic on the internet or local area network (LAN) is in the form of packets of information, like mail envelopes with a letter inside. Each letter you mail has two important things: the address you want it to go to, and the message inside the envelope.
    TCP/IP is the format of these, which stands for Transmission control protocol and internet protocol.
    The TCP part is the message, and the IP part is the envelope, with an IP address on it.
    Check the IP address of your machine:
    From the GUI: open system preferences, network
    From the terminal: type ifconfig

    Subnet mask:
    Imagine you want to stay in one of two large 254 room hotels. One has long hallways, and very few floors, the other has many floors, but short hallways.
    If you want to sleep, you don't want many people walking down the hall in front of your room. You want many floors with fewer rooms per floors.
    This is what subnet masking does on a network. Each of the four segments can hold 254 addresses.
    At home, you probably have a network that looks like this:

    This means that the last zero can hold up to 254 addresses (from to
    HPA has this sort of mask:
    which means that
    is the elab, which can have 254 x 254 addresses
    It makes for a quieter network, also providing some security as others cannot see you easily.

    This is the gateway for all of your traffic, usually the access point at your home. The technical difference between these words is that a router routes traffic between two networks of the same type (like ethernet), while a gateway is between different types of networks (like a cable modem or DSL gateway)

    Domain name server:
    This is the computer on your network or outside that translates names into numbers, like a digital phone book.
    Try this in terminal:
    nslookup physics.hpa.edu
    1. when you get the address, write it down
    2. open a browser
    3. go to physics.hpa.edu
    4. now go to the numbers you wrote down.
    5. Try this with another name, either on campus or off
    Ping and traceroute:
    Imagine you want to find out if a machine is responding (you can block this by using "stealth mode")
    In terminal ping one of the IP addresses in your class
    ping an address out on the internet
    what is the difference?

    now try this:
    traceroute www.apple.com

    It should give you a trace of the path your connection took.
    Try this with other addresses on and off campus.

    Say you want to find out the name of something, or the IP address from the name.
    try this:
    (you will get a funny > sign)
    what do you get?
    where is this machine?
    Try again using as the server

    The best use of this is to find out what OTHER people might call a machine.
    We have several DNS servers on campus, the main one is at
    Others to try:

    you can get out by typing
    or control-z (halt)