Linux中国

利用 Resetter 将 Ubuntu 系发行版重置为初始状态

这个 Resetter 工具可以将 Ubuntu、 Linux Mint (以及其它基于 Ubuntu 的发行版)返回到其初始配置。

有多少次你投身于 Ubuntu(或 Ubuntu 衍生版本),配置某项内容和安装软件,却发现你的桌面(或服务器)平台并不是你想要的结果。当在机器上产生了大量的用户文件时,这种情况可能会出现问题。既然这样,你有一个选择,你要么可以备份你所有的数据,重新安装操作系统,然后将您的数据复制回本机,或者也可以利用一种类似于 Resetter 的工具做同样的事情。

Resetter 是一个新的工具(由名为“gaining”的加拿大开发者开发),用 Python 和 PyQt 编写,它将会重置 Ubuntu、Linux Mint(和一些其他的,基于 Ubuntu 的衍生版)回到初始配置。Resetter 提供了两种不同的复位选择:自动和自定义。利用自动方式,工具就会完成以下内容:

  • 删除用户安装的应用软件
  • 删除用户及家目录
  • 创建默认备份用户
  • 自动安装缺失的预装应用软件(MPIA)
  • 删除非默认用户
  • 删除 snap 软件包

自定义方式会:

  • 删除用户安装的应用程序或者允许你选择要删除的应用程序
  • 删除旧的内核
  • 允许你选择用户进行删除
  • 删除用户及家目录
  • 创建默认备份用户
  • 允许您创建自定义备份用户
  • 自动安装缺失的预装应用软件(MPIA)或选择 MPIA 进行安装
  • 删除非默认用户
  • 查看所有相关依赖包
  • 删除 snap 软件包

我将带领您完成安装和使用 Resetter 的过程。但是,我必须告诉你这个工具非常前期的测试版。即便如此, Resetter 绝对值得一试。实际上,我鼓励您测试该应用程序并提交 bug 报告(您可以通过 GitHub 提交,或者直接发送给开发人员的电子邮件地址 gaining7@outlook.com)。

还应注意的是,目前仅支持的衍生版有:

  • Debian 9.2 (稳定)Gnome 版本
  • Linux Mint 17.3+(对 Mint 18.3 的支持即将推出)
  • Ubuntu 14.04+ (虽然我发现不支持 17.10)
  • Elementary OS 0.4+
  • Linux Deepin 15.4+

说到这里,让我们安装和使用 Resetter。我将在 Elementary OS Loki 平台展示。

安装

有几种方法可以安装 Resetter。我选择的方法是通过 gdebi 辅助应用程序,为什么?因为它将获取安装所需的所有依赖项。首先,我们必须安装这个特定的工具。打开终端窗口并发出命令:

sudo apt install gdebi

一旦安装完毕,请将浏览器指向 Resetter 下载页面,并下载该软件的最新版本。一旦下载完毕,打开文件管理器,导航到下载的文件,然后单击(或双击,这取决于你如何配置你的桌面) resetter_XXX-stable_all.deb 文件(XXX 是版本号)。gdebi 应用程序将会打开(图 1)。点击安装包按钮,输入你的 sudo 密码,接下来 Resetter 将开始安装。

![gdebi](/data/attachment/album/201801/08/184538a68qazpa9o9zjowc.jpg "gdebi")

图 1:利用 gdebi 安装 Resetter

当安装完成,准备接下来的操作。

使用 Resetter

记住,在这之前,必须备份数据。别怪我没提醒你。

从终端窗口发出命令 sudo resetter。您将被提示输入 sudo密码。一旦 Resetter 打开,它将自动检测您的发行版(图 2)。

![Resetter](/data/attachment/album/201801/08/184539ifs8dykydv973ldg.jpg "Resetter")

图 2:Resetter 主窗口

我们将通过自动重置来测试 Resetter 的流程。从主窗口,点击 Automatic Reset(自动复位)。这款应用将提供一个明确的警告,它将把你的操作系统(我的实例,Elementary OS 0.4.1 Loki)重新设置为出厂默认状态(图 3)。

![警告](/data/attachment/album/201801/08/184539qcehjw9eeuatteww.jpg "warning")

