Anyone know of a nice tutorial site for using Terminal?

Discussion in 'Mac Basics and Help' started by chrono1081, Jul 8, 2014.

  1. chrono1081 macrumors 604


    Jan 26, 2008
    Isla Nublar
    Hi guys,

    Is there a nice site everyone uses to learn Terminal? I tried different sites for both Terminal and Unix and they all end up being dead ends (commands that don't work).

    I was wondering if anyone knew of a good resource to use.
  2. chown33, Jul 8, 2014
    Last edited: Jul 8, 2014

    chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Terminal is primarily a windowed command-line interface to the shell. The fact that each window is an independent shell can be useful, but interacting with the shell itself is the primary interface.

    One the most useful features of Terminal (as distinct from shell) is the ability to copy and paste commands into Terminal windows. This makes it simple to edit or revise command-lines in, say, TextEdit, then simply copy and paste into Terminal. This is far simpler than learning the shell's builtin control-key editing features (or learning the 'vi' or 'emacs' editors).

    The shell itself is a command-processing language. It consists of builtins (commands the shell does itself) and whatever external commands are located in any directory in your PATH variable.
    • To learn about the shell and its builtins (which includes things like shell variables, globbing patterns like * and [a-z]), study the shell. Different shells are different. The 'bash' shell has online references (bash man page) as well as builtin reference via the man command.
    • To learn about the Posix-compatible commands that aren't built into the shell, study those.
    • To learn about commands specific to OS X, study those. The online man-pages are here:
    It's unclear to me which of those subject areas addresses what you want to learn.

    Also see:

    The first step is probably to look at the online man page for 'man' itself, so you can read man pages with it. From there, it depends on what you want to study: shell, Posix commands, OS X commands.

    'bash' has a huge man page. You may find it daunting. Some online bash tutorials or GNU info references may be less daunting. The 'info' command is provided by Linux as its primary documentation system.

    Since the non-builtin commands will vary between GNU/Linux and OS X, if you find a bash tutorial that assumes Linux, you will encounter difficulties. This is why it's important to distinguish Posix from non-Posix, and OS X from others. Posix commands are cross-platform. OS X is Posix compliant, with additions. Linux is mostly Posix-compliant, but not completely.

    Finally, if you post examples of some of the dead-end sites, along with what you were looking for, we might be able to post more specific suggestions. As given, no one knows what you tried or why it wasn't helpful in achieving your goals.
  3. hiddenmarkov macrumors 6502a

    Mar 12, 2014
    This would be of help. Most "common" bash tasks called up I find work across my mac os and Linux vm's I run (and I run Ubuntu and centos server versions in vm).

    Only time I have had issues is like say for doing cli work for apache doing webserver stuff. One time I found a very decent guide for an Ubuntu lamp. Very decent if running the version of Ubuntu of the guide lol. At some point they changed some file structure around and most of the guidance was not working. Until I found out where the files moved to anyway. take away is using cli for specific stuff your guide(s) may not cover all possible locations the files may be at.

    Also you did not say if copy pasting code or typing it out. If typing check for fat finger. I know with me this is where I have issues from time to time. Basic example would be if I want to edit a system file. I would run say:

    sudo nano "some location/some file name"

    If I fat finger the location and/or name....nano will open up to empty text edit screen. My big clue I did something wrong. If file existed and typed correctly I would see the file text in nano. Nano being one of many *nix text editors. I happen to like it the most, find one you like (vi zealots lets not turn this into one of those threads lol....).

Share This Page