====================基础命令======================================
---磁盘信息查看-----
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
---磁盘信息查看-----
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