Is terminal enough?

Discussion in 'Mac Programming' started by gusious, May 5, 2010.

  1. gusious macrumors 65816

    gusious

    Joined:
    Dec 2, 2007
    Location:
    Greece
    #1
    Ok sorry if i'm posting this thread in the wrong section.

    Well i was wandering if the Terminal.app in OS X is enough for learning programming (C and Perl is in my interest) and learn how to work over terminal.

    Does "our" terminal have the same features with a Linux distribution or do i have to install linux in order to learn? If it lacks in some, which are they and is there a way to cover them?

    Thanks guys!
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    It is fine. It is a full UNIX terminal. Technically it is more UNIX than Linux as Mac OS X has actually been POSIX certified.

    There will obviously be some differences though, but that is true of all the UNIX distributions.
     
  3. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #3
    NOTE: For C you will need to install Xcode to get gcc (easiest, or get it from fink/macports). Perl is included.

    If you find other things missing, you can always add them via macports/fink or add modules to Perl via CPAN.

    B
     
  4. gusious thread starter macrumors 65816

    gusious

    Joined:
    Dec 2, 2007
    Location:
    Greece
    #4
    Do you mind posting some of the differences?
     
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    Where are you coming from? What are you familiar with?

    What Cromulent is saying is that it's not much different than Fedora vs. gentoo vs. ubuntu. They are all Linux but are quite different. So is OS X from the terminal.

    B
     
  6. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #6
    Commands and command options.

    There may be commands that exist on some version of Linux that don't exist on Mac OS X, or have a different name.

    The command options may also differ.

    Some command output might differ, such as the output of 'ls -l' when ACLs are present. This would usually only be a problem when scripting, as scripts ported without change might not parse command-generated output robustly.

    Library names and pathnames.

    Libraries might not be at the same pathname, and may have a different name.

    If you install 3rd-party libs or commands, you should put them somewhere OUTSIDE of Apple-maintained directories. DO NOT put them in /usr, /bin, etc. Put them somewhere YOU control, like /opt (which you will have to create).

    Config files, system startup, daemons, etc.

    Completely different. Assume you know nothing, and then read about 'launchd' on Mac OS X. And read:
    http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html


    The one unifying principle in all of this: Don't assume. Read the man page first.
     

Share This Page