Learning Unix

Posted:
in macOS edited January 2014
As a newly 100% convert to the Mac, I would love to expand my knowledge of this great OS. I've read all the main books covering everything from security to Expose and now I want to get into the core of the OS. I was wondering if a good introductory book would be the O'Reilly "Learning Unix for OS X Panther"? I've read the a review or two and they say that it's a good book in general but the coverage of Fink(no clue what that is) is rather sparse. Any suggestions? Thanks!

Comments

  • Reply 1 of 12
    gongon Posts: 2,437member
    Quote:

    Originally posted by Gott der Maschine

    As a newly 100% convert to the Mac, I would love to expand my knowledge of this great OS. I've read all the main books covering everything from security to Expose and now I want to get into the core of the OS. I was wondering if a good introductory book would be the O'Reilly "Learning Unix for OS X Panther"? I've read the a review or two and they say that it's a good book in general but the coverage of Fink(no clue what that is) is rather sparse. Any suggestions? Thanks!



    I still don't have a Mac for meself, but whatever I've learned of Unix, I've learned approximately by this method:



    1) Learned to use the vi editor with tutorials on the 'net. Then learned to use the vim editor from a book. (If you're so inclined, learn emacs instead.) You don't need to be a guru, but you definitely want to learn the basics up to copy-pasting and undos at the very least.

    2) Started programming using gcc, make, cvs. Whenever there was a problem I googled for tutorials and HOWTOs and read manpages.
  • Reply 2 of 12
    staphbabystaphbaby Posts: 353member
    I found Mac OS X Unleashed to be pretty reasonable as an introduction to Mac, and to the Unix subsystem... its quite a pricey book, however.
  • Reply 3 of 12
    idunnoidunno Posts: 645member
    I bought the book in question (Learning Unix For osX Panther) only a few days ago. It is okay, but i feel it isn't the best for brand new people to Unix (like myself). Luckily I had already read The Missing Manual for osXPanther, and that had a crash course in Unix. So combined with that and the new book, I am slowly getting my head around it.



    Les.
  • Reply 4 of 12
    123123 Posts: 278member
    If you really want to become Gott of the machine, there's no way around learning C. Then read a standard UNIX book like Bach's.
  • Reply 5 of 12
    idunnoidunno Posts: 645member
    Would you recommend learning Applescript over Unix? Or which one first?



    Les.
  • Reply 6 of 12
    gongon Posts: 2,437member
    Quote:

    Originally posted by 123

    If you really want to become Gott of the machine, there's no way around learning C. Then read a standard UNIX book like Bach's.



    Learning C first? Nah.



    If he isn't interested in programming, he can do everything else without knowing a line of C. What he needs is to learn an editor, a bit of command line tools and a bit of shell environment configuration. Then the doors are open to all directions in Unix use - system administration, "real programming" like the aforementioned C, and "power user" stuff like advanced scripting and tools use.
  • Reply 7 of 12
    sc_marktsc_markt Posts: 1,402member
    I downloaded fink commander and then downloaded an app. I don't know where it went or even if I installed it. In short, I don't have a clue how to use the X11 system. And the sad part is, I use UNIX almost every day at work.



    Are there any sites that have easy examples on how to load an app and use it in X11?
  • Reply 8 of 12
    How can you use UNIX every day at work and not know how to run an X11 app?



    Open /Applications/Utilities/X11

    cd to the directory where the app is.

    "./appname" where appname is the app's name.



    I really think you should read some documentation before you dive head-first into this. You might end up accidentally doing more damage than good.



    Fink almost *always* installs software into its own /sw directory. That keeps it separate from the system's files and makes it easy to trash it and start over if you have problems.



    Binaries (executable programs) are usually stored in a "bin" directory. There are several of these such directories already on your Mac. These include:



    /bin

    /sbin

    /usr/bin

    /usr/sbin



    I think fink uses /sw/bin, but I'm not sure.



    The number one thing you can do to teach yourself is read the "man" pages (short for "manual"). Open the Terminal application (or use a terminal shell from the X11 environment) and type "man command" where "command" is the name of an executable command. Want to know what chown does? use "man chown". Most executables include man pages.



    But where do you get a list of executables?



    See the list of directories above. cd to any of them and enter the command "ls" to get a directory contents listing. Alternatively, if you are using the default shell in Terminal, press tab-tab to get a message "Display all X possibilities? (y or n)". Press y to list all commands you have access to. Press the space bar to scroll a page or q to stop listing.



    I hope this helps a little. This post really only scratches the surface. Simply *reading* documentation like this, though, can be the best way to learn about the terminal commands.
  • Reply 9 of 12
    torifiletorifile Posts: 4,024member
    Quote:

    Originally posted by Brad

    Fink almost *always* installs software into its own /sw directory. That keeps it separate from the system's files and makes it easy to trash it and start over if you have problems.



    Binaries (executable programs) are usually stored in a "bin" directory. There are several of these such directories already on your Mac. These include:



    /bin

    /sbin

    /usr/bin

    /usr/sbin



    I think fink uses /sw/bin, but I'm not sure.





    FInk does the /sw thing for all software except for X11, IIRC. Those have to go some place else. Everything else goes in /sw. And Fink does use /sw/bin for it's path.
  • Reply 10 of 12
    123123 Posts: 278member
    Quote:

    Originally posted by Gon

    Learning C first? Nah.

    If he isn't interested in programming, he can do everything else without knowing a line of C. [...] Then the doors are open to all directions in Unix use - system administration, "real programming" like the aforementioned C.




    I'm not talking about "real programming", I'm talking about "learning UNIX". My interpretation (=understanding UNIX/learning how it works and why it works) of that term and the "I want to get into the core of the OS" bit seems to be quite different from anybody elses (=learning some shell commands), though. Anyway, I think the "if you really want to become god of the machine" part of my post should have made it clear that I wasn't talking about using cd and ls, even though that's maybe be what he was asking for.
  • Reply 11 of 12
    gongon Posts: 2,437member
    Quote:

    Originally posted by 123

    I'm not talking about "real programming", I'm talking about "learning UNIX". My interpretation (=understanding UNIX/learning how it works and why it works) of that term and the "I want to get into the core of the OS" bit seems to be quite different from anybody elses (=learning some shell commands), though. Anyway, I think the "if you really want to become god of the machine" part of my post should have made it clear that I wasn't talking about using cd and ls, even though that's maybe be what he was asking for.



    I see your point. Just wanted to point out that there is a necessary precursor skill level for about everything in Unix.



    How about this for a starting point?
  • Reply 12 of 12
    sc_marktsc_markt Posts: 1,402member
    Quote:

    Originally posted by Brad

    How can you use UNIX every day at work and not know how to run an X11 app?



    Open /Applications/Utilities/X11

    cd to the directory where the app is.

    "./appname" where appname is the app's name.



    I really think you should read some documentation before you dive head-first into this. You might end up accidentally doing more damage than good.



    Fink almost *always* installs software into its own /sw directory. That keeps it separate from the system's files and makes it easy to trash it and start over if you have problems.



    Binaries (executable programs) are usually stored in a "bin" directory. There are several of these such directories already on your Mac. These include:



    /bin

    /sbin

    /usr/bin

    /usr/sbin



    I think fink uses /sw/bin, but I'm not sure.



    The number one thing you can do to teach yourself is read the "man" pages (short for "manual"). Open the Terminal application (or use a terminal shell from the X11 environment) and type "man command" where "command" is the name of an executable command. Want to know what chown does? use "man chown". Most executables include man pages.



    But where do you get a list of executables?



    See the list of directories above. cd to any of them and enter the command "ls" to get a directory contents listing. Alternatively, if you are using the default shell in Terminal, press tab-tab to get a message "Display all X possibilities? (y or n)". Press y to list all commands you have access to. Press the space bar to scroll a page or q to stop listing.



    I hope this helps a little. This post really only scratches the surface. Simply *reading* documentation like this, though, can be the best way to learn about the terminal commands.




    Thanks for the info. I'll try what you said and give it a shot. Hopefully, I don't end up erasing my HD or doing some other googer thing...
Sign In or Register to comment.