User Tools

Site Tools


windows:linux

This is an old revision of the document!


HowTo

  • Control Panel > Programs and Features > Turn Windows Features On Or Off
    • Enable “Windows Subsystem for Linux”
  • Restart
  • Microsoft store > search for “Debian” > Get (need to disconnect VPN or create an account)
  • Launch from the start menu
  • Fix screen:

The directory /var/run/screen/ is the socket directory for screen.

Fortunately, screen reads a environment variable SCREENDIR to get an alternative socket directory.

So to work around it, you can create a directory, such as ~/.screen:

mkdir ~/.screen && chmod 700 ~/.screen

and export the SCREENDIR to point to that directory:

export SCREENDIR=$HOME/.screen

You can also put this line into your ~/.bashrc so that it will also take effect afterwards.

Samba

You can't automatically access Windows network drives, even if they are mapped to a letter (20.6.20).

/etc/fstab:

  \\alan\huge  /mnt/y  drvfs  user,uid=1000,gid=1000  0  0

This ought to automount when WSL is fired up, but something[TM] needs to start it if you want to run rsync from cron.

''cron''

Add to the end of /etc/sudoers:

  %sudo   ALL=NOPASSWD: /etc/init.d/cron start

Roughly, follow https://blog.snowme34.com/post/schedule-tasks-using-crontab-on-windows-10-with-wsl/index.html although I think there was a lot of fighting to create the link:

  Next, type shell:startup in the Run and explorer will open the startup folder.
  Create a shortcut to wsl.exe and edit the properties as following:
  C:\Windows\System32\wsl.exe sudo /etc/init.d/cron start
windows/linux.1592666286.txt.gz · Last modified: 2020/06/20 15:18 by slack