cat > /etc/inputrc << "EOF" set horizontal-scroll-mode Off set meta-flag On setinput-meta On set convert-meta Off set output-meta On set bell-style none "\eOd": backward-word "\eOc": forward-word "\e[1~": beginning-of-line "\e[4~": end-of-line "\e[5~": beginning-of-history "\e[6~": end-of-history "\e[3~": delete-char "\e[2~": quoted-insert "\eOH": beginning-of-line "\eOF": end-of-line "\e[H": beginning-of-line "\e[F": end-of-line EOF
4.Bash Shell启动文件设置
1 2 3 4 5 6 7 8
cat > /etc/profile << "EOF" # Begin /etc/profile exportLANG=en_US.UTF-8 exportINPUTRC=/etc/inputrc alias ls="ls --color" exportPS1='\u:\w\$ ' # End /etc/profile EOF
5.本地网络名设置
1
echo "HOSTNAME=mylinux" > /etc/sysconfig/network
6.hosts文件设置
1 2 3 4 5
cat > /etc/hosts << "EOF" # Begin /etc/hosts (no network card version) 127.0.0.1 mylinux localhost # End /etc/hosts (no network card version) EOF
cat > /boot/grub/menu.lst << "EOF" # Begin /boot/grub/menu.lst # By default boot the first menu entry. default 0 # Allow 30 seconds before booting the default. timeout 30 # Use prettier colors. color green/black light-green/black # The first entry is for LFS. title LFS 6.3 root (hd0,1) kernel /boot/lfskernel-2.6.22.5 root=/dev/hda2 EOF