Linux – How to equivalent to ps -ef in Windows 10

gdbgnulinuxpowershellwindows 10

I have looked online, and have not found anything that would accomplish what I want to do. I am looking for a command with output equivalent to "ps -ef" of Linux so I can find out the process id associated with an executable I created myself. I want to do this so can attach the GDB debugger to it. I am doing this on a windows 10 machine. I found out about get-process in powershell, but the output does not show me the name of the executable like ps command does. Can anyone help? I am trying to follow these procedures.

Here is the type of output I am after:

B$ ps -ef
...
user     17809 16492  7 21:28 pts/1    00:00:00 java JNITest
user     17821 14042  4 21:28 pts/2    00:00:00 bash
user     17845 17821  0 21:28 pts/2    00:00:00 ps -ef

Thanks. You were both right. I had to look for "java".

Best Answer

Use powershell rather than the typical cmd prompt. Just type powershell to open up a term. Then in powershell type Get-Process to list all processes. To get a specific process do Get-Process -Id 99. Of course 99 would be your PID.

Related Question