{"id":551,"date":"2019-04-08T17:23:19","date_gmt":"2019-04-08T09:23:19","guid":{"rendered":"http:\/\/localhost\/?p=551"},"modified":"2019-04-08T17:23:26","modified_gmt":"2019-04-08T09:23:26","slug":"win10-linux-for-subsystme-ubuntu-%e4%bf%ae%e6%94%b9%e9%bb%98%e8%ae%a4%e7%94%a8%e6%88%b7%e5%92%8c%e5%af%86%e7%a0%81%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.ahomer.cn\/?p=551","title":{"rendered":"win10 linux for subsystme ubuntu \u4fee\u6539\u9ed8\u8ba4\u7528\u6237\u548c\u5bc6\u7801\u65b9\u6cd5"},"content":{"rendered":"<p>All other answers were helpful, but can be other scenarios too, follow here as per yours. Mine was ubuntu 1604, so use following:-<\/p>\n<p>ubuntu1604 config --default-user <username><\/p>\n<p>if you installed ubuntu 1804:-<\/p>\n<p>ubuntu1804 config --default-user <username><\/p>\n<p>if you used default one, then:-<\/p>\n<p>ubuntu config --default-user <username><\/p>\n<p><strong>\u4e4b\u6240\u4ee5\u767b\u5f55\uff1agoogle \u4e86\u4e00\u4e0b\u5348\u627e\u5230\u7b54\u6848\u3002 \u5b89\u88c5\u7684\u662fubuntu1604\u7248\u672c\uff0c\u7f51\u4e0a\u4f7f\u7528\u7684\u201cubuntu config --default-user <username>\u201d\u8fd0\u884c\u4e00\u76f4\u62a5\u9519\u5982\u4e0b\uff1a<\/strong><\/p>\n<p>\u201c<br \/>\nubuntu : \u65e0\u6cd5\u5c06\u201cubuntu\u201d\u9879\u8bc6\u522b\u4e3a cmdlet\u3001\u51fd\u6570\u3001\u811a\u672c\u6587\u4ef6\u6216\u53ef\u8fd0\u884c\u7a0b\u5e8f\u7684\u540d\u79f0\u3002\u8bf7\u68c0\u67e5\u540d\u79f0\u7684\u62fc\u5199\uff0c\u5982\u679c\u5305\u62ec\u8def\u5f84\uff0c\u8bf7\u786e\u4fdd\u8def\u5f84<br \/>\n\u6b63\u786e\uff0c\u7136\u540e\u518d\u8bd5\u4e00\u6b21\u3002<br \/>\n\u6240\u5728\u4f4d\u7f6e \u884c:1 \u5b57\u7b26: 1<br \/>\n+ ubuntu config --default-user<br \/>\n+ ~~~~~~<br \/>\n    + CategoryInfo          : ObjectNotFound: (ubuntu:String) [], CommandNotFoundException<br \/>\n    + FullyQualifiedErrorId : CommandNotFoundException\u201d<\/p>\n<p>\u7ec8\u4e8e\u627e\u5230\u6b63\u786e\u7b54\u6848\u3002<\/p>\n<p>\u539f\u56e0\uff1a<br \/>\nubuntu\u5b89\u88c5\u65f6\u4f1a\u63d0\u793a\u8bbe\u7f6e\u7528\u6237\u540d\u548c\u5bc6\u7801\uff0c\u8fd9\u6837root\u7684\u5bc6\u7801\u5c31\u662f\u968f\u673a\u7684\u3002\u9700\u8981\u5c06root\u7528\u6237\u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u8d26\u6237\uff0c\u5e76\u8bbe\u7f6e\u5bc6\u7801\u540e \u624d\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528su\u548csudo\u3002<\/p>\n<ul>\n<li>\u5982\u4f55\u67e5\u770bubuntu \u5b50\u7cfb\u7edf\u7684\u8d26\u6237\u548c\u5bc6\u7801\uff1f<\/li>\n<\/ul>\n<p>\u8d26\u6237\u548c\u5bc6\u7801\u4fdd\u5b58\u5728%userprofile%\\AppData\\Local\\Packages\\CanonicalGroupLimited.Ubuntu16.04onWindows_79rhkp1fndgsc\\LocalState\\rootfs\\etc \u6587\u4ef6\u4e0b shadow \u548cshadow- \u6587\u4ef6\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All other answers were helpful, but can be other scenar [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-551","post","type-post","status-publish","format-standard","hentry","category-program"],"_links":{"self":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/551","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=551"}],"version-history":[{"count":1,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions"}],"predecessor-version":[{"id":552,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=\/wp\/v2\/posts\/551\/revisions\/552"}],"wp:attachment":[{"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=551"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ahomer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}