Use the following procedure to enable a service. The service status change is recorded in the service configuration repository. Once the service is enabled, the enabled state will persist across system reboots if the service dependencies are met.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Determine whether service dependencies are satisfied.
If the service is enabled, then the service dependencies are satisfied. If not, use svcadm enable -r FMRI to recursively enable all dependencies.
# svcs -l FMRI|grep enabled |
Enable a service.
# svcadm enable FMRI |
The second command in this example enables the rlogin service. The third command shows that the state of the rlogin service instance is online.
# svcs -l network/login:rlogin|grep enabled enabled false # svcadm enable network/login:rlogin # svcs network/login:rlogin STATE STIME FMRI online 12:09:16 svc:/network/login:rlogin |
The following command enables rpcbind. The -t option starts the service in temporary mode which does not change the service repository. The repository is not writable in single-user mode. The -r option recursively starts all the dependencies of the named service.
# svcadm enable -rt rpc/bind |