如何在.bashrc中为ssh命令创建别名?

问题描述 投票:0回答:1

我正在尝试在用户的.bashrc文件中为ssh命令创建别名。这是我的.bashrc的样子:

alias ll = 'ls -al' alias tron = 'ssh sshtron.zachlatta.com' 事实证明这行不通。这也是我同时打开Git Bash(终端)时始终显示的内容:

bash: alias: =: not found
bash: alias: ls -al: not found
bash: alias: tron: not found
bash: alias: =: not found
bash: alias: ssh sshtron.zachlatta.com: not found
bash git ssh command alias
1个回答
1
投票

摆脱空间。 alias tron='ssh sshtron.zachlatta.com'

© www.soinside.com 2019 - 2024. All rights reserved.