农村致富路,人偶师的痕迹,马超群干爹是谁
主要参考windows10上使用linux子系统(wsl)这篇文章进行安装,不要通过lxrun /install /y去安装,这种方法安装貌似没有wsl命令。
先把win 10 版本升级到16215.0以上,否则在microsoft store里的所有linux都会显示免费下载为不可点击,升级win 10参考download windows 10即可。
如在microsoft store里选择ubuntu,安装完启动并设置用户密码便可使用。
installing, this may 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: sandwich enter new unix password: retype new unix password: passwd: password updated successfully installation successful!
配置rsync,/home/sandwich/rsyncd/rsyncd.conf中加入以下内容:
log file = /home/sandwich/rsyncd/rsyncd.log port = 8730 use chroot = false read only = false [windows_project_rsync_path] path = /home/sandwich/rsyncd/dest
通过以下命令即可启动rsync
rsync --daemon --config=/home/sandwich/rsyncd/rsyncd.conf --no-detach
测试rsync同步
c:\users\sandwich>wsl rsync --port=8730 -rlptdvzhs --progress --delete /home/sandwich/rsyncd/source/ sandwich@127.0.0.1::windows_project_rsync_path sending incremental file list ./ a.txt 5 100% 0.00kb/s 0:00:00 (xfr#1, to-chk=0/2) sent 118 bytes received 42 bytes 320.00 bytes/sec total size is 5 speedup is 0.03
删除32位的python,参考安装python 64位,32位无法通过shell_command调用wsl。
重新mysql-python参考windows 10安装python 2.7和mysql-python。
添加方法rsyncfiles用于同步,替换原来的copyfiles方法:
def rsyncfiles(source, target): source_path = wsl_project_rsync_path + source + "/" target_path = "sandwich@127.0.0.1::" + windows_project_rsync_path + target shell_command("wsl rsync --port=8730 -rlptdvzhs --progress --delete " + source_path + " " + target_path)
windows and ubuntu interoperability
windows 10安装python 2.7和mysql-python
解决"pip fatal error in launcher: unable to create process using ... "的错误
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
win10如何启用管理员账户 win10禁用/启用管理员账户的方法
win10怎么查看驱动是否异常 Win10检测驱动程序是否正常的方法
Windows10系统任务栏无效图标怎么删除 通过注册表一键快速删除
Win10系统自动重启怎么办 Win10系统自动重启的关闭方法
怎么减少win10笔记本功耗 详谈笔记本硬件功耗大的原因和解决办法
网友评论