Print the basename of the currently running kernel:
$ kcpath -b
vmunix
Print the directory containing the currently running kernel:
$ kcpath -d
/stand/current
Print the pathname of the currently running kernel executable:
$ kcpath -x
/stand/current/vmunix