The Solaris & Linux Professional Resource center
Tuesday June 27, 2017

Version Control
Disk Management
Cluster File systems
File systems
User Management
secure shell ssh
Packet Logger
Wireless setup
Text Editors
Service management
Useful Commands
Regular Expression
Useful Links
FadaSkeng.com the Solaris & Linux resource center

1. Command line equivalents depending on the distribution's package format.

Table 1
# pkg rpm dpkg
1. pkginfo -l SUNWapchr rpm -qai httpd dpkg -l
2. pkginfo -x SUNWapchr rpm -qa dpkg -l
3.pkginfo -p 'apache2' rpm -qpi 'httpd.rpm' dpkg -s 'apache2'
4. pkginfo -q rpm -q 'httpd' dpkg -l 'apache2'
5.pkgchk -v SMCrnameu rpm -qlp 'httpd.rpm' dpkg-deb -c 'apache2.deb'
6.pkgchk -lp /usr/local/bin/qcmdrpm -qf '/etc/apache2/httpd.conf' dpkg -S '/etc/apache2/apache2.conf'
7.pkgrm SMCrnameu rpm -e 'httpd' dpkg -r 'apache2'
8. pkgadd -d renameutils-0.11.0-sol10-x86-local rpm -i 'httpd.rpm' dpkg -i 'apache2.deb'
9. rpm --rebuilddb
10. rpm --querytags httpd
11. rpm -qa "*http*" dpkg -l "*apache*"
12. rpm -q --qf "%{INSTALLTIME}\n" apache2
13. rpm -qc apache2

Table 1. A description list of each equivalent command.

1. Detailed package listing of installed packages.
2.Extracted lists of packages. abbreviation, name, architecture on the system.
3.Verify whether a package is on the system and output it's version information.
4.Queries for a package and returns its exit status and version number.
5.Queries a package in your path and output its contents.
6.Verifies which package a particular file on the system belongs to.
7.Removes a package.
8. Install package.
9. Rebuild the RPM database.
10. List the metatags for a rpm.
11. Perform a regex search for a rpm.
12. Get the epoch install time for a rpm.
13. List the config files for a rpm.

Table 2
# pkg rpm dpkg zypper
1. pkg install yum install httpd apt-get install apache2 zypper instal apache2
2. pkg list apache yum list rpm* apt-cache show apache2 zypper list rpm*
3. pkg verify 'apache2' xxx xxx zypper verify apache2
4. pkginfo -q apache2 yum query httpd xxx
5.pkg info 'apache2' yum info httpd apt-cache zypper info apache2
6.pkg contents 'apache2' xxx xxx
7.pkg search 'apache2' yum search 'apache2' xxx zypper search apache2
8. pkg uninstall 'apache2' yum uninstall 'apache2' apt-get remove 'apache2' zypper remove apache2
9. pkg yum repolist apt-cache zypper listrepo

2. A description list of each equivalent command.

1. Install a package.
2.Show a readable record for the package.
3.verify whether all dependencies are still fulfilled and to repair missing dependencies.
4.Queries for a package and returns its exit status and version number.
5.Displays detailed information about the specified packages.
6.Verifies which package a particular file on the system belongs to.
7.Search performs a full text search on all available package lists.
8. Uninstall package.
9.Prints out detailed information about the priority selection of the named package.

Package management tools
zypper search rpm* yum list rpm* apt-cache search rpm* pkgutil -a | grep rpm
zypper remove apache2 yum remove httpd apt-get remove apache2 pkgutil -r httpd
zypper info rpm-build yum info rpm-build apt-cache show apache2 pkgutil -info httpd
zypper install apache2 yum install httpd apt-get install apache2 pkgutil -i httpd

#Solaris Service management
1. svcs -a svcs -l nfs/server svcs -a | grep ssh svcs -l ssh
2. svcadm refresh autofs svcadm restart autofs svcadm disable ssh svcadm enable ssh
3. svcadm refresh svcadm restart svcadm disable zypper instal apache2

#RH/Centos 1 - 6 Service management
1. service httpd status service httpd restart service httpd stop service reload httpd
2. chkconfig --level 35 httpd on chkconfig --list chkconfig --list httpd chkconfig httpd off
#RH/Centos 7 - Ubuntu => 15 Systemctl management
3. systemctl status httpd systemctl restart httpd systemctl stop httpd systemctl list-dependencies
4. systemctl enable httpd systemctl is-enabled httpd systemctl disable httpd systemctl disable httpd
All brands, products or company names are trademarks or registered trademarks of their respective companies