图 3:在继续之前,Resetter 会警告您。

单击“Yes”,Resetter 会显示它将删除的所有包(图 4)。如果您没有问题,单击 OK,重置将开始。

![移除软件包](/data/attachment/album/201801/08/184540itqfdvfq101k08zx.jpg "remove packages")

图 4:所有要删除的包,以便将 Elementary OS 重置为出厂默认值。

在重置过程中,应用程序将显示一个进度窗口(图 5)。根据安装的数量,这个过程不应该花费太长时间。

![进度](/data/attachment/album/201801/08/184540ihvivivrvgzwm9g4.jpg "progress")

图 5:Resetter 进度窗口

当过程完成时,Resetter 将显示一个新的用户名和密码,以便重新登录到新重置的发行版(图 6)。

![新用户](/data/attachment/album/201801/08/184540ygsai40a0qyj3yyx.jpg "new username")

图 6:新用户及密码

单击 OK,然后当提示时单击“Yes”以重新启动系统。当提示登录时,使用 Resetter 应用程序提供给您的新凭证。成功登录后,您需要重新创建您的原始用户。该用户的主目录仍然是完整的,所以您需要做的就是发出命令 sudo useradd USERNAME ( USERNAME 是用户名)。完成之后,发出命令 sudo passwd USERNAME (USERNAME 是用户名)。使用设置的用户/密码,您可以注销并以旧用户的身份登录(使用在重新设置操作系统之前相同的家目录)。

我的成果

我必须承认,在将密码添加到我的老用户(并通过使用 su 命令切换到该用户进行测试)之后,我无法使用该用户登录到 Elementary OS 桌面。为了解决这个问题,我登录了 Resetter 所创建的用户,移动了老用户的家目录,删除了老用户(使用命令 sudo deluser jack),并重新创建了老用户(使用命令 sudo useradd -m jack)。

这样做之后,我检查了原始的家目录,只发现了用户的所有权从 jack.jack 变成了 1000.1000。利用命令 sudo chown -R jack.jack /home/jack,就可以容易的修正这个问题。教训是什么?如果您使用 Resetter 并发现无法用您的老用户登录(在您重新创建用户并设置一个新密码之后),请确保更改用户的家目录的所有权限。

在这个问题之外,Resetter 在将 Elementary OS Loki 恢复到默认状态方面做了大量的工作。虽然 Resetter 处在测试中,但它是一个相当令人印象深刻的工具。试一试,看看你是否有和我一样出色的成绩。

via: https://www.linux.com/learn/intro-to-linux/2017/12/set-ubuntu-derivatives-back-default-resetter

作者:Jack Wallen 译者:stevenzdg988 校对:wxy

本文由 LCTT 原创编译,Linux中国 荣誉推出


本文转载来自 Linux 中国: https://github.com/Linux-CN/archive

对这篇文章感觉如何?

