archlinux 网卡设置和ssh安装配置

ip link show命令查看网卡名

systemctl enable dhcpcd@网卡名.service

archlinux使用pacman -S openssh安装ssh服务,使用全路径运行sshd服务

如果在/ect/ssh/目录下没有ssh_host_***_key这样的文件sshd服务不能成功运行

解决方法:ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key

同样也需要配置/ect/ssh/sshd_config文件,主要是去掉行首的注释符号#

Archlinux的PID=1的进程是systemd,通过systemctl来管理daemon进程(服务进程)

systemctl enable sshd.service 表示开机启动sshd服务

format: systemctl command service_name

command: disable enable start stop restart mask unmask etc.

服务存放的配置文件放在如下目录:

/usr/lib/systemd/system/

/run/systemd/system/

/etc/systemd/system/

执行优先级依次增加

原文地址:https://www.cnblogs.com/rocklee25/p/6931231.html