Xubuntu 16.04 "Bash: Alias: X: not found"
Xubuntu 16.04 "Bash: Alias: X: not found"
我正在尝试创建别名作为我作业的一部分。
按照有关如何在 Linux 上创建别名的指南,我这样做了:
- 通过添加 "alias pwgen="pwgen -y -1 12""(当然没有外引号)编辑 ~/.bashrc,因此编写 pwgen 将给出一个 12 个字符的密码,其中至少有 1 个特殊字符。
- 有没有"source ~/.bashrc"
但这就是问题所在,在 source 命令之后终端显示:
Bash: Alias: -y: not found
Bash: Alias: -1: not found
Bash: Alias: 12: not found
我试着写
alias pwgen="pwgen -y -1 12"
在基本 Linux 终端中,但结果是一样的。
我错过了什么或做错了什么?
你的命令对我的 linux 盒子很有用,所以问题可能来自其他地方。尝试使用这样的简单引用:
alias pwgen='pwgen -y -1 12'
我正在尝试创建别名作为我作业的一部分。 按照有关如何在 Linux 上创建别名的指南,我这样做了:
- 通过添加 "alias pwgen="pwgen -y -1 12""(当然没有外引号)编辑 ~/.bashrc,因此编写 pwgen 将给出一个 12 个字符的密码,其中至少有 1 个特殊字符。
- 有没有"source ~/.bashrc"
但这就是问题所在,在 source 命令之后终端显示:
Bash: Alias: -y: not found
Bash: Alias: -1: not found
Bash: Alias: 12: not found
我试着写
alias pwgen="pwgen -y -1 12"
在基本 Linux 终端中,但结果是一样的。
我错过了什么或做错了什么?
你的命令对我的 linux 盒子很有用,所以问题可能来自其他地方。尝试使用这样的简单引用:
alias pwgen='pwgen -y -1 12'