1.7 KiB
1.7 KiB
LPIC-1 102.4: Debian package management
Installing, inspecting, removing and purging packages, finding which
package owns a file, installing a downloaded .deb, and reconfiguring a
package.
Before you start
The lab makes sure mc and hello aren't installed (reset puts mc
back if you had it), and sets the time zone to UTC if it's Europe/Berlin
already (reset puts the old one back). Write answers to the files in
/root/lab-answers/.
Tasks
- Install
mcwithapt-get, list its files withdpkg -L, check its status withdpkg -s, then remove it and purge it, checkingdpkg -lafter each step. - Find which package provides
/usr/bin/ls, then try/bin/lsand see why it fails. Then useapt-fileto find which package would provide theabcommand, which you don't have yet. Write the package that owns/usr/bin/lson line 1 of/root/lab-answers/2, and the package withabon line 2. - Download the
hellopackage withapt-get downloadin/root, list its contents withdpkg -c, and install it withdpkg -i. - Run
dpkg-reconfigure tzdataand change the time zone to Europe/Berlin.
Hints
dpkg -l mcshowsiiwhile it's installed.mchas configuration files (dpkg -slists them underConffiles:), so it showsrcafterapt-get remove, and disappears withapt-get purge. A package without any, such ascowsay, is gone afterremove.dpkg -S;/binis a symlink tousr/bin, and the package lists the file only under/usr/bin.apt-get install apt-file,apt-file update,apt-file search bin/ab.apt-get download hello,dpkg -c,dpkg -i.timedatectl,ls -l /etc/localtime,cat /etc/timezone.