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



我正在尝试在我的用户的 .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

去掉空格。alias tron='ssh sshtron.zachlatta.com'

最新更新