[英]Windows 10 WSL bash aliases
Is there a way to create aliases for WSL Bash on Windows 10?有没有办法在 Windows 10 上为 WSL Bash 创建别名?
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.使用 Git Bash,这很容易:编辑文件
.bashrc
: alias alias-name="command"
我已经完成了我的研究,包括这些帖子1 、 2但找不到答案。
If that's not possible.如果那不可能。 Is it possible to set Git Bash as an integrated terminal in Visual Studio Code?
是否可以将 Git Bash 设置为 Visual Studio Code 中的集成终端?
I got tripped up on this because I edited the wrong .bashrc file.我被绊倒了,因为我编辑了错误的 .bashrc 文件。 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).
在 linux 文件系统 (home/robin/.bashrc) 中有一个,在 windows 文件系统 (c:/users/robin/.bashrc) 中有另一个。 I had to edit the one in the linux file system.
我不得不编辑 linux 文件系统中的那个。 Now when I launch Windows Terminal I can use my aliases.
现在,当我启动 Windows 终端时,我可以使用我的别名。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.