Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

bash: alias: alias: not found

Writer Matthew Barrera

When I log in, I see the error:

bash: alias: alias: not found

If I source my .bashrc file, the message appears again.

What is causing this?

6 Answers

I had the same issue, so the solution is to follow simply rules.

alias alias_name='command '

no other symbols between equal sign.
I had whitespaces between the sign and the source ~/.bashrc always failed for me.
so be attentive

3

It turns out that a line feed had been removed from ~/.bashrc, giving:

alias ll='ls -alF' alias la='ls -A'
alias l='ls -CF'

Breaking the first line into two commands fixes the error.

In my case, removing spaces in alias = ls -alF solved the problem.

1

You can put quotes around the commands you are aliasing. You can even put them around the alias, too.

'llg'='ll | grep'

Newlines are also a problem. Widows-saved .bashrc file caused errors in Ubuntu virtual machine:

command not found

I ran dos2unix .bashrc to convert the line endings, and then everything worked.

1

My problem is solved when I remove the space in

alias cdg = 'ls -al'

to

alias cdg='ls -al'

I think you can do this:

alias 'll=ls -alF'

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy