creating an alias in Terminal

Discussion in 'macOS' started by Mosey, Jan 21, 2008.

  1. Mosey macrumors member

    Aug 30, 2007
    I'm using Terminal to run UNIX commands. I used to use UNIX a lot on Sun and HP workstations, but it's been about 15 years, so I'm pretty rusty. I seem to remember that I could set aliases, like so:

    alias c clear

    But, it comes back with:

    -bash: alias: c: not found
    -bash: alias: clear: not found

    I've tried:

    alias c 'clear'
    alias c "clear"

    but always get the same result.

    What am I doing wrong?
  2. swiftaw macrumors 603


    Jan 31, 2005
    Omaha, NE, USA
    i believe the command you need is "ln" not "alias"
  3. Lixivial macrumors 6502a


    Jan 13, 2005
    Between cats, dogs and wanderlust.
    You're just missing the = sign. It would go something like this:

    alias c='clear'

    EDIT: And so as to avoid any confusion, this has nothing to do with the term that the Finder uses for shortcuts.
  4. Mosey thread starter macrumors member

    Aug 30, 2007
    Yup, = did the trick! Thanks for the help!

Share This Page