Solaris > Add / Install new software packages

Package can be install from CDROM, Network i.e. NFS or downloading from Internet and then add it to system, or from existing location such as /var/spool/pkg directory if frequently required packages are copied to this location.

Solaris: Adding package from CDROM
1) Mount cdrom

2) To add or install GNU tar package from Solaris CD use command
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product SUNWgtar

-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
SUNWgtar: Package name

Solaris: Adding packages to spool directory and then install them
1) Copy package to /var/spool/pkg directory first:
# pkgadd -d /cdrom/cdrom0/Solaris_9/Product -s /var/spool/pkg SUNWgtar
Transferring package instance

-d /cdrom/cdrom0/Solaris_9/Product: Specify package directory
-s /var/spool/pkg : Directory in which package will get stored
SUNWgtar: Package name

2) Install the packages copied to spool directory
# pkgadd SUNWgtar

Solaris: Install downloaded package
1) If your package is in .bz2 format then first uncompress it using bunzip2 command:
# bunzip2 Packagname.bz2

2) Install package:
# pkgadd –d Packagname

Note .bz2 extension will automatically removed by first command.

For example if your package name is SFWqt.bz2
# buzip2 SFWqt.bz2
# pkgadd –d SFWqt

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
11 comments… add one
  • Rodrigo Pichinual Apr 10, 2013 @ 15:31

    Good blog

    I have a doubt
    How to mount CD of Solaris???


  • friend142 Aug 30, 2012 @ 4:28

    if we add packages from pkgadd command where is it goes? I mean /usr/bin or any other dir?

  • joshy Dec 7, 2011 @ 2:51

    if i want to add additional software….same method is enough or any difference….how i execute that softwares

  • saurabh ahuja Jul 4, 2011 @ 10:16

    well .pkg directly worked fine with “pkgadd -d .pkg . Thanks

  • saurabh ahuja Jul 4, 2011 @ 10:10

    well that is good for zipped files what about .pkg downloaded from internet? How can i install it?

  • ankit Nov 29, 2009 @ 14:49

    can you tell me how to install drives in opensolaris

  • naresh Apr 26, 2009 @ 6:04

    pkgadd –d . SFWqt

    It means package is in current directory

  • naresh Apr 26, 2009 @ 6:02

    if you want to use the current directory use ( . ) dot after -d option. then it recognizes to look in current directory

  • 🐧 nixcraft Mar 13, 2005 @ 15:11

    pkgadd –d SFWqt

    It means package is in current directory which was downloaded from ftp/http sites

    • yatender Feb 25, 2011 @ 3:05

      by this we get an error. if we want to use d option then we use . option it show that we are use the current location directory

  • Srki Mar 3, 2005 @ 15:45


    # pkgadd –d SFWqt

    When is allowed not to use
    directory name with -d option?

    — package located in a current directory or
    there is some other exception ?

    How generally pkgadd interprets -d option with or without directory name –
    when only package name is listed?


Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @