- فرض کنید یک بسته را مد نظر دارید. مثلا rdesktop
- نمیدونید که این بسته بر روی سیستم نصب است یا نه و می خواهید این موضوع را متوجه شوید.
- همچنین می خواهید بدانید که چه نسخه ای از این بسته بر روی سیستم نصب است.
- برای این منظور :
|
1 |
# <span style="color: #ff0000;"><strong>apt list</strong></span> rdesktop -a |
- نکته: ممکن است از یک بسته، نسخههای مختلف درون مخزن موجود باشد. با استفاده از سویچ a- تمام نسخهها را مشاهده میکنیم. خروجی مشابه :
|
1 2 |
Listing... Done rdesktop/stable,now 1.8.6-2 amd64 [installed] |
- نکته: در دستور بالا میتوان از کارکتر ستاره نیز استفاده کرد. (در صورتی که نام کامل بسته را ندانیم)
- راهکار دیگر استفاده از سویچ show میباشد.
- این کار باعث میشود جزییات بیشتری از بسته نمایش داده شود.
- به عنوان مثال :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
root@Buster:~# <strong><span style="color: #ff0000;">apt show</span></strong> lshw Package: lshw Version: 02.18.85-0.1 Priority: optional Section: utils Maintainer: Ghe Rivero <ghe@debian.org> Installed-Size: 781 kB Depends: libc6 (>= 2.27), libgcc1 (>= 1:3.0), libstdc++6 (>= 5.2) Recommends: pciutils, usbutils Homepage: https://github.com/lyonel/lshw Tag: admin::hardware, hardware::detection, implemented-in::c++, interface::commandline, interface::graphical, interface::x11, role::program, scope::utility, use::viewing, works-with-format::html, works-with-format::xml, works-with::text, x11::application Download-Size: 254 kB <span style="color: #ff0000;"><strong>APT-Manual-Installed: yes</strong></span> APT-Sources: http://deb.debian.org/debian buster/main amd64 Packages Description: information about hardware configuration A small tool to provide detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 systems, on some PowerPC machines (PowerMac G4 is known to work) and AMD64. . Information can be output in plain text, HTML or XML. |
- نکته: به متن قرمز خروجی بالا توجه کنید. در صورتی که بسته بر روی سیستم نصب باشد، ظاهر میشود.
- نکته: همانند دستور قبل ، میتوان از سویچ a- استفاده نمود.
- راه کار بعدی استفاده از ابزار apt-cache به شکل زیر میباشد :
|
1 2 3 4 5 6 7 8 |
root@Buster:~# <strong><span style="color: #ff0000;">apt-cache policy</span></strong> rdesktop rdesktop: Installed: 1.8.6-2 Candidate: 1.8.6-2 Version table: *** 1.8.6-2 500 500 http://deb.debian.org/debian buster/main amd64 Packages 100 /var/lib/dpkg/status |
- تست شده بر روی ubuntu 18.04