开发环境修改wsl 默认登录用户为root
1. 现在用的是ubuntu,找到安装目录
C:\Users\用户名\AppData\Local\Microsoft\WindowsApps\ubuntu版本.exe config --default-user root

2. 执行命令
ubuntu2004.exe config --default-user root
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
ubuntu,找到安装目录C:\Users\用户名\AppData\Local\Microsoft\WindowsApps\ubuntu版本.exe config --default-user root

ubuntu2004.exe config --default-user root