How can I run services in WSL
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
After searching this site and various Q, it is clear that services and systemd is not available for WSL.
I need to run a program in WSL everytime I start my pc so I read this page on how to use crontab: How to run Ubuntu service on Windows (at startup)? | Super User but I got confused because the format does not tally with the format in crontab.
However this is my cron:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH=cd /usr/local/src/:cd xmr-stak-cpu:cd bin/
@reboot . sudo ./xmr-stak-cpu
I have also done this:
Run bash/cron loop on start
Create a file called linux.bat in shell:startup
Paste: C:WindowsSystem32bash.exe -c 'while [ true ]; do sudo /usr/sbin/cron -f; done'
It does not work.
How can I run a service in WSL?
Surely there must be a way that does not require me to be a Linux phd?
Or is there a way to use Windows
Because in Windows I have tried the following: using https://github.com/Microsoft/WSL/issues/612
Run: When the computer starts,
Action: Start a program,
Program: c:Windowssystem32bash.exe,
Arguments: -c "sudo /xmr-stak-cpu/bin/xmr-stak-cpu -D"
Start in: /usr/local/src/
And as you guessed, it still does not work.
Frankly I wish I could do this in WSL because it is my preferred way but I will take any way.
Please help guys.
cron services windows-subsystem-for-linux
add a comment |Â
up vote
2
down vote
favorite
After searching this site and various Q, it is clear that services and systemd is not available for WSL.
I need to run a program in WSL everytime I start my pc so I read this page on how to use crontab: How to run Ubuntu service on Windows (at startup)? | Super User but I got confused because the format does not tally with the format in crontab.
However this is my cron:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH=cd /usr/local/src/:cd xmr-stak-cpu:cd bin/
@reboot . sudo ./xmr-stak-cpu
I have also done this:
Run bash/cron loop on start
Create a file called linux.bat in shell:startup
Paste: C:WindowsSystem32bash.exe -c 'while [ true ]; do sudo /usr/sbin/cron -f; done'
It does not work.
How can I run a service in WSL?
Surely there must be a way that does not require me to be a Linux phd?
Or is there a way to use Windows
Because in Windows I have tried the following: using https://github.com/Microsoft/WSL/issues/612
Run: When the computer starts,
Action: Start a program,
Program: c:Windowssystem32bash.exe,
Arguments: -c "sudo /xmr-stak-cpu/bin/xmr-stak-cpu -D"
Start in: /usr/local/src/
And as you guessed, it still does not work.
Frankly I wish I could do this in WSL because it is my preferred way but I will take any way.
Please help guys.
cron services windows-subsystem-for-linux
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
After searching this site and various Q, it is clear that services and systemd is not available for WSL.
I need to run a program in WSL everytime I start my pc so I read this page on how to use crontab: How to run Ubuntu service on Windows (at startup)? | Super User but I got confused because the format does not tally with the format in crontab.
However this is my cron:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH=cd /usr/local/src/:cd xmr-stak-cpu:cd bin/
@reboot . sudo ./xmr-stak-cpu
I have also done this:
Run bash/cron loop on start
Create a file called linux.bat in shell:startup
Paste: C:WindowsSystem32bash.exe -c 'while [ true ]; do sudo /usr/sbin/cron -f; done'
It does not work.
How can I run a service in WSL?
Surely there must be a way that does not require me to be a Linux phd?
Or is there a way to use Windows
Because in Windows I have tried the following: using https://github.com/Microsoft/WSL/issues/612
Run: When the computer starts,
Action: Start a program,
Program: c:Windowssystem32bash.exe,
Arguments: -c "sudo /xmr-stak-cpu/bin/xmr-stak-cpu -D"
Start in: /usr/local/src/
And as you guessed, it still does not work.
Frankly I wish I could do this in WSL because it is my preferred way but I will take any way.
Please help guys.
cron services windows-subsystem-for-linux
After searching this site and various Q, it is clear that services and systemd is not available for WSL.
I need to run a program in WSL everytime I start my pc so I read this page on how to use crontab: How to run Ubuntu service on Windows (at startup)? | Super User but I got confused because the format does not tally with the format in crontab.
However this is my cron:
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH=cd /usr/local/src/:cd xmr-stak-cpu:cd bin/
@reboot . sudo ./xmr-stak-cpu
I have also done this:
Run bash/cron loop on start
Create a file called linux.bat in shell:startup
Paste: C:WindowsSystem32bash.exe -c 'while [ true ]; do sudo /usr/sbin/cron -f; done'
It does not work.
How can I run a service in WSL?
Surely there must be a way that does not require me to be a Linux phd?
Or is there a way to use Windows
Because in Windows I have tried the following: using https://github.com/Microsoft/WSL/issues/612
Run: When the computer starts,
Action: Start a program,
Program: c:Windowssystem32bash.exe,
Arguments: -c "sudo /xmr-stak-cpu/bin/xmr-stak-cpu -D"
Start in: /usr/local/src/
And as you guessed, it still does not work.
Frankly I wish I could do this in WSL because it is my preferred way but I will take any way.
Please help guys.
cron services windows-subsystem-for-linux
edited Apr 11 at 1:06
muru
127k19266452
127k19266452
asked Apr 10 at 17:56
![](https://lh3.googleusercontent.com/-tm3GIVHB4MQ/AAAAAAAAAAI/AAAAAAAAAQs/03k51mC2xqc/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-tm3GIVHB4MQ/AAAAAAAAAAI/AAAAAAAAAQs/03k51mC2xqc/photo.jpg?sz=32)
seanbw
113
113
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41
add a comment |Â
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
WSL canâÂÂt run true services without additional support from and configuration of the Windows host system because it lacks an âÂÂinitâ daemon among other sub-systems and features that all fully fledged Linux systems have. Such differences are off topic here on Ask Ubuntu but youâÂÂre welcome to ask over on our sister site Super User.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
WSL canâÂÂt run true services without additional support from and configuration of the Windows host system because it lacks an âÂÂinitâ daemon among other sub-systems and features that all fully fledged Linux systems have. Such differences are off topic here on Ask Ubuntu but youâÂÂre welcome to ask over on our sister site Super User.
add a comment |Â
up vote
1
down vote
WSL canâÂÂt run true services without additional support from and configuration of the Windows host system because it lacks an âÂÂinitâ daemon among other sub-systems and features that all fully fledged Linux systems have. Such differences are off topic here on Ask Ubuntu but youâÂÂre welcome to ask over on our sister site Super User.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
WSL canâÂÂt run true services without additional support from and configuration of the Windows host system because it lacks an âÂÂinitâ daemon among other sub-systems and features that all fully fledged Linux systems have. Such differences are off topic here on Ask Ubuntu but youâÂÂre welcome to ask over on our sister site Super User.
WSL canâÂÂt run true services without additional support from and configuration of the Windows host system because it lacks an âÂÂinitâ daemon among other sub-systems and features that all fully fledged Linux systems have. Such differences are off topic here on Ask Ubuntu but youâÂÂre welcome to ask over on our sister site Super User.
answered Apr 16 at 10:09
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
![](https://i.stack.imgur.com/E0SEH.png?s=32&g=1)
David Foerster
25.5k1360104
25.5k1360104
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023747%2fhow-can-i-run-services-in-wsl%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
@Zanna: Alright. Done.
â David Foerster
Apr 16 at 10:09
Cross-posted to SU: superuser.com/questions/1343558/â¦
â slhck
Jul 30 at 15:41