This prompt shows that you're running tcsh. Your aliases in .bashrc
have no effect because tcsh doesn't (and can't) read bash's configuration files. Your attempts to define an alias on the command line have no apparent effect because tcsh also has a command called alias
, but its syntax is a little different from bash. c
is working because your (t)csh configuration happens to also have the same alias.
You probably didn't intend to use tcsh. It was the best interactive shell in the 1980s, but zsh caught up and overtook it in the 1990s, and so did bash in the 2000s. Switch to /bin/zsh
or /bin/bash
as your login shell:
chsh -s /bin/bash
If you can't run chsh due to administrative restrictions, see Changing the default shell without chsh or administrator privileges.
If you absolutely have to use tcsh because you absolutely need login scripts that depend on it and your administrator is living in the 1990s and won't update them, you can still use a different interactive shell. Put something like
setenv SHELL /bin/bash
in your .login
(that's the file that tcsh reads when you log in).
.bashrc
would have no effect but interactive alias definitions would work. – Gilles 'SO- stop being evil' Apr 17 '20 at 19:14ls
, notla
orl
, according towhich
. I used thela=ls -a
as a minimum working example, but also tried other aliases involvingcd
and other commands.c='clear'
was the only alias that worked. – Jacob Stern Apr 17 '20 at 19:18type -a la
print? (Mentioned in the answer I linked.) Or: nevermind, see the answer above and switch from tcsh – I'm too young to know this. – motzmann Apr 17 '20 at 19:26