Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created an alias so that when I type la it does ls -la.

When I fire up terminal on my Mac, I get:

-bash: alias: la: not found
-bash: alias: =ls -la: not found

Why would this be?

My .bash_profile looks like:

alias la ='ls -la'
share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

I think it needs to be:

alias la='ls -la'

(note there are no spaces around the equal sign.)

share|improve this answer
    
That's right, no spaces around the equal sign. –  Dennis Williamson Jul 2 '10 at 9:56
    
I had spaces, not sure how they got there? strange! –  user27449 Jul 2 '10 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.