computer_knowledge_notes/Software/_系统工具/chroot.md

18 lines
292 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#### 简介
以新目录为根目录执行命令
```bash
chroot [options] <root-dir> [<command> [args]]
```
#### 问题解决
1
问题描述:`can't execute '/bin/sh': No such file or directory`
原因分析要切换过去的目录里没bin/sh
解决方法:`cp /bin/bash bin/sh`