2

On my Windows 10 machine, I've installed a Ubuntu system (as a Trusted Microsoft Store app). When I open that window and type help, these are the first lines I see:

GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

The results of uname -a are the following:

Linux DOMINIQUEDS 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

In that Ubuntu window, I have lots of interesting Linux/UNIX features, like find, grep, ..., but now I would like to do some process handling (ps -ef, kill -9), and this seems not to work:

When opening Windows task manager, I see ±100 processes running.

When I run ps -ef, (even after having opened the Ubuntu window as administrator), I only see three processes:

DominiqueDS@DOMINIQUEDS:~$ ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 17:14 ?        00:00:00 /init
Dominiq+     2     1  0 17:14 tty1     00:00:00 -bash
Dominiq+    18     2  0 17:19 tty1     00:00:00 ps -ef

Does anybody know how I can make ps -ef and kill -9 work in this Ubuntu window on my Windows-10 machine?

Thanks in advance

0

Well you can't. WSL Bash in Windows 10 runs in a kind of sandbox, and has no access to windows processes.

| improve this answer | |
0

From Wikipedia:

The proc filesystem provides a method of communication between kernel space and user space. For example, the GNU version of the process reporting utility ps uses the proc file system to obtain its data, without using any specialized system calls.

The ps command allows you to control the Linux Kernel. On Windows 10 WSL (version 1) there is no Linux Kernel for the ps command to control. There is only a Windows 10 kernel.

Things may change in future WSL versions but for the time being you can enjoy learning about all the GNU utilities like grep, sed and even GUI apps if you install Ubuntu Desktop:

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.