Di lingkungan sistem operasi Unix, aplikasi (software) dikenal sebagai package (paket). Masing-masing varian Unix punya cara sendiri-sendiri untuk menampilkan daftar paket yang terinstal. Artikel ini saya tulis sebagai catatan untuk mengingat-ingat aneka macam cara menampilkan daftar paket di beberapa varian Unix.
Di Solaris 10 misalnya saya ingin melihat paket Wireshark saya menggunakan perintah pkginfo
. Karena di Solaris 10 penamaan paket cukup unik, saya perlu melihat dulu apa nama paket yang terdaftar.
root@fda05:/# cat /etc/release Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved. Assembled 23 August 2011 root@fda05:/# root@fda05:/# pkginfo | grep -i wireshark application SMCwires wireshark root@fda05:/#
Dari hasil pkginfo
di atas, saya bisa lihat bahwa nama paket Wireshark adalah SMCwires
. Lalu saya bisa cari detil informasi tentang paket SMCwires
menggunakan perintah yang sama seperti berikut ini :
root@fda05:/# pkginfo -l SMCwires PKGINST: SMCwires NAME: wireshark CATEGORY: application ARCH: sparc VERSION: 1.6.8 BASEDIR: /usr/local VENDOR: Gerald Combs et al PSTAMP: Steve Christensen INSTDATE: Jul 30 2012 03:08 EMAIL: steve@smc.vnet.net STATUS: completely installed FILES: 518 installed pathnames 7 shared pathnames 33 directories 134 executables 266776 blocks used (approx) root@fda05:/#
Dengan menggunakan opsi -l
saya bisa lihat versi paket yang terinstal, lokasi instalasi, dsb. Meskipun saya tahu lokasi paket tersebut ada di /usr/local
, saya masih belum tahu file apa saja yang dimiliki oleh paket SMCwires
. Untuk memeriksa file apa saja yang dimiliki oleh paket tersebut saya bisa menggunakan perintah pkgchk
seperti berikut ini :
root@fda05:/# pkgchk -v SMCwires /usr/local/bin /usr/local/bin/capinfos /usr/local/bin/dftest /usr/local/bin/dumpcap /usr/local/bin/editcap /usr/local/bin/idl2wrs /usr/local/bin/mergecap /usr/local/bin/randpkt /usr/local/bin/rawshark /usr/local/bin/text2pcap /usr/local/bin/tshark /usr/local/bin/wireshark /usr/local/doc /usr/local/doc/wireshark ... ... ... /usr/local/share/wireshark/tpncp /usr/local/share/wireshark/tpncp/tpncp.dat /usr/local/share/wireshark/tshark.html /usr/local/share/wireshark/wimaxasncp /usr/local/share/wireshark/wimaxasncp/dictionary.dtd /usr/local/share/wireshark/wimaxasncp/dictionary.xml /usr/local/share/wireshark/wireshark-filter.html /usr/local/share/wireshark/wireshark.html /usr/local/share/wireshark/ws.css root@fda05:/#
Hasil perintah pkgchk
tadi cukup panjang sehingga saya hanya tampilkan bagian awal & akhirnya saja.
Solaris 11 menggunakan pendekatan yang berbeda untuk menginvetarisir paket-paketnya. Kita perlu menggunakan perintah pkg list
untuk melihat daftar paket yang terinstal di mesin Solaris 11. Misalnya seperti contoh berikut ini :
root@host02:/# cat /etc/release Oracle Solaris 11.1 SPARC Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved. Assembled 19 September 2012 root@host02:/# root@host02:/# pkg list | grep wireshark diagnostic/wireshark 1.8.9-0.175.1.11.0.4.0 i-- diagnostic/wireshark/tshark 1.8.9-0.175.1.11.0.4.0 i-- diagnostic/wireshark/wireshark-common 1.8.9-0.175.1.11.0.4.0 i-- root@host02:/#
Kalau di Solaris 10 kita menggunakan pkginfo
di Solaris 11 kita menggunakan perintah pkg info
(dengan spasi) untuk menampilkan detil informasi tentang suatu paket.
root@host02:/# pkg info wireshark Name: diagnostic/wireshark Summary: Graphical network protocol analyzer Category: Applications/Internet State: Installed Publisher: solaris Version: 1.8.9 Build Release: 5.11 Branch: 0.175.1.11.0.4.0 Packaging Date: Thu Sep 05 15:59:08 2013 Size: 2.86 MB FMRI: pkg://solaris/diagnostic/wireshark@1.8.9,5.11-0.175.1.11.0.4.0:20130905T155908Z root@host02:/#
Untuk melihat semua file yang dimiliki oleh Wireshark, Solaris 11 menyediakan perintah pkg contents
seperti contoh di bawah ini :
root@host02:/# pkg contents wireshark PATH usr usr/sbin usr/sbin/wireshark usr/share usr/share/applications usr/share/applications/wireshark.desktop usr/share/man usr/share/man/man1 usr/share/man/man1/wireshark.1 usr/share/pixmaps usr/share/pixmaps/wireshark.png root@host02:/#
FreeBSD menggunakan perintah yang mirip dengan Solaris 11 untuk menampilkan informasi tentang suatu paket :
root@testbsd:~ # uname -a FreeBSD testbsd 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 root@testbsd:~ # root@testbsd:~ # pkg_info | grep wireshark wireshark-1.10.1 Powerful network analyzer/capture tool root@testbsd:~ # pkg_info -L wireshark-1.10.1 Information for wireshark-1.10.1: Files: /usr/local/man/man1/capinfos.1.gz /usr/local/man/man1/editcap.1.gz /usr/local/man/man1/mergecap.1.gz /usr/local/man/man1/rawshark.1.gz /usr/local/man/man1/text2pcap.1.gz /usr/local/man/man1/dftest.1.gz /usr/local/man/man1/randpkt.1.gz /usr/local/man/man1/reordercap.1.gz /usr/local/man/man1/wireshark.1.gz /usr/local/man/man1/dumpcap.1.gz /usr/local/man/man1/tshark.1.gz /usr/local/man/man4/wireshark-filter.4.gz /usr/local/bin/capinfos /usr/local/bin/dftest /usr/local/bin/dumpcap /usr/local/bin/editcap /usr/local/bin/wireshark /usr/local/bin/mergecap /usr/local/bin/randpkt /usr/local/bin/rawshark /usr/local/bin/reordercap /usr/local/bin/tshark /usr/local/bin/text2pcap ... ... ... /usr/local/share/wireshark/tshark.html /usr/local/share/wireshark/text2pcap.html /usr/local/share/wireshark/tpncp/tpncp.dat /usr/local/share/wireshark/wimaxasncp/dictionary.dtd /usr/local/share/wireshark/wimaxasncp/dictionary.xml /usr/local/share/wireshark/wireshark-filter.html /usr/local/share/wireshark/wireshark.html /usr/local/share/wireshark/ws.css /usr/local/share/applications/wireshark.desktop root@testbsd:~ #
Sementara di Ubuntu Linux (atau Debian) kita bisa menggunakan perintah dpkg -l
untuk menampilkan semua paket yang terinstal.
ttirtawi@gbt733:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.10 Release: 12.10 Codename: quantal ttirtawi@gbt733:~$ ttirtawi@gbt733:~$ dpkg -l | grep wireshark ii libwireshark-data 1.8.2-2 all network packet dissection library -- data files ii libwireshark2 1.8.2-2 i386 network packet dissection library -- shared library ii wireshark 1.8.2-2 i386 network traffic analyzer - GTK+ version ii wireshark-common 1.8.2-2 i386 network traffic analyzer - common files ttirtawi@gbt733:~$
Informasi semua file yang dimiliki suatu paket dapat diperoleh dengan menjalankan perintah dpkg -L
seperti contoh di bawah ini :
ttirtawi@gbt733:~$ dpkg -L wireshark /. /usr /usr/share /usr/share/applications /usr/share/applications/wireshark.desktop /usr/share/man /usr/share/man/man1 /usr/share/man/man1/wireshark.1.gz /usr/share/doc /usr/share/doc/wireshark /usr/share/doc/wireshark/copyright /usr/share/pixmaps /usr/share/pixmaps/wsicon32.xpm /usr/share/icons /usr/share/icons/hicolor /usr/share/icons/hicolor/scalable /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/scalable/apps/wireshark.svg /usr/share/icons/hicolor/48x48 /usr/share/icons/hicolor/48x48/apps /usr/share/icons/hicolor/48x48/apps/wireshark.png /usr/share/menu /usr/share/menu/wireshark /usr/bin /usr/bin/wireshark /usr/share/doc/wireshark/README.Debian /usr/share/doc/wireshark/changelog.Debian.gz ttirtawi@gbt733:~$
Fedora Linux atau distro berbasis Red Hat umumnya menggunakan perintah rpm
untuk segala hal yang berkaitan dengan paket-paket aplikasinya. Misalnya pada contoh di bawah ini, di Fedora 16 saya bisa menggunakan perintah rpm -qa
untuk menampilkan semua paket yang terintal :
ttirtawi@appliance:~$ lsb_release -a LSB Version: :core-4.0-ia32:core-4.0-noarch Distributor ID: Generic Description: Generic release 16 (Generic) Release: 16 Codename: Generic ttirtawi@appliance:~$ ttirtawi@appliance:~$ rpm -qa | grep -i wireshark wireshark-1.6.10-1.fc16.i686 ttirtawi@appliance:~$
Sama seperti contoh-contoh sebelumnya, untuk menampilkan informasi tentang semua file yang dimiliki oleh Wireshark saya bisa menggunakan perintah rpm -ql
seperti ditunjukkan pada contoh di bawah ini :
ttirtawi@appliance:~$ rpm -ql wireshark ... ... ... /usr/sbin/capinfos /usr/sbin/dftest /usr/sbin/dumpcap /usr/sbin/editcap /usr/sbin/mergecap /usr/sbin/randpkt /usr/sbin/rawshark /usr/sbin/text2pcap /usr/sbin/tshark ... ... ... ... /usr/share/wireshark/rawshark.html /usr/share/wireshark/services /usr/share/wireshark/smi_modules /usr/share/wireshark/text2pcap.html /usr/share/wireshark/tpncp /usr/share/wireshark/tpncp/tpncp.dat /usr/share/wireshark/tshark.html /usr/share/wireshark/wimaxasncp /usr/share/wireshark/wimaxasncp/dictionary.dtd /usr/share/wireshark/wimaxasncp/dictionary.xml /usr/share/wireshark/wireshark-filter.html /usr/share/wireshark/wireshark.html /usr/share/wireshark/ws.css ttirtawi@appliance:~$ rpm -qa | grep -i wireshark wireshark-1.6.10-1.fc16.i686 ttirtawi@appliance:~$
Usefull post, i am able to search my gcc now
# pkgchk -v SUNWgcc
/usr
/usr/sfw
/usr/sfw/bin
/usr/sfw/bin/c++
/usr/sfw/bin/cpp
/usr/sfw/bin/g++
/usr/sfw/bin/gcc
klo untuk melihat dependency aplikasi ada d package mana saja gmn y
thx