ubuntu启动、关闭、重启服务service命令
查看当前所有服务service --status-all结果如下:zwl@zwl-NB50TJ1-TK1:~$ service --status-all[ + ]acpid[ - ]alsa-utils[ - ]anacron[ + ]apparmor[ + ]apport[ + ]avahi-daemon[ + ]bluetooth[ - ]console-setup.sh[ + ]cron[
·
- 查看当前所有服务
service --status-all
结果如下:
zwl@zwl-NB50TJ1-TK1:~$ service --status-all
[ + ] acpid
[ - ] alsa-utils
[ - ] anacron
[ + ] apparmor
[ + ] apport
[ + ] avahi-daemon
[ + ] bluetooth
[ - ] console-setup.sh
[ + ] cron
[ + ] cups
[ + ] cups-browsed
[ + ] dbus
[ - ] dns-clean
[ + ] gdm3
[ + ] grub-common
[ - ] hwclock.sh
[ + ] irqbalance
[ + ] kerneloops
[ - ] keyboard-setup.sh
[ + ] kmod
[ + ] mysql
[ + ] network-manager
[ - ] networking
[ + ] openvpn
[ - ] plymouth
[ - ] plymouth-log
[ - ] pppd-dns
[ + ] procps
[ - ] pulseaudio-enable-autospawn
[ + ] redis-server
[ - ] rsync
[ + ] rsyslog
[ - ] saned
[ - ] speech-dispatcher
[ - ] spice-vdagent
[ + ] udev
[ + ] ufw
[ + ] unattended-upgrades
[ - ] uuidd
[ + ] whoopsie
[ - ] x11-common
- 查看指定服务(redis 服务为例)
service --status-all | grep redis
- 开启当前服务
#service 服务名 start
service nginx start
- 关闭当前服务
#service 服务名 stop
service nginx stop
- 重启当前服务
#service 服务名 restart
service nginx restart
- 查看当前服务状态
#service 服务名 status
service nginx status
更多推荐
已为社区贡献3条内容
所有评论(0)