分类: LINUX
2011-05-28 01:58:59
CODE: root@debian ~# apt-get install debootstrap |
CODE: root@debian ~# mkdir /root/chroot_env root@debian ~# debootstrap sarge /root/chroot_env I: Retrieving Release I: Retrieving Packages I: Validating Packages I: Resolving dependencies of required packages... I: Resolving dependencies of base packages... I: Found additional required dependencies: libtext-iconv-perl zlib1g I: Checking component main on ... I: Retrieving adduser I: Validating adduser I: Retrieving apt I: Validating apt .... I: Installing core packages... I: Unpacking required packages... I: Configuring required packages... I: Installing base packages... I: Base system installed successfully. root@debian ~# |
CODE: root@debian ~# chroot /root/chroot_env root@debian /# ls bin dev home lib mnt proc sbin sys usr boot etc initrd media opt root srv tmp var root@debian /# apt-get clean root@debian /# du -sh 111M . |
CODE: root@debian /# mount -t proc proc /proc root@debian /# ps -aef # 将显示主机的所有进程 ... root@debian /# hostname # 将显示当前主机名而非新系统主机名 redice |