bash - 如何在 .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'
推荐阅读
- java - 一个非常愚蠢的程序中的编译错误
- python - 使用 f2py 在 Python 上进行更快的计算
- odata - Blazor 中的 OData 是否支持 DevExtreme DxDataGrid?
- python - kwargs 是按值传递还是解包 dict 复制数据?
- xamarin.forms - 是否可以在本地显示器上使用 xamarin 表单代替 winform?
- c++ - 有没有办法使用 std::sort() 并且仍然保持基于 1 的索引?
- r - ggplot 填充属性更改比例
- javascript - 未找到模块 - 项目目录路径错误
- javascript - 有没有办法在另一个 HTML 页面中呈现 Angular 应用程序?
- c - 分配数组值时出现分段错误