如何重新安装/bin/sh

如何重新安装/bin/sh

我不小心删除了/bin/sh,我正在尝试重新安装它。
如果我sh在终端输入,它会说

The program 'sh' can be found in the following packages:
 * bash
 * dash

如果我尝试apt-get install bash,我会得到

bash is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 109 not upgraded.

那么,我该怎么回去呢/bin/sh

答案1

尝试sudo ln -s dash /bin/sh。 “dash”包应该已经在其安装后例程中设置了此符号链接。

答案2

你可以做

apt-get --reinstall install bash

相关内容