Welcome to Machine Unix

Search Below

How to Tell If the Solaris Zone is a Whole Root or Sparse Zone?

If you are logged in to a Solaris Zone, how can you tell if the zone is whole root or not? One easy way to tell is to use pkgcond and echo commands together:

# pkgcond is_whole_root_nonglobal_zone
# echo $?
0

When the echo returns “0”, then you know that the zone is a whole root zone. Similarly, if you were to run the following in the same zone:

# pkgcond is_sparse_root_non_global_zone
# echo $?
1

Now you get “false” for sparse zone.