linux 重啟reboot和init 6之間的區別
Init 6是重新啟動機器。
reboot也是重新啟動機器。
那麼這兩個命令到底有什麼區別呢?
對這兩個操作使用man命令看到的內容如下:
"init 6" 基於一系列/etc/inittab檔案,並且每個應用都會有一個相應shutdown指令碼。
'init 6' 呼叫一系列shutdown指令碼(/etc/rc0.d/K*)來使系統優雅關機;
'reboot'並不執行這些過程,reboot更是一個kernel級別的命令,不對應用使用shutdown指令碼。 .
我們應該在通常情況下使用 init 6.
reboot - reboot performs a sync(1M) operation on the disks, and then a
multi- user reboot is initiated. See init(1M) for details.
init 6 Stop the operating system and reboot to the
state defined by the initdefault entry in
/etc/inittab.
在出問題的狀況下或強制重啟時使用reboot
相關推薦
linux 重啟reboot和init 6之間的區別
init命令用於改變作業系統的執行級別。Init 6是重新啟動機器。reboot也是重新啟動機器。那麼這兩個命令到底有什麼區別呢?對這兩個操作使用man命令看到的內容如下:"init 6" 基於一系列/etc/inittab檔案,並且每個應用都會有一個相應shutdown指令碼。'init 6' 呼叫一系列s
linux重啟和關閉系統命令
重啟命令: 1、reboot 2、shutdown -r now 立刻重啟(root使用者使用) 3、shutdown -r 10 過10分鐘自動重啟(root使用者使用) 4、shutdown -r 20:35 在時間為20:35時候重啟(root使用者使用) 關機
CentOS 6下linux重啟後自動執行命令
關於重啟後自動執行命令或者指令碼,在網上看了好多方法,試了都不管用。例如在/etc/rc.d/rc.local 檔案中加入你要執行的語句 照例做 重啟發現並沒有啟動。接著使用chkconfig命令 編寫.sh檔案 將指令寫入,並將sh檔案chkconfig --add
Linux命令-關機與重啟命令以及init的級別
其實 shutdown 加上不同的引數就可以搞定關機和重啟,這也是比較安全的操作。 當然學習中還遇到幾個比較暴力的方式 關機: halt poweroff init 0 重啟: reboot
linux重啟、關機指令
xwindow log init 標準 不同 lin com 指令 linu 重啟:reboot 關機下電:第一種 poweroff 第二種 shutdown -h 0 第三種 init 0 拓展:init命令 不同的運行級定義:(參考Red Hat
Linux重置root密碼及機器之間相互登錄
root密碼 相互登錄單用戶模式 系統重啟命令:reboot init 6 shutdown -r now 關機命令: init 0 poweroff 運行級別:0-6 [root@localhost ~]# ls -l /usr/lib/sys
Linux 重啟防火牆失敗
CentOS 7 執行service iptables start出現redirecting to systemctl ...Failed to ...not loaded. 如果出現以下錯誤,好像說的是 版本高了,需要採用其他方式了 systemctl restart.service 其注意一
Linux——重啟防火牆時出現Failed to start firewalld.service: Unit is masked的解決辦法
報錯如下: 這是因為程序被鎖住了。 對它進行解鎖就可以了。 執行命令,即可實現取消服務的鎖定 # systemctl unmask firewalld 我們試一試 好了,現在防火牆已經重新啟動了。 注:下次需要鎖定該服務時可以輸入以下命令列執行
linux重啟檢視日誌及歷史記錄 查詢原因
linux重啟檢視日誌及歷史記錄 查詢原因 linux系統檔案通常在/var/log中下面是對下面常出現的檔案進行解釋 /var/log/message -----------------------------------
linux重啟oracle資料庫
前言 在開發過程經常遇到oracle出現問題的情況,很多時候重啟可以恢復正常,所以記錄一下linux下的oracle重啟步驟還是很有必要的。 重啟流程 重啟oracle資料庫的一般流程是先關監聽器,再停資料庫例項,然後啟動資料庫例項,再開監聽。 重啟步驟 切換
linux重啟程式
今天在Linux上部署程式出錯,經檢查最後是linux上的程式原來的該程式未停止,又重新啟動該程式導致(相當與Linux上有兩個該程式同時執行導致的錯誤) 解決方法: 1. 檢視linux 上的執行緒 ps -ef | grep java 2.執行結果 其中r
linux重啟oracle12c的步驟
1,重啟阿里雲伺服器 2,使用oracle使用者登陸 #su - oracle 3,登陸管理員賬號 $ sqlplus / as sysdba 4,啟動 SQL> startup 5.返回oracle使用者 6,啟動監
linux 5.7.20和5.6.38版本 資料庫忘記root密碼怎麼找回?
1. 5.6.38版本的資料庫密碼丟失找回方法: 第一步.關資料庫 第二步:mysqld_safe --skip-grant-tables --skip-networking & 第三步:mysql安全模式下登入資料庫 update mysql.user set password=PASSWOR
Linux重啟網絡卡報錯:Bringing up interface eth0:1......
今天樓主想在Linux下配置一款新的網絡卡的eth0:1,在重啟網絡卡的時候報錯:Bringing up interface eth1: Device eth1 does not seem to b
linux 重啟網絡卡報錯 RTNETLINK answers: File exists”的解決方法
新年第一天,祝大家元旦快樂! 現在linux 的發行版本很多,我們常用的比如ubuntu , redhat, centos, 現在系統更新的版本比較快,最
Android重啟應用和重啟手機
重啟應用 private void restartApp() { final Intent intent = getPackageManager().getLaunchInte
linux 下時間字串和time_t型別之間的相互轉化
#include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h
LINUX重啟MYSQL的命令
如何啟動/停止/重啟mysql一、啟動方式1、使用 service 啟動:service mysqld start2、使用 mysqld 指令碼啟動:/etc/inint.d/mysqld start3、使用 safe_mysqld 啟動:safe_mysqld&二、
Ubuntu16.04下重啟mysql和apach2
安裝apache2 sudo apt-get install apache2 啟動apache2 sudo /etc/init.d/apache2 start 重啟 sudo /etc/i
Linux核心2.4和2.6編譯模組的方法
2.6下的模組,副檔名為.ko,而不是2.4下的.o。很多初學者寫完模組之後,會使用2.4的方法來編譯模組。 /*filename: test.c*/#include <linux/init.h>#include <linux/kernel.h>#include <linux/