Ubuntu Desktop 4.2: Debs and snaps
Telling a deb from a snap, replacing a deb with the snap of the same program while keeping its settings, and getting a removed snap's data back from its snapshot.
Before you start
The lab changes nothing, but checks that the htop snap isn't installed.
Reset puts the htop deb back if you had it (on Ubuntu Server, removing
it also removes the ubuntu-server metapackage; reset puts that back
too). The VM needs to reach the snap store. Write answers to the files in
/root/lab-answers/.
Tasks
- Find out whether Firefox on this machine is a deb or a snap. Write
deb,snapornone(if it isn't installed, as on a server) to/root/lab-answers/1. - Install the htop deb, give it a setting (in htop, F2 Setup, Display options, turn on Tree view, then quit with F10), then replace it with the snap, keeping the setting.
- Remove the htop snap and get its data back.
Hints
dpkg -l firefoxshows the transitional1snap1version, a real version, or nothing;snap list firefox.- The deb keeps its settings in
~/.config/htop/htoprc. A snap sees its own home folder,~/snap/htop/current/, which exists once you've run the snap. Copy the file to~/snap/htop/current/.config/htop/. snap remove htopsaves a snapshot of its data;snap saved,snap install htop,snap restore SET. Thenls ~/snap/htop/*/.config/htop/showshtoprcagain.