[转载验证]快速重装ubuntu系统所有软件的方法

本文介绍了一种在Ubuntu系统中备份已安装软件的方法,并提供了如何使用这些备份文件进行软件恢复的步骤。通过简单的命令行操作即可完成软件列表的备份与恢复。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

得到已安装软件列表文件

dpkg -–get-selections | grep -v deinstall > ubuntu.files

保存在另一个分区或者gmail邮箱之类安全的地方。下次重装ubuntu 的时候,执行

sudo apt-get update
sudo apt-get dist-upgrade
dpkg -–set-selections < ubuntu.files

以下步骤并未自己试验,不敢妄语,特摘原文如下:

Now you’ve told your system what it needs to install, so let’s install it all.

sudo dselect

This will open up a dselect session. Type ‘I‘ and allow dselect to install of the the packages listed in your ubuntu-files document. When it’s finished, type ‘Q‘ and hit the ENTER key to exit dselect.

Now you’re a lot closer to where you were before.

这个命令直接将该列表文件发到邮箱中

dpkg -–get-selections | grep -v deinstall > ubuntu-files; cat ubuntu-files | mailx -s “ubuntu-files” 自己的email地址
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值