Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an alias pwd

How can I create another alias that is a synonym for it?

For example I have

alias cd1='cd ~/dir1'

I want a second alias cd01 that points to the same place but I don't want to also have:
alias cd01='cd ~/dir1'
in case /dir1 changes

share|improve this question
up vote 3 down vote accepted

It works in both bash and zsh.

$ alias cd1='cd /'
$ alias cd01=cd1
$ cd01; pwd
# now, to change cd1
$ alias cd1='cd /etc'
$ cd01; pwd
share|improve this answer

It should works. On my systems, I have:

alias ls='ls -F'
alias ll='ls -l'

That means ll is alias to ls -F -l. Have you tried your scenario out?

share|improve this answer

Your Answer


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.