Terminal Question?

Discussion in 'Mac Programming' started by Chef Medeski, Dec 28, 2005.

  1. macrumors 6502a

    Chef Medeski

    Joined:
    Jun 14, 2005
    Location:
    New York, NY
    #1
    I am trying to make the desicion whether or not to get a linux computer. The thing that worrys me the most isn't instability or incompatibility (I bought a mac for those), but the command line. I'm quite shy of thing. I have dabbled in Mac's Terminal program and upon reading up I noticed that Linux is akwardly close to Mac OS X. I just wanted to know what the differences would be between the two. I mean if I could practice on my mac to determine whether I could use a linux, that would just be great. I guess since they are both built on UNIX, they share a great deal; however, I wanted to know what commands and aspects differ?
     
  2. Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Kepler-452b
    #2
    If you are a beginner in Terminal, the differences might not be important to you yet. We could recommend to you some reading material to get started learning about Terminal in Mac OS X or about using the command line in Linux in general, but what's more important for now might depend on what specifically you want to do, e.g., move files around, use particular utilities, write your own scripts, install software packages, use a compiler, interface with a GUI environment, etc.

    For what purpose(s) would you use the command line?
     
  3. thread starter macrumors 6502a

    Chef Medeski

    Joined:
    Jun 14, 2005
    Location:
    New York, NY
    #3
    Well I really don't care so much for Terminal in Mac, Apple already does the job for me using Aqua. I was more dabbling for Linux which I am installing soon. I am using it as a server. So, thats all I wanted to use it for and I guess just wanted to know if what I learned with Linux would be double as helpful in a mac.
     
  4. Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Kepler-452b
    #4
    For the most part, yes. Many of the commands, files, and software packages you might encounter on your Linux server will be exactly the same under Mac OS X.
     
  5. macrumors 68000

    Joined:
    Aug 5, 2005
    #5
    1) What is it with people and putting Terminal in Programming? :confused:
    2) Unless you start going into shellcode/assembly programming or kernel programming, you won't notice a single thing
     
  6. Moderator emeritus

    EricNau

    Joined:
    Apr 27, 2005
    Location:
    San Francisco, CA
  7. macrumors 604

    MacsRgr8

    Joined:
    Sep 8, 2002
    Location:
    The Netherlands
  8. jhu
    macrumors 6502a

    jhu

    Joined:
    Apr 4, 2004
    #8
  9. macrumors 68030

    slooksterPSV

    Joined:
    Apr 17, 2004
    Location:
    Nowheresville
    #9
    Here I'll throw on some safe commands for you to try out:
    open ./ opens current directory
    cd / changes current directory to / (the root of the hard drive)
    echo "whatever you want to type in here" outputs the txt in between the quotes, in this instance it would output: whatever you want to type in here
    exit quits current terminal shell
    ls lists contents in current directory unless otherwise specificed, e.g.: ls ~/Desktop will list everything in the desktop
    help shows a list of commands
    top shows current processes

    ---ADVANCED COMMANDS---
    Some of these can/may/will hurt the OS so use them cautiously:
    chmod change modification rights on a file or folder
    chown change owner of a file or folder
    env shows environment variables, you can also change them too
    set shows all set variables, you can also change them too
    rm removes specific file or folder use -R to do it recursively
    cp copies files to another file name or specific place e.g.: cp ~/Desktop ~/
    rmdir removes a directory specifically

    ---USEFUL COMMANDS---
    kill program# allows you to kill/force quit tasks
    killall program name allows you to kill a program by typing its program name in
    --Both kill and killall, use top to find out what you want to kill.

    There's sooooooo.................oooo much more, but there's some basics. Echo is fun.
     
  10. macrumors 68030

    superbovine

    Joined:
    Nov 7, 2003
    #10
    I fix permission, backup my HD over the network using rsync in one foul swoop.

    You could also use crond to schedule different program to run at specific times which might be a better solution depending on the application instead of using ical.

    I also use telnet, ssh, ftp, and scp quite frequently to remote admin my linux servers.

    In other words, the shell, "terminal", is quite powerful if you know how to use it, but for most user it is too complex to understand what the capabilities are.
     
  11. macrumors member

    Joined:
    Oct 23, 2004
    Location:
    Chapel Hill, NC
    #11
    Here something that might help:

    I've been browsing "Unix for the Beginning Mage" It's a book, but you can also download a pdf here:

    http://unixmages.com/books

    Basically it explains and shows you how to use the terminal to do things, and IMHO does a good job of explaining things for beginners

    They do an clear presentation of the things they cover, although I'm a CLI n00b and haven't finished it yet, so take my advice with a grain of salt.
     

Share This Page