11

I use htop all the time when I'm working on Linux system. I've installed htop-osx through Homebrew on my Mac, but in order to see all data for all processes, the formula tells me that I need to run htop as root, using sudo.

On a Linux system, it appears that root privileges are not required to show all data for all processes in htop.

My question is why do I need to do this on a Mac, but I don't on a Linux system?

Previously, the suggested solution to this problem was to set the setuid bit on the htop binary and chown the binary to root so that it runs as the root user. However, a change was made away from this method to use sudo instead.

1 Answer 1

13

On Linux, htop uses the /proc filesystem, which allows viewing information provided by the kernel. That (/proc) is not part of OSX, so (like some other systems lacking this feature), one can only get at the kernel's data using privileged access.

For more discussion

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .