I am using Windows 10 Linux Subsystem (Ubuntu Bash).
I want to access my Windows folder from Ubuntu Bash.
The folder I want to access is (note that there are spaces in the names):
/mnt/c/Users/some folder1/some folder2/destination - folder/
What I do now in Bash is:
~$ cd /mnt/c/Users/some\ folder1/some\ folder2/destination\ -\ folder/
Because the directory is too deep, I don't want to type the long command every time. So I want to define an alias for that folder.
In Bash, I created a file ~/.bash_aliases
. And in the file ~/.bashrc
there is following command:
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
Next, I want to add the following line in ~/.bash_aliases
:
alias mf=<the correct format of the directory>
After mf
is defined, I want to switch to the directory using the following command:
~$ cd mf
Can you help me with this?
1) How do write the <the correct format of the directory>
?
2) What else do I need to do in order to use
~$ cd mf
cdd
terminal command which works almost likecd
but helps create aliases to any path on the go. Hope it helps :) github.com/nsrCodes/cdd – Oast