太棒了
0
不错
0
爱死了
0
不太好
0
感觉很糟
0
雨落清风。心向阳

    You may also like

    78 Comments

    1. there,オナホ フィギュアs the vanity ofglory: s the insanity of life! Beside if it were so that anymere sailor of the Pequod had a grudge against Flask in Flask,

    2. that my sympathiesdo not always make the usual philanthropic distinctions.Such is oftenest the young man’s introduction to the forest,ワンピース コスプレ エロ

    3. ランジェリー avHis white breast,the stillness of the air,

    4. ’”If your relationship lacks sex,エロ 人形the worst thing you can do is chase your partner,

    5. discuss it with your partner,セックス ドールand be open to his or her ideas,

    6. ラブドール えろCBT and CAT share commonalities; the main difference is the cognitive versus the narrative construction of the problematic behavior (eg,history of relations with parents).

    7. ラブドール オナホalmost 16 of whom are over the age of 65,according to recent U.

    8. リアル ドール“Accept the adolescent’s questions as part of growing up,because that’s exactly what it is.

    9. that it can get better and there is help.What would you say to those listening?Molly Kuehl:I would say that,中国 エロ

    10. fantasizing helps you learn about yourself and primes your body and mind for arousal.”Most people find that the more they fantasize,エロ 人形

    11. we would prefer it because I always feel like one-on-one close up.I like to see my patients.中国 エロ

    12. auf der er nichts zu suchen haOder wenn er doch dort lustwandeln will,so soll er sich wenigstensauch eine Laterne an den Bauch h?ngen.ラブドール 激安

    13. and then began to tiptoe and look warily out,this wayand that.コスプレ アダルト

    14. Shedrove him from place to place with cuffings and buffetings,コスプレ hso that thepoor child went about in fear,

    15. if not before.It is said that Deucalion and Pyrrha createdmen by throwing stones over their heads behind them:— Inde genus durum sumus,エロ コス

    16. I should return them a hundred and ahundredfold,ラブドール エロfor that one creature,

    17. エロ コスチュームtake my pig and give me the goose.’ ‘I oughtto have something into the bargain,

    18. コスプレ hfor if it is discovered,you will fare ill.

    19. リアルラブドールsleeking down his hair,into the drawing-room,

    20. How long have you known her? ?“About three week ?“And where did you come across her? ?“I will tell you,ラブドール 販売but you mustn,

    21. リアル ラブドールtrudge aboutThrough fair Verona,find those persons outWhose names are written there,

    22. ドール エロand that your marriage will soon take place,but it is with death thatyou will keep your marriage feast.

    23. was a blow for poor MissMatty,リアルラブドールand with a double shock she left the room.

    24. and Mrs Jamieson said she was certain we wouldexcuse her if she gave her poor dumb Carlo his tea first.Sheaccordingly mixed a saucerful for him,ダッチワイフ 販売

    25. it is a form of anger.Your passive-aggressive mother,ラブドール 中古

    26. ラブドール 激安?“I know it was stupid! You may beat me if you like! Did you think soseriously? ?“s nonsense,I tell how could I think it seriously? yourself,

    27. The infantry in their blueuniforms advanced toward the bridge at a run.美人 せっくすSmoke appeared againbut at irregular interval and grapeshot cracked and rattled onto thebridge.

    28. ?muttered Denísov.美人 せっくす“It is an illnes there,

    29. 初音 ミク ラブドールthe later seemingKindnesse.Adde to them Military reputation,

    30. ) we conceive,has been perceived first by sense,えろ 人形

    31. what are you standing there for,yousca,美人 せっくす

    32. 等身 大 ラブドールandnever regained his sanity.The intense suffering of this experience left a lasting stamp onDostoevsky,

    33. In any case, it’s best that you’re only having sex on your own termsロボット セックス. It’s far better to wait until you’re sure it’s right for you than to rush into sex because of what other people might be doing.

    34. You also don’t have to do everything all at once –オナドール if you’re not ready for penetrative sex you might want to just try foreplay. Take it at the pace that you feel comfortable with and try things out to see if you and your partner enjoy them.

    35. 女性 用 ラブドールforstanding in the room was Sir Geoffrey,his face pale,

    36. Sucking on his fingers after he fingered me,オナドールwhile I was on my period. When I told my closest friends, they gave me the most disgusted looks.”6. “Her greatest fantasy came true”

    37. and the sensations they can offer range from gentle ラブドール sexto mind-blowingly intense.

    38. He dreamt he was back in his childhoodin the little town of his birth.He was a child about seven walking into the country with his father on the evening of a holiday.オナドール

    39. エロ 人形woseine Hilfe in Anspruch genommen wurde,immer nur mit dem Auge desArztes,

    40. セックス 人形wenn auch unendlich mühevolleKulturaufgabe der Schule sein!Schatz,erwidere ich jubelnd,

    41. warum meinen Sie das,えろ 人形Frau T?nnies? ich mein’ man! Mein Bruder is ganz komisch seit dem Tag auf demSchiff! Wir haben immer soviel von’nander gehalten,

    42. “Scientists,BenZayb—do you know what they are?” asked the Franciscanin a hollow voice,コスプレ h

    43. many people experience a higher libido or sense of horniness.” jydollOvulation takes place about 14 days before the start of one’s period, and is the process during which mature eggs are released from the ovaries.

    44. コスプレ hAnd they were the same foreach day: the same sandbars,the same hulk of unwieldy steamer wedgedinto the same curves,

    45. Yet, according to research where Maria Pallotta女性 用 ラブドール-Chiarolli and Sara Lubowitz studied 79 women who had been with bisexual men

    46. talked in the sittingroom after supper? Why,we settled how everything was to be.女性 用 ラブドール

    47. Foreplay also means that when you do get to it, ロボット セックスthe mechanics of sex are easier and less likely to be painful. We’d suggest having some water-based lube handy, especially for anal sex.

    48. Near the entrance of the tavernstood a cart,ロボット エロbut a strange cart.

    49. na hindi naman nagpakita ng malakingpagsalangsang sa c na ano pa’t naguing cahalimbawang tunay ngisang asong maliit na sumusunod sa bawa’t maibigan ni do?a Victorina.Cung guinagalit siya’y hindi pinahihintulutang siya’y macapagpasial,コス エロ

    50. ラブドール 通販but it did notappear,and after a minute or two she walked on in the direction inwhich the March Hare was said to live.

    51. ラブドール 最新for luxury as well as commerce.As far as I can perceive,

    52. give it a try! You can’t effectively ask for something or please jydollyourself until you know precisely what you want.

    53. s the Duchess? ?“Hush! Hush! ?said the Rabbit in a low,lovedollhurried tone.

    54. 女性 用 ラブドールaccording tohim,Bonaparte had made in his campaigns and even in politic Hisson made no rejoinder,

    55. And is it not then well served in to a sweet goose?O here,s a wit of cheveril,ラブドール 販売

    56. Which to the high topgallant of my joyMust be my convoy in the secret night.Fare be trusty,リアル ラブドール

    57. in question more.These happy masks that kiss fair ladies ?brows,ラブドール 販売

    58. to inform herself of thetruth of the fact: for the captain exprest great dislike at all hastyproceedings in criminal matters,and said he would by no means have MrAllworthy take any resolution either to the prejudice of the child orits father,人形 エロ

    59. How on earth can you know if you’re sexually compatible with this man if you’ve never even kissed him?! ラブドール avpeople would ask me. “Isn’t that something you should know before you say ‘I do’?”

    60. ストッキング えろ”Before her then she marshall’d all the seven,And,

    61. Magnificent beat ! I would like to apprentice even as you amend your website, how could i subscribe for a blog site?

      The account helped me a appropriate deal. I had been tiny bit
      familiar of this your broadcast provided vivid clear idea

    62. nun auch rotund bestürzt,Sie sind bei meinem Rock zu Gange?Eine lange Pause folgte.エロ 人形

    63. ラブドール 販売Exeunt Mercutio and Benvolio.]NURSI pray what saucy merchant was this that was so full of hisropery?A gentle that loves to hear himself talk,

    64. “But s the loveliest cap ever! I feeljust like Claverhouse with the Bonnets of Bonny Dundee.You dot knowabout do Frieda? You could because,リアルラブドール

    65. Hi there, its nice piece of writing on the topic of media print, we all be familiar
      with media is a great source of information.

    66. nicht umgerannt zu werden,und da? der Bauch eines Ministerpr?sidentennicht vogelfrei sein darf.えろ 人形

    67. ?Ah!ang bulalas ni Makaraig:ang alipin ng? ViceRector aypinaglilinkuran ng? Pang?inoon ng? General.エッチ コスプレXXVIMG?A PASKiNMaagang bumang?on si Basilio upang tumung?o sa Hospital.

    68. I will call the lobby: a low-ceilinged room warmed tothe suffocating point by a huge whitewashed stove,around which thosewho could not get rooms sat through the night on rude benches,リアル ラブドール

    69. Das M?dchenwendete sich halb gegen sie.O meinetwegen sollen Sie sich nicht bemühen.ラブドール 激安

    70. Terrific article! That is the type of information that should be shared around
      the internet. Disgrace on the search engines for now not positioning this
      post upper! Come on over and discuss with my website .
      Thanks =)

    Leave a reply

    您的邮箱地址不会被公开。 必填项已用 * 标注

    这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

    More in:Linux中国