systemd? 不多说,最近它和 udev 玩的好。
安装
sudo pacman -S systemd systemd-sysvcompat systemd-arch-units |
增加内核参数 init=/bin/systemd 至 /boot/grub/menu.lst
# (0) Arch Linux title Arch Linux root (hd0,0) kernel /boot/vmlinuz26 root=/dev/sda1 init=/bin/systemd ro quiet initrd /boot/kernel26.img # (1) Arch Linux title Arch Linux Fallback root (hd0,0) kernel /boot/vmlinuz26 root=/dev/sda1 init=/bin/systemd ro quiet initrd /boot/kernel26-fallback.img |
配置
主机名称 : /etc/hostname
myhostname |
虚拟控制台字体与键盘映射表 : /etc/vconsole.conf
KEYMAP=us FONT=lat9w-16 FONT_MAP=8859-1_to_uni |
语言环境 : /etc/locale.conf
LANG=en_US.UTF-8 LC_COLLATE=C |
时区 : /etc/timezone
Asia/Shanghai |
自动加载内核模块 : /etc/modules-load.d/kvm.conf
kvm kvm-intel |
启用、禁用服务
# 网络服务 : NetworkManager.serivce sudo systemctl enable NetworkManager.serivce # OpenSSH : sshd.service sudo systemctl enable sshd.service # GDM : gdm.service sudo systemctl enable gdm.service # 禁用 sudo systemctl disable gdm.service |
启用、停止、重启和重载服务
# 启动 sudo systemctl start sshd.service # 停止 sudo systemctl stop sshd.service # 重启 sudo systemctl restart sshd.service # 重载配置 sudo systemctl reload sshd.service |
查看服务状态
systemctl
# or
systemctl status sshd.service |
Over!