Share via

WSL and Windows integration?

Глеб Гребенщиков 26 Reputation points
2020-04-05T11:57:43.407+00:00

Some services are spinning in WSL. How can I autostart WSL services on Windows?
I think you can use the Windows task scheduler (not the task manager), but there is a problem - Windows uses UAC, and ubuntu 18.04 uses sudo, but it is not possible to combine them (you can tinker with LDAP, AD and RADIUS, but you need Linux accounts to forward Windows Server)
What to do and how to configure autostart of Linux services from Windows?

Community Center | Not monitored
0 comments No comments

2 answers

Sort by: Most helpful
  1. Fay Wang - MSFT 5,231 Reputation points
    2020-04-09T05:40:00.827+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    The Q&A platform is currently in the preview stage. Your question is more relevant to WSL and is not currently supported. It is recommended that ou can ask questions on github.

    Thanks.

    Was this answer helpful?

    0 comments No comments

  2. gekka 14,066 Reputation points MVP Volunteer Moderator
    2020-04-06T07:24:28.793+00:00

    Hi 60766043,

    For example, to start postfix in WSL1, you can register the following command in Task Manager.

    wsl -u root -- sudo postfix start
    

    This is registered with the following command.

    schtasks /create /tn postfix /sc onstart /delay 0000:30 /tr "wsl.exe -u root -- sudo postfix start"
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.