问题描述
- 为了安装到非 C 盘,其他盘,我的 wsl 是去 GitHub 下载的 参考教程地址
- 把下载的压缩包放到其他盘即可
- 想更换每次启动的默认账户为普通账户
问题:
网上搜索的教程是,出现错误
C:\Users\25301>wsl -l
适用于 Linux 的 Windows 子系统分发版:
CentOS7 (默认)
C:\Users\25301>CentOS7 config --default-user jarvan
'CentOS7' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
他们有的说发行版本的问题,我试了没有用
命令的本质是程序,其实就是这个程序
进入该文件夹下,命令
CentOS7.exe config --default-user jarvan
成功
E:\VM\WSL\CentOS7>CentOS7.exe --help
ERROR:Invalid Argument.
Usage :
<no args>
- Open a new shell with your default settings.
run <command line>
- Run the given command line in that distro. Inherit current directory.
runp <command line (includes windows path)>
- Run the path translated command line in that distro.
config [setting [value]]
- `--default-user <user>`: Set the default user for this distro to <user>
- `--default-uid <uid>`: Set the default user uid for this distro to <uid>
- `--append-path <on|off>`: Switch of Append Windows PATH to $PATH
- `--mount-drive <on|off>`: Switch of Mount drives
- `--default-term <default|wt|flute>`: Set default terminal window
get [setting]
- `--default-uid`: Get the default user uid in this distro
- `--append-path`: Get on/off status of Append Windows PATH to $PATH
- `--mount-drive`: Get on/off status of Mount drives
- `--wsl-version`: Get WSL Version 1/2 for this distro
- `--default-term`: Get Default Terminal for this distro launcher
- `--lxguid`: Get WSL GUID key for this distro
backup [contents]
- `--tgz`: Output backup.tar.gz to the current directory using tar command
- `--reg`: Output settings registry file to the current directory
clean
- Uninstall the distro.
help
- Print this usage message.
E:\VM\WSL\CentOS7>CentOS7.exe config --default-user jarvan
E:\VM\WSL\CentOS7>