我希望从现在开始的每个新用户都默认使用 bash 作为他们的 shell。
我知道要将您自己的 shell 更改为 bash,您将使用命令“chsh -s /bin/bash”,但是默认情况下如何自动将所有未来用户的 shell 设置为 bash?
据我了解 bash 是 Ubuntu 中的默认 shell,那么为什么/bin/sh
指向/bin/dash
?
我有这个脚本:
spd-say "Hello, don't forget the trash bin."
Run Code Online (Sandbox Code Playgroud)
所以它让我想起了我应该做什么,我把它移到/usr/local/bin/
了,命令trash
宣布了这个论点,然后我设置了一个crontab 工作,让它每天提醒我我想做什么。但是crontab不起作用,我不明白为什么(它可以完美地完成其他工作)。
一旦我在终端中看到此消息:
You have new mail in /var/mail/root
Run Code Online (Sandbox Code Playgroud)
最后这一行让我犯了一个严重的错误:
/bin/sh: 1: trash: not found
Run Code Online (Sandbox Code Playgroud)
我知道这样做很愚蠢,但我做到了:
mv /usr/local/bin/trash /bin/sh
Run Code Online (Sandbox Code Playgroud)
认为这sh
是一个目录,我应该将脚本移到那里以便执行。
现在,当我想查看手册页时,系统会说:
“你好,别忘了垃圾桶。”
的输出cat sh
是:
#!/bin/bash
spd-say "Hello, don't forget the trash bin. "
Run Code Online (Sandbox Code Playgroud)
无论如何,我可以做任何事情还是必须重新安装操作系统?
这里有一个希望很简单的方法,我不知道为什么添加新帐户并登录时 $ 上没有用户名?
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-23-generic-pae i686)
* Documentation: https://help.ubuntu.com/
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
You have mail.
$
Run Code Online (Sandbox Code Playgroud)