Install Ubuntu without changing the system settings

Source: Internet
Author: User
Re-install or upgrade the system? Every time a new Ubuntu version is released, every Ubuntu user usually faces such a choice. Re-installation may be better, but won't the previously installed programs and configurations be lost? How can I install the new Ubuntu version while maintaining the existing system configuration? Note: The parameters after the dpkg command are preceded by two minus signs "-". Step 1: Back up the current system. 1. Back up all the content in the/home directory to another partition or your mobile hard disk. We recommend that you type the/home directory first.

Re-install or upgrade the system? Every time a new Ubuntu version is released, every Ubuntu user usually faces such a choice. Re-installation may be better, but won't the previously installed programs and configurations be lost? How can I install the new Ubuntu version while maintaining the existing system configuration?

Note: The parameters after the dpkg command are preceded by two minus signs "-". Step 1: Back up the current system.

1. Back up all the content in the/home directory to another partition or your mobile hard disk.

We recommend that you package the/home directory and then back up the directory so that you can save the original directory structure and permissions. Copying is faster.

Note: Do not forget the hidden file during backup. You can use Ctrl + h to display the hidden file.

2. Run the following command to list the software installed in the backup system:

Sudo dpkg -- get-selections> ~ /Desktop/package. selections

In this way, the Software List will appear on the desktop, find a safe place to back up.

3. Use the 1 method to back up the content in the/etc folder. If the system settings have not been changed, you can not back up this folder. If the system's default source is not used, back up and upgrade the source/etc/apt/sources. list. (Of course, sources. list can be easily found on the Internet without backup)

Step 2: Install Ubuntu.

Step 3: restore the system configuration.

1. first, modify the sources of the backup. the Ubuntu version code in the list file. If the previous system is 8.04 and the current system is 8.10, the sources. replace the hard in the list file with intrepid, and then replace the current sources of the system. list file. Refresh the Software List:

Sudo apt-get update

2. Restore the installation software and upgrade the system. Copy the previously backed up package. selections file to the desktop, and then run the following command:

Sudo dpkg -- set-selections <~ /Desktop/package. selections & apt-get dselect-upgrade

3. Restore the/home and/etc folders of the backup (also do not forget to hide the files ).

So far, it is complete to reinstall Ubuntu while maintaining the system configuration!

Conclusion: Use the get-selections and set-selections parameters of the dpkg command and a simple copy operation to back up and restore system configurations.

Promotion: If you want to install the same software for multiple Ubuntu instances, You can first install one of them, and then export the Software List from dpkg-get-selections to dpkg-set-selections… on other systems ......

This article is based on the Howto: Fresh Ubuntu Install Without Losing Your Current Settings translation.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.