Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 10 WSL bash aliases

Tags:

git

bash

windows

Is there a way to create aliases for WSL Bash on Windows 10?

With Git Bash, it's easy: edit the file .bashrc: alias alias-name="command" I've done my research, including these posts 1, 2 but couldn't find the answer.

If that's not possible. Is it possible to set Git Bash as an integrated terminal in Visual Studio Code?

like image 367
Viet Avatar asked Mar 07 '23 21:03

Viet


1 Answers

I got tripped up on this because I edited the wrong .bashrc file. There is one in the linux file system (home/robin/.bashrc) and there's another one in the windows file system (c:/users/robin/.bashrc). I had to edit the one in the linux file system. Now when I launch Windows Terminal I can use my aliases.

like image 139
Robin Nelson Avatar answered Mar 10 '23 11:03

Robin Nelson