2

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

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/'
| improve this answer | |

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