Win10 Bash更改默认用户
Win10已经支持Ubuntu的Bash了。
在cmd中输入bash就可以进入bash界面。但此时是普通用户登录的。
如果希望更改默认的登录用户,可以在cmd中更改。
具体的命令是:
- lxrun /setdefaultuser root
Found UNIX user: root
Default UNIX user set to: root
lxrun是管理bash on win10的工具。可以install、uninstall或update。
lxrun的help信息:
- lxrun -h
- Performs administrative operations on the LX subsystem
- Usage:
- /install - Installs the subsystem
- Optional arguments:
- /y - Do not prompt user to accept
- /uninstall - Uninstalls the subsystem
- Optional arguments:
- /full - Perform a full uninstall
- /y - Do not prompt user to accept
- /setdefaultuser - Configures the subsystem user that bash will be launched as. If the user does not exist it will be created.
- Optional arguments:
- username - Supply the username
- /y - If username is supplied, do not prompt to create a password
- /update - Updates the subsystem's package index
比如安装Bash:
- lxrun /install
- -- Beta feature --
- This will install Ubuntu on Windows, distributed by Canonical
- and licensed under its terms available here:
- https://aka.ms/uowterms
- Type "y" to continue: y
- Downloading from the Windows Store... %
- Extracting filesystem, this will take a few minutes...
- Please create a default UNIX user account. The username does not need to match your Windows username.
- For more information visit: https://aka.ms/wslusers
- Enter new UNIX username: hengwei
- Enter new UNIX password:
- Retype new UNIX password:
- passwd: password updated successfully
- Installation successful!
比如删除Bash:
- lxrun /uninstall
- This will uninstall Ubuntu on Windows.
- This will remove the Ubuntu environment as well as any modifications and new applications with the exception of:
- C:\Users\hengwei\AppData\Local\lxss\home
- C:\Users\hengwei\AppData\Local\lxss\root
- Type "y" to continue: y
- Uninstalling...
比如更新Bash:
- lxrun /update
- Checking for updates...
- Ign http://archive.ubuntu.com trusty InRelease
- Get: http://security.ubuntu.com trusty-security InRelease [65.9 kB]
- Get: http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
- Get: http://security.ubuntu.com trusty-security/main amd64 Packages [606 kB]
- Hit http://archive.ubuntu.com trusty-backports InRelease
......
Win10 Bash更改默认用户的更多相关文章
- centos7安装Jenkins更改默认端口并配置Ldap服务器进行用户认证
应用环境:Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作. Jenkins官网:https://jenkins.io/ 测试环境:一台Centos ...
- 更改 Nginx 服务的默认用户
为什么要更改 Nginx 服务的默认用户:就像更改 ssh 的默认 22 端口一样,增加安全性,Nginx 服务的默认用户是 nobody ,我们更改为 nginx 1.添加 nginx 用户 use ...
- Nginx优化之基本安全优化 (隐藏Nginx软件版本号信息,更改源码隐藏Nginx软件名及版本号,更改Nginx服务的默认用户)
一,隐藏Nginx软件版本号信息 查看版本号 curl -I 192.168.0.220 HTTP/1.1 200 OK Server: nginx/1.6.2 #这里清晰的暴露了Web版本号(1.6 ...
- Mac 如何将apache的这个默认目录更改到用户目录下
如何将apache的这个默认目录更改到用户目录下. 做如下更改即可: 1.在自己的用户目录下新建一个Sites文件夹,我的用户目录为gaocuili 2.进到cd /etc/apache2/users ...
- win10 无法修改默认程序 默认打开方式的解决方法
此时是2018年11月24日 win10 pro 64位 版本是1803 具体版本号是17134 情景: 我的状况是.json文件的默认打开方式被新安装的应用霸占了,然后无论是通过“右键-属性-更改 ...
- 『现学现忘』Git基础 — 7、设置Git Bash终端默认路径
目录 1.Git Bash默认路径 2.如何查看Git Bash终端默认路径 3.如何修改Git Bash终端的默认路径 4.拓展:指定目录进入Git Bash终端 5.注意事项 如果您不熟悉Git命 ...
- Client默认用户及登录密码(转)
Client默认用户及登录密码 SAP系统(如ERP.CRM等)安装完成,初始化状态下有若干个客户端(Client).如果是生产系统,一般只有000.001.066等三个Client:如果是IDES系 ...
- sql导入默认用户解决杰奇cms无法登陆管理员账户问题
前些天下载杰奇cms来体验一下,从a5下载的杰奇1.8版,不是默认的安装程序,上传文件,手工导入sql数据库,修改了config配置文件,很快就完工了.前台可以展现,除了有些乱码显示之外,想要修改相关 ...
- Discuz更改默认搜索模块
由于网站使用DZ的侧重点不同,在搜索中可能需要更改默认搜索模块 首先找到模板中搜索模块对应的文件,默认模板中搜索模块的地址是 template\default\common\pubsearchform ...
随机推荐
- Nginx配置指令的执行顺序
rewrite阶段 rewrite阶段是一个比较早的请求处理阶段,这个阶段的配置指令一般用来对当前请求进行各种修改(比如对URI和URL参数进行改写),或者创建并初始化一系列后续处理阶段可能需要的Ng ...
- Linux 调优
一.系统优化 1.硬件优化 增加内存 更换速度跟高磁盘(sata->sas)可以增加固态硬盘 更换更高校率的网卡,或者双网卡绑定,两个网卡作为一个网卡使用.服务器网卡一般为千兆 2.系统层优化 ...
- LVS/DR 配置
LVS/DR 配置 实验环境 三台主机:Linux Centos 6.4 32位 调度器Director:192.168.1.160(公网IP).192.168.1.100(VIP) HTTP真实服务 ...
- 前端自动化构建工具-gulp
gulp 和grunt这两个是我知道的自动构建工具,但是说实话都没在项目中用过,不太清楚自动化构建是什么意思, 1.grunt和gulp有什么相同点和不同点? (1).易于使用:采用代码优于配置策略, ...
- 爬虫实例之使用requests和Beautifusoup爬取糗百热门用户信息
这次主要用requests库和Beautifusoup库来实现对糗百的热门帖子的用户信息的收集,由于糗百的反爬虫不是很严格,也不需要先登录才能获取数据,所以较简单. 思路,先请求首页的热门帖子获得用户 ...
- Android系统--灯光系统驱动编写
Android系统开发--Android灯光系统tiny4412_led_class驱动编写 框架分析 led_classdev_4412结构体 创建led_classdev_4412结构体 分配结构 ...
- HBase-存储-写路径
写路径 当用户向HRegionServer发起put请求时,其会将请求交给对应的HRegion实例来处理.第一步是要决定数据是否需要写到由HLog类实现的预写日志中.WAL是标准的Hadoop Seq ...
- AVFoundation之录音及播放
录音 在开始录音前,要把会话方式设置成AVAudioSessionCategoryPlayAndRecord //设置为播放和录音状态,以便可以在录制完之后播放录音 AVAudioSession *s ...
- ActiveMQ消费者接收消息的过程
[http://manzhizhen.iteye.com/blog/2094130] org.apache.activemq.ActiveMQMessageConsumer同步接收
- java时间戳转换
import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class Da ...