如何在 .bashrc 中为 ssh 命令创建别名?
How do you create an alias for ssh commands in .bashrc?
我正在尝试在我的用户的 .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'
我正在尝试在我的用户的 .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'