A detailed explanation of the Arch Linux OS network configuration

Source: Internet
Author: User
Tags symlink ssh arch linux

Explain if you are configuring your network.

[Root@arch ~]# ls/sys/class/net/#查看有哪些可用网络
eno16777736 Lo
[Root@arch ~]# ip addr add 1.1.1.21/24 dev eno16777736 #给接口eno16777736配置ip为1.1.1.21 Subnet Mask bit 255.255.255.0
[Root@arch ~]# IP link set eno16777736 up #启动网卡, otherwise the associated route cannot be started
[Root@arch ~]# IP route add default via 1.1.1.2 #设置默认路由, Gateway
[Root@arch ~]# pacman-s openssh #安装ssh, you cannot use tools such as Xshell to make remote links.
[Root@arch ~]# systemctl start sshd #启动sshd服务, not ssh Oh!
[Root@arch ~]# Systemctl Enable sshd
Created symlink From/etc/systemd/system/multi-user.target.wants/sshd.service to/usr/lib/systemd/system/ Sshd.service.
[Root@arch ~]# Systemctl | grep sshd
Sshd.service loaded active running OpenSSH Daemon #sshd服务运行中
Sshdgenkeys.service loaded Active exited SSH Key genera tion


To Configure a dynamic network:

[Root@arch ~]# Systemctl Enable Dhcpcd@eno16777736.service

To configure a static network :

[Root@arch/]# cd/etc/netctl/
[root@arch netctl]# cp examples/ethernet-static eno16777736
[Root@arch Netctl] # egrep-v "#" eno16777736
description= ' A basic static Ethernet connection '
interface=eno16777736
connection= Ethernet
Ip=static
address= (' 1.1.1.21/24 ')
gateway= ' 1.1.1.2 '
dns= (' 114.114.114.114 ')
[Root@arch netctl]# netctl enable eno16777736
Created symlink from/etc/systemd/system/multi-user.target.wants/netctl\@ Eno16777736.service To/usr/lib/systemd/system

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.