跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[程序员] 求大神指导下 wsl2 的网络配置

发表于

我在 wsl 里,设置了/etc/wsl.conf ,就无法访问外网,ping 不通,一旦删除/etc/wsl.conf 就可以访问了,但是无法使用 service 了,不知道哪里出的问题,下面是配置信息

Windows 11 专业工作站版 23H2

WSL 版本:2.2.4.0 内核版本:5.15.153.1-2 WSLg 版本:1.0.61 MSRDC 版本:1.2.5326 Direct3D 版本:1.611.1-81528511 DXCore 版本:10.0.26091.1-240325-1447.ge-release Windows 版本:10.0.22631.3447

.wslconfig(windows)配置如下

[wsl2]
memory=20GB                   #限制最大内存
processors=8                  #限制线程数
localhostforwarding=true
nestedVirtualization=true
guiApplications=true

[experimental]
autoMemoryReclaim=gradual  # gradual  | dropcache | disabled
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
sparseVhd=true

[network]
generateResolvConf = false

我的/etc/wsl.config 配置如下

[boot]
systemd=true

[network]
generateResolvConf = false

[user]
default = root

我的/etc/resolv.conf 配置如下:

nameserver 8.8.8.8
nameserver 8.8.4.4

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.