1

This question already has an answer here:

I'm trying to create alias for for cd command to AppData and %programdata% folders but I got path not found while if I write manual it works, here is what I'm doing:

In .bashrc I do

alias client= 'cd /mnt/c/Users/username/AppData/'
alias driver= 'cd /mnt/c/ProgramData/

the error is

-bash: alias: cd /mnt/c/Users/username/AppData/: not found
-bash: alias: cd /mnt/c/ProgramData/: not found

however in the terminal cd mnt/c/Users/username/AppData/, will navigate me to the folders

marked as duplicate by Kusalananda, slm Jun 12 '18 at 1:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

That's a simple syntax error: no space before or after =.

Change this:

alias client= 'cd /mnt/c/Users/username/AppData/'
alias driver= 'cd /mnt/c/ProgramData/'

To this:

alias client='cd /mnt/c/Users/username/AppData/'
alias driver='cd /mnt/c/ProgramData/'

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