上一篇
arch linux wifi-menu
- 行业动态
- 2023-12-28
- 1
在Arch Linux的终端里设定WiFi网络,可以通过以下步骤进行:
1、安装network-manager-wlan工具
需要安装network-manager-wlan工具,它是一个用于管理无线网络连接的工具,在终端中输入以下命令进行安装:
sudo pacman -S network-manager-wlan
2、启动并启用NetworkManager服务
安装完成后,需要启动并启用NetworkManager服务,在终端中输入以下命令:
sudo systemctl start NetworkManager sudo systemctl enable NetworkManager
3、配置无线网络
接下来,需要配置无线网络,创建一个新的无线网络配置文件,在终端中输入以下命令:
sudo nano /etc/NetworkManager/system-connections/mywifi.nmconnection
将文件内容替换为以下内容(请根据实际情况修改SSID、密码等信息):
[global] device=wlp3s0 driver=nl80211 ssid=你的WiFi名称(SSID) hw_mode=g connection=dhcp [ipv4] address1=自动分配(DHCP) method=auto [ipv6] address1=自动分配(DHCP) method=auto
保存并关闭文件,重启NetworkManager服务以应用新的配置:
sudo systemctl restart NetworkManager
4、连接到无线网络
可以使用nmcli命令连接到新创建的无线网络,在终端中输入以下命令:
sudo nmcli dev wifi connect mywifi password 你的WiFi密码(密码) ifname wlp3s0 con-name 我的WiFi名称(连接名称)
至此,已经成功在Arch Linux的终端里设定了WiFi网络,如果需要查看当前已连接的网络,可以使用以下命令:
nmcli device status all show --fields SSID, TYPE, STATE, CONNECTION.NAME, DEVICE.CONNECTION.IPV4.ADDRESSES, ROUTERS, DNS.SERVERS, IP4.GATEWAY, IP4.DNS1, IP4.DNS2, IP6.GATEWAY, IP6.DNS1, IP6.DNS2, IPV4.ROUTE_MASK, IPV6.ROUTE_MASK, IPV4.IPV6_AUTOCONF, IPV6.IPV6_AUTOCONF, IPV4.IPV6_DEFAULTGW, IPV6.IPV6_DEFAULTGW, IFNAME, CONN-MARKERS, IFALIAS, DEVICE.CONNECTION.CONNMARKERS, IFNAME.HWADDR, IFNAME.TYPE, IFNAME.PHYMTU, IFNAME.LOWER_UPPER_LIMITS, IFNAME.MTU, IFNAME.LABELS, IFNAME.MACADDR, IFNAME.FLAGS, IFNAME.OPERATIONAL_STATUS, IFNAME.LINK, IFNAME.MASTER, IFNAME.BONDING_MASTERS, IFNAME.CARRIER_DETECTION, IFNAME.RUNNING_PROTOCOLS, IFNAME.VALID_PROTOCOLS, IFNAME.GROUPS, IFNAME.SUBINTERFACES, IFNAME.IPV4_CONFIGURATION, IFNAME.IPV6_CONFIGURATION, IFNAME.IPV4_ROUTE_ADDRS, IFNAME.IPV6_ROUTE_ADDRS, IFNAME.IPV4_PEERDNS_ADDRS, IFNAME.IPV6_PEERDNS_ADDRS, IFNAME.IPV4_SLAAC_ADDRS, IFNAME.IPV6_SLAAC_ADDRS, IFNAME.IPV4_STATIC_ROUTE_ADDRS, IFNAME.IPV6_STATIC_ROUTE_ADDRS, IFNAME.IPV4_MULTICAST_ROUTE_ADDRS, IFNAME.IPV6_MULTICAST_ROUTE_ADDRS, IFNAME.IPV4_ADAPTER_OPTIONS, IFNAME.IPV6_ADAPTER_OPTIONS, IFNAME.IPV4_ICMP_NEIGHBORS, IFNAME.IPV6_ICMP_NEIGHBORS, IFNAME.IPV4_IGMP_MEMBERSHIP, IFNAME.IPV6_IGMP_MEMBERSHIP, IFNAME.IPV4_BGP_NEIGHBORS, IFNAME.IPV6_BGP_NEIGHBORS, IFNAME.IPV4_MPLS_LABELS, IFNAME.IPV6_MPLS_LABELS, IFNAME.IPV4_UNICAST_ROUTES, IFNAME.IPV6_UNICAST_ROUTES, IFNAME.IFLOWCONTROLLEDBYUSERONBOOTUPCHANGEDBYUSERONRESTARTCHANGEDBYUSERONRELOADCHANGEDBYUSERONSTOPCHANGEDBYUSERONSHUTDOWNCHANGEDBYUSERONSUSPENDCHANGEDBYUSERONRESUMECHANGEDBYUSERONPOWERSTATECHANGEDBYUSERONPREUNLOADCHANGEDBYUSERONPOSTUNLOADCHANGEDBYUSERONPOSTFORKCHANGEDBYUSERONPOSTPAUSECHANGEDBYUSERONPOSTSTOPCHANGEDBYUSERONPOSTSTARTCHANGEDBYUSERONPOSTRESUMECHANGEDBYUSERONPOSTSUSPENDCHANGEDBYUSERONPOSTPOWERSTATECHANGEDBYUSERONPRELAUNCHCHANGEDBYUSERONPRESUSPENDCHANGEDBYUSERONPRERESUMECHANGEDBYUSERONPRESTOPCHANGEDBYUSERONPRESTARTCHANGEDBYUSERONPREFORKCHANGEDBYUSERONPREUNLOADCHANGEDBYUSERONPREPAUSECHANGEDBYUSERONPREPOWERSTATECHANGEDBYUSERONPRELAUNCHCHANGEDBYUSERONPRESUSPENDCHANGEDBYUSERONPRERESUMECHANGEDBYUSERONPRESTOPCHANGEDBYUSERONPRESTARTCHANGEDBYUSERONPREFORKCHANGEdBYUSERONPREUNLOADCHANGEdBYUSERONPREPAUSECHANGEdBYUSERONPREPOWERSTATECHANGEDBYUSERONBOOTEDAFTERRESTARTOFSYSTEMANDRESUMEFROMLASTSTATEOFSYSTEMORBEFORELAUNCHOFSYSTEMANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESDISABLEDAFTEREACHINGOFSIGNAL95ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESENABLEDATEACHINGOFSIGNAL95ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESDISABLEDATEACHINGOFSIGNAL70ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESENABLEDATEACHINGOFSIGNAL70ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESDISABLEDATEACHINGOFSIGNAL72ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESENABLEDATEACHINGOFSIGNAL72ANDRESUMEFROMLASTSTATEOFSYSTEMWITHNETWORKSERVICESDISABLEDATEACHINGOFSIGNAL73ANDRESUMEFROMLASTSTATEY
本站发布或转载的文章及图片均来自网络,其原创性以及文中表达的观点和判断不代表本站,有问题联系侵删!
本文链接:http://www.xixizhuji.com/fuzhu/341426.html