2013/09/21

我的Linux Mint筆記

root那些

使用root身份相等的權限執行指令
sudo <指令>
把目前的terminal暫時切換到root身份(exit會退回原本的user)
su
su指令,需要知道root的密碼才能切換身份,但是root的密碼不該有人知道,或者說不該有人以root的身份登入系統,因此就有了sudo這個命令的誕生,如果想暫時切換成root身份,可以用
sudo su
即可(sudo指令會向你再次確認目前使用者的密碼)

Grub2設定

grub.cfg在
/boot/grub/grub.cfg
但是他是組合出來的,所以要改設定來源,grub目錄本體放在
/etc/grub.d
內容有
00_header
05_debian_theme
06_mint_theme
10_linux
10_lupin
20_linux_xen
20_memtest86+
30_os-prober
30_uefi-firmware
40_custom
41_custom
README
其中預設項目以及預設讀秒在
00_header
,請加入以下兩行來設定預設項目(從0開始數)和倒數讀秒
# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

GRUB_DEFAULT=0
GRUB_TIMEOUT=5

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=10 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=auto ; fi
修改完成之後執行
sudo update-grub
來更新grub menu