lsmod gives error: “could not get list of modules” on Debian running on WSL

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












When I run lsmod or sudo lsmod, I get an error that says:



libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory


I searched on a lot of forums but am unable to find a solution for this. I'm running Debian on Windows Subsystem for Linux.



I was recently also trying to edit the sysctl.conf file for the purpose of disabling ipv6. I had added the following lines:



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


And when I tried sudo sysctl -p, it returned this error:



sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/default/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/lo/disable_ipv6: No such file or directory


I'm not sure if the above 2 errors are connected. I was trying to run Linux shell on Windows. Any solution to the problem?







share|improve this question

















  • 2




    Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
    – Rui F Ribeiro
    Apr 20 at 13:35














up vote
1
down vote

favorite












When I run lsmod or sudo lsmod, I get an error that says:



libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory


I searched on a lot of forums but am unable to find a solution for this. I'm running Debian on Windows Subsystem for Linux.



I was recently also trying to edit the sysctl.conf file for the purpose of disabling ipv6. I had added the following lines:



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


And when I tried sudo sysctl -p, it returned this error:



sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/default/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/lo/disable_ipv6: No such file or directory


I'm not sure if the above 2 errors are connected. I was trying to run Linux shell on Windows. Any solution to the problem?







share|improve this question

















  • 2




    Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
    – Rui F Ribeiro
    Apr 20 at 13:35












up vote
1
down vote

favorite









up vote
1
down vote

favorite











When I run lsmod or sudo lsmod, I get an error that says:



libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory


I searched on a lot of forums but am unable to find a solution for this. I'm running Debian on Windows Subsystem for Linux.



I was recently also trying to edit the sysctl.conf file for the purpose of disabling ipv6. I had added the following lines:



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


And when I tried sudo sysctl -p, it returned this error:



sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/default/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/lo/disable_ipv6: No such file or directory


I'm not sure if the above 2 errors are connected. I was trying to run Linux shell on Windows. Any solution to the problem?







share|improve this question













When I run lsmod or sudo lsmod, I get an error that says:



libkmod: ERROR ../libkmod/libkmod-module.c:1655 kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory


I searched on a lot of forums but am unable to find a solution for this. I'm running Debian on Windows Subsystem for Linux.



I was recently also trying to edit the sysctl.conf file for the purpose of disabling ipv6. I had added the following lines:



net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


And when I tried sudo sysctl -p, it returned this error:



sysctl: cannot stat /proc/sys/net/ipv6/conf/all/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/default/disable_ipv6: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv6/conf/lo/disable_ipv6: No such file or directory


I'm not sure if the above 2 errors are connected. I was trying to run Linux shell on Windows. Any solution to the problem?









share|improve this question












share|improve this question




share|improve this question








edited 2 hours ago









Rui F Ribeiro

34.5k1269113




34.5k1269113









asked Apr 20 at 13:29









Momo Senpai

83




83







  • 2




    Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
    – Rui F Ribeiro
    Apr 20 at 13:35












  • 2




    Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
    – Rui F Ribeiro
    Apr 20 at 13:35







2




2




Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
– Rui F Ribeiro
Apr 20 at 13:35




Debian on WSL is not exactly the same thing...I am not much surprised about the IPv6 tidbit.
– Rui F Ribeiro
Apr 20 at 13:35










1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










In both cases, you’re trying to interact with the kernel. Any Linux environment running on WSL isn’t running a Linux kernel, it’s running on the Windows kernel; so anything tied to the Linux kernel (including modules and system controls) won’t work.



In the IPv6 case, you need to configure the network using Windows’ tools.






share|improve this answer





















  • Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
    – Momo Senpai
    Apr 20 at 14:17











  • The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
    – Stephen Kitt
    Apr 20 at 14:30











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438940%2flsmod-gives-error-could-not-get-list-of-modules-on-debian-running-on-wsl%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote



accepted










In both cases, you’re trying to interact with the kernel. Any Linux environment running on WSL isn’t running a Linux kernel, it’s running on the Windows kernel; so anything tied to the Linux kernel (including modules and system controls) won’t work.



In the IPv6 case, you need to configure the network using Windows’ tools.






share|improve this answer





















  • Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
    – Momo Senpai
    Apr 20 at 14:17











  • The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
    – Stephen Kitt
    Apr 20 at 14:30















up vote
4
down vote



accepted










In both cases, you’re trying to interact with the kernel. Any Linux environment running on WSL isn’t running a Linux kernel, it’s running on the Windows kernel; so anything tied to the Linux kernel (including modules and system controls) won’t work.



In the IPv6 case, you need to configure the network using Windows’ tools.






share|improve this answer





















  • Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
    – Momo Senpai
    Apr 20 at 14:17











  • The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
    – Stephen Kitt
    Apr 20 at 14:30













up vote
4
down vote



accepted







up vote
4
down vote



accepted






In both cases, you’re trying to interact with the kernel. Any Linux environment running on WSL isn’t running a Linux kernel, it’s running on the Windows kernel; so anything tied to the Linux kernel (including modules and system controls) won’t work.



In the IPv6 case, you need to configure the network using Windows’ tools.






share|improve this answer













In both cases, you’re trying to interact with the kernel. Any Linux environment running on WSL isn’t running a Linux kernel, it’s running on the Windows kernel; so anything tied to the Linux kernel (including modules and system controls) won’t work.



In the IPv6 case, you need to configure the network using Windows’ tools.







share|improve this answer













share|improve this answer



share|improve this answer











answered Apr 20 at 13:54









Stephen Kitt

140k22303364




140k22303364











  • Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
    – Momo Senpai
    Apr 20 at 14:17











  • The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
    – Stephen Kitt
    Apr 20 at 14:30

















  • Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
    – Momo Senpai
    Apr 20 at 14:17











  • The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
    – Stephen Kitt
    Apr 20 at 14:30
















Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
– Momo Senpai
Apr 20 at 14:17





Is there any work around to this? And could there be instances where I would need to probably interact with the kernel in order to perform some important task? Is there a workaround in that case?
– Momo Senpai
Apr 20 at 14:17













The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
– Stephen Kitt
Apr 20 at 14:30





The workaround is to run a full Linux environment, e.g. in a VM. There are some things which you can only do with a Linux kernel, just as there are others you can only do with Windows. You need to use the appropriate tool for your requirements; WSL gives you a Linux user-space on Windows, but it isn’t Linux.
– Stephen Kitt
Apr 20 at 14:30













 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f438940%2flsmod-gives-error-could-not-get-list-of-modules-on-debian-running-on-wsl%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)