笔记记录

杂记

【WSL】Ubuntu设置默认登录用户为root

在Ubuntu中编辑wsl配置文件。

vim /etc/wsl.conf


新增以下配置并保存:

[user]
default=root


重启wsl服务,在PowerShell中执行以下命令:

wsl --shutdown

再次打开wsl时,即为root登录。


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-BlogPHP 1.5.2 Zero

Copyright Your WebSite.Some Rights Reserved.