Arch-Linux
無法通過加密狗連接乙太網
我正在尋找從wifi轉移到乙太網。我的電腦是聯想 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
為了測試連接是否正常工作:
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
手動停用它。