克隆 Ubuntu 安装程序

原文链接:Cloning your Ubuntu Installation

对于两台以上的不同配置的机器,对于初学者来说(我也算,呵呵)想要每台机器安装同样的软件是非常麻烦的事情。下面在这篇文章中原作者提供了一种简单的方式解决了这个问题,核心思路为:如何把一台 Ubuntu 的已安装包列表导出并把它们导入到到其他机器的 Ubuntu 系统之中。

复制系统软件源文件
复制 /etc/apt/sources.list 文件到U盘(或其他移动设备)上面。

导出已安装包列表

1
2
$ dpkg --get-selections | grep '[[:space:]]install$' | \\
awk '{print $1}' > ~/package.list

复制 package.list 文件到U盘(或其他移动设备)上面。

设置目标系统
更新软件包列表,以确保获得最新版本的软件包

1
$ apt-get update

导入包列表

1
$ cat ~/package.list | xargs apt-get install

完成!所有包列表的程序都会导入到新的系统当中,但这并不意味着所有的设置已经克隆。为了完成这一点,您可能会需要从 /etc 目录复制配置文件。

This entry was posted in How-To and tagged , . Bookmark the permalink.

2 Responses to 克隆 Ubuntu 安装程序

  1. Elton Disney says:

    Ubuntu的软件下载是个麻烦事,能像这样克隆软件的话,就方便多了
    谢了

  2. 清隐子 says:

    我也在用ubuntu的说。不错。

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>