Ubuntu在默认情况下禁用了root用户,用户可以通过sudo命令来提升权限,运行管理任务。
小技巧:
你只要输入 sudo su 命令 即可变为 root 身份,获得 root 提示符。
二、服务操作(以apache为例)
(1)Red Hat
启动服务: service httpd start 停止服务: service httpd stop 服务随系统自启动:chkconfig httpd on 禁止服务自启动: chkconfig httpd off
(2)Ubuntu
启动服务: /etc/init.d/apache start 停止服务: /etc/init.d/apache stop 服务随系统自启动:update-rc.d apache defaults 禁止服务自启动: update-rc.d apache purge
(3)Ubuntu(安装sysvconfig和sysv-rc-conf)
启动服务: service apache start 停止服务: service apache stop 服务随系统自启动:sysv-rc-conf apache on 禁止服务自启动: sysv-rc-conf apache off