Become superuser.
Stop the system service.
# /etc/init.d/filename stop |
Restart the system service.
# /etc/init.d/filename start |
Verify that the service has been stopped or started.
# pgrep -f service |
For example, you can stop the NFS server daemons by typing the following:
# /etc/init.d/nfs.server stop # pgrep -f nfs # |
Then, you can restart the NFS server daemons by typing the following:
# /etc/init.d/nfs.server start # pgrep -f nfs 141 143 245 247 # pgrep -f nfs -d, | xargs ps -fp daemon 141 1 40 Jul 31 ? 0:00 /usr/lib/nfs/statd root 143 1 80 Jul 31? 0:01 /usr/lib/nfs/lockd root 245 1 34 Jul 31 ? 0:00 /usr/lib/nfs/nfsd -a 16 root 247 1 80 Jul 31 ? 0:02 /usr/lib/nfs/mountd |