# Replace hostname with the name for your host export HOST=hostname # Replace Europe/London with your Region/City export TZ="Asia/Shanghai" echo $HOST > /etc/hostname cat << EOF >> /etc/hosts 127.0.0.1 localhost ::1 localhost 127.0.1.1 $HOST.localdomain $HOST EOF ln -sf /usr/share/zoneinfo/$TZ /etc/localtime # Sync system time to hardware clock hwclock --systohc # - set locale echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen #echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen locale-gen echo 'LANG=en_US.UTF-8' > /etc/locale.conf grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB grub-mkconfig -o /boot/grub/grub.cfg passwd root