系統(tǒng)命令
shutdown -h now 立刻關(guān)機
shutdown -h 20:25 系統(tǒng)在 20:25 分會關(guān)機
shutdown -h +10 十分鐘后自動關(guān)機
shutdown -r now 立刻重啟
shutdown -r +30 '系統(tǒng)即將重啟' 30分鐘重啟系統(tǒng),并顯示后面的信息給所有在在線的使用者
reboot 立刻重啟(使用權(quán)限:root用戶)
防火墻
永久關(guān)閉
開啟: chkconfig iptables on
關(guān)閉: chkconfig iptables off
即刻生效
開啟: service iptables start
關(guān)閉: service iptables stop
開啟部分端口號
vim /etc/sysconfig/iptables
添加想要開啟的相關(guān)端口
-A INPUT -m state --state NEW -m tcp -p tcp --dport xxxx -j ACCEPT
刷新重啟
service iptables restart
賦值可執(zhí)行文件權(quán)限
chmod u+x xx.sh
tail
tail -f xxx.log 循環(huán)讀取日志文件
同步時間
yum -y install ntp ntpdate
ntpdate cn.pool.ntp.org
修改主機名稱
vim /etc/sysconfig/network
修改 HOSTNAME=主機名稱
檢查是否開機啟動
chkconfig --list | grep 檢查項
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。