Solaris Command
System Information
Print system information
# prtconf
Check the memory
# prtconf | grep Memory
Swap administration, check swap size
# man swap
# swap -s
Describe instruction set architectures
# isainfo -kv
To find if the system is 32 bit or 64 bit
# isainfo -v
Packages
Extract from URL http://www.softpanorama.org/Solaris/Packages/index.shtml
All the software distributed as part of Solaris by Sun is released in package format. This includes all the standard shells and command sets. Packages clearly emerge as the preferred way of distributing software on Solaris specifically due to the following features:
Uniform package installation and removal interfaces (pkgadd and pkgrm) Ability to see exactly which (versions of) packages are installed on the system (pkgchk -l) Ability to verify the integrity of the contents of the package (pkgchk -p -l) Ability to specify package dependencies and/or incompatibilities (depend, compver) Ability to specify additional space requirements for the package (space) Ability to create custom, dynamic package installation and removal scripts (request, checkinstall, preinstall, postinstall; preremove, postremove, and Class Action scripts) It is possible to convert RPM to Solaris packages.
The most commonly used package management commands are:
pkgadd Adds a package to the target system. Only root can run "pkgadd" pkgrm Removes an installed package from a target system pkgchk Checks a file to determine from which package it was installed. In case you suspect unauthorized modification of the file you can check which package an installed file was extracted from by using the pkgchk command. pkginfo -- list of installed packages pkgadm Here is a list of typical commands used :
To add a package
# pkgadd -d
# pkgadd -d ., for example pkgadd -d . SFWsnort
To remove a package
# pkgrm
To get short description (info) on a package
# pkginfo -x
# pkginfo -l
To list all installed packages
# pkginfo
To list the files that constitute the package
# pkgchk -l
# pkgchk -l| grep Pathname # lists files only.
# pkgchk -d-l
To what package the file /usr/bin/ls belongs:
# pkgchk -lp /usr/bin/ls
or
# grep/var/sadm/install/contents
To find out what files are in a package
# grep/var/sadm/install/contents
To find out what runlevel you're in
# who -r
Services
Observing services, lets say sendmail service
#svcs -d network/smtp:sendmail
#svcs -p network/smtp:sendmail
X Applications
Clock
#/usr/openwin/bin/xclock