2004-09-30, 02:43 AM
|
#2 (permalink)
|
長老會員
|
卸下週邊設備
umount /mnt/cdrom
umount /mnt/floppy
12.System Shutdown & Restart 系統關閉及重新啟動
Command Description, Syntax & Example
指令 解說、語法及例子
reboot Reboot the system now
立即重新啟動系統
init 6 Reboot the system now
立即重新啟動系統
[ctrl]+[alt]+[del] Reboot the system now
立即重新啟動系統
halt Halt the system now
立即關閉系統
shutdown Shutdown the System
關閉系統
parameter 參數
-r Reboot the system when the shutdown is
complete
-h Halt the system when the shutdown is
complete
shutdown -r now Reboot the system now
shutdown -h now Halt the system from now
shutdown -r +15 Reboot the system after 15 minutes from
now
shutdown -h +15 Halt the system after 15 minutes from
now
shutdown -r 23:00 Reboot the system on 11 p.m
shutdown -h 23:00 Halt the system on 11 p.m
如何使 CTRL+ALT+DEL 失效?
避免任何人都可以關機,請修改檔案 /etc/inittab , 找尋下列句子:
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now改為#ca::ctrlaltdel:/sbin/shutdown -t3 -r now
只准 root 登入
在 /etc 目錄內建立一文字檔案名 nologin ,內容隨意。只要系統發現此檔案存在,就會禁止其他使用者登入,並且會顯示
nologin 檔的內容。
如何讓 Linux 以單人模式開機?
原因:當系統發生問題時,必須以單人模式進入,以便修復系統。
在命令模式下執行:
telinit 1
或在 boot prompt 時,鍵入:
linux single
如何可以重看開機時一大堆訊息?
在命令模式下執行:
dmesg | less
如何可以在開機時自動掛上光碟機?
假設光碟機是 Secondary Master IDE CDROM hdc , 修改檔案 /etc/fstab,加入以下一行:
/dev/hdc /mnt/cdrom iso9660 default 1 0
如要換光碟片,必須先 umount ,光碟片才能退出光碟機,執行:
umount /mnt/cdrom
換光碟片後,必須手動重新掛上光碟機,執行:
mount -t iso9660 /dev/hdc /mnt/cdrom
|
__________________
給自己看也給所有需要這些話鼓勵的人看!
認真不一定會得到美好的結果,但是不認真就一定沒有
想要有什麼結果,就秉持你的雙手 放手去做 總比什麼都沒付出最後失敗了才嘆氣來的好吧 沒努力的人.沒有資格說放棄 努力過的人.更要有勇氣繼續努力下去
|
|
送花文章: 1,
收花文章: 38 篇, 收花: 123 次
|