《私房菜》3rd 笔记1. 基础命令

====================基础命令======================================

---磁盘信息查看-----
df -h //statistic Flash
du 


---手册man---
man man
man -f
man 1 man 
man 7 man
man -k hwclock
whatis man //= man -f
apropos man //= man -k
makewhatis
info info // n p u 


---关机---

who //bofore shutdown:
netstat -a
ps -aux


sync
shutdown
reboot
halt
poweroff


shutdown -h now //time is 0
shutdonw -h 20:25 //20:25
shutdown -h +10 //10 minite later
shutdown -r now //reboot
shutdown -r +30 'The system will reboot'
shutdown -h 10 'I will shutdown after 10 mins'
shutdown -k now 'This system will reboot'
poweroff -f
halt
------执行等级-------
总共有7中运行等级
0: 关机
3:纯文本模式 
5:图形模式
6:重新启动


修改系统启动模式:
1、vim /etc/inittab
2、把id:5:initdefault:改成 id:3:initdefault:
3、reboot
如下命令也可以直接重启:
init 3
init 5


正确的关机方式:
一个linux服务器可能有多人在使用,不能简单关闭power
sync:将数据同步到磁盘 sync;sync;sync;最好多执行几次,只有root可以执行这个命令
shutdown:
reboot
halt
poweroff
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值