为了测试连接是否正常工作:

为了测试连接是否正常工作:

我想从无线网络转移到以太网。我的电脑是 Lenovo Thinkpad Carbon Gen II。这台计算机没有以太网端口。您必须依赖加密狗。我仍然拥有计算机附带的那个(看起来像)。因为随着时间的推移,我的有点损坏了。今天,我买了一个新的一个(USB 转 RJ45 适配器)在亚马逊上。我找不到让它发挥作用的方法。欢迎任何帮助。

主机名结尾:

Operating System: Manjaro Linux
Kernel: Linux 4.4.83-1-MANJARO
Architecture: x86-64

ifconfig enp0s25 的输出:

enp0s25: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 54:ee:75:96:39:28 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf0500000-f0520000

lspci的输出:

00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09)
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I218-V (rev 04)
00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 6 (rev e4)
00:1c.1 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04)
03:00.0 Network controller: Intel Corporation Wireless 7260 (rev 83)

lsusb 的输出:

Bus 003 Device 003: ID 04ca:7036 Lite-On Technology Corp.
Bus 003 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 006: ID 1058:107c Western Digital Technologies, Inc. Elements Desktop (WDBWLG)
Bus 002 Device 005: ID 0bc2:a0a4 Seagate RSS LLC Backup Plus Desktop Drive
Bus 002 Device 004: ID 0bc2:a0a4 Seagate RSS LLC Backup Plus Desktop Drive
Bus 002 Device 003: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 002: ID 05e3:0616 Genesys Logic, Inc. hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 8087:07dc Intel Corp.
Bus 001 Device 005: ID 138a:0017 Validity Sensors, Inc. Fingerprint Reader
Bus 001 Device 003: ID 04d9:0169 Holtek Semiconductor, Inc.
Bus 001 Device 009: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

答案1

为了测试连接是否正常工作:

ifconfig enp0s25 up(这将启用您的网络接口/加密狗)

dhcpcd (这会启动 dhcp 客户端以获得 IP 地址)

当此方法有效时,您可以转向更永久、更方便的解决方案:

例如,您可以使用 netctl 来自动连接。你必须做什么:

  • /etc/netctl/my_dhcp_profile以您喜欢的方式创建配置文件;您也可以创建多个。例如:

     Interface=enp0s25
     Connection=ethernet
     IP=dhcp
    

    或者(静态IP):

    Interface=enp0s25
    Connection=ethernet
    IP=static
    Address=('10.1.10.2/24')
    Gateway=('10.1.10.1')
    DNS=('10.1.10.1')
    
  • 启用配置文件:

    netctl enable my_dhcp_profile
    netctl start my_dhcp_profile
    

之后,它将在可用时自动激活,并且不需要进一步交互。基本上start是现在启动它所必需的,而不是在重新启动后启动。您也可以使用stop手动停用它。

相关内容