creating an alias in Terminal

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

  1. Mosey macrumors member

    Joined:
    Aug 30, 2007
    #1
    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

    swiftaw

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

    Lixivial

    Joined:
    Jan 13, 2005
    Location:
    Between cats, dogs and wanderlust.
    #3
    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

    Joined:
    Aug 30, 2007
    #4
    Yup, = did the trick! Thanks for the help!
     

Share This Page