Linux hide processes from other users and ps command

htt‮/:sp‬/www.lautturi.com
Linux hide processes from other users and ps command

There are a few ways to hide processes from other users on a Linux system:

  1. Change the name of the process: You can use the rename command to change the name of a process, which will make it harder for other users to find the process using tools like ps. For example, to rename the process with PID 12345 to "hidden_process," you could use the following command: rename 12345 hidden_process.

  2. Use a user namespace: User namespaces allow you to create a new namespace with its own set of users and groups, which can be used to isolate processes from the rest of the system. To create a new namespace, you can use the unshare command with the --user option.

  3. Use cgroups: Control groups (cgroups) allow you to allocate resources such as CPU, memory, and I/O bandwidth to processes and groups of processes. You can use cgroups to limit the resources available to a process, which can make it harder for other users to find the process using tools like ps.

It's important to note that it is generally not recommended to try to hide processes from other users on a shared system, as it can create security vulnerabilities and make it harder for system administrators to manage the system.

Created Time:2017-10-30 10:17:40  Author:lautturi