linux - 使用 `chroot` : Why do I get error from running `sudo chroot/bin/bash` ?

标签 linux shell command

Using chroot: Why do I get error from running sudo chroot /bin /bash ?

我从文档中了解到 chroot 应该执行 /bin/bash 并且 /bin 是该命令的新根目录。

为什么会出现错误?

这是终端输出:

nlykkei@nlykkei-ThinkPad-X200s ~ $ sudo chroot /bin /bash
[sudo] password for nlykkei: 
chroot: failed to run command ‘/bash’: No such file or directory

我正在运行 Linux Mint 17 64 位。

最佳答案

你的意思可能是 sudo chroot/bin/bash 没有空格。如果您有空格,linux 会将您的命令解释为 1 个程序和 2 个参数,而 chroot 命令只需要 1 个参数。

关于linux - 使用 `chroot` : Why do I get error from running `sudo chroot/bin/bash` ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31986682/

相关文章:

c - 在构建 libc(和其他库)时,GCC 的版本有多重要?

linux - 为什么 `change_protection` 在将大量数据加载到 RAM 中时会占用 CPU?

linux - 通过 inode 连接文件

linux - 为命令行 Linux 创建可执行文件

linux - 从文件中获取一行并将其作为列添加到另一个文件中

linux - 如何在 Linux 中获取文件中恰好包含 3 个字符的行

bash - 递归清空多个文件的命令

android - USBDevice 无法识别 Linux 计算机

iphone - shell-write 命令问题 - 如何通过终端将 "key"添加到 plist 文件? (iPhone、移动终端)

Java执行debian终端命令 "|"