To view and manage processes on Fedora, you can use several commands in the terminal. The most common commands are ps, top, and htop.
ps Command: This command is used to display information about active processes. For example, ps aux will list all running processes with detailed information such as user, PID (process ID), CPU & memory usage, and the command that started the process.
top Command: This command provides a dynamic real-time view of the running system. It displays a list of processes and their system resource usage on a full screen. You can sort the processes by CPU usage, memory usage, and other criteria. Simply type top in the terminal to use it.
htop Command: This is an interactive process viewer for Unix systems, similar to top, but offers more features and a more user-friendly interface. It allows you to scroll through the processes, kill processes, and change their priority. To use htop, you might need to install it first with sudo dnf install htop.
For managing processes, you can use the kill command to terminate a process by its PID. For example, kill 1234 will terminate the process with PID 1234. If the process does not terminate, you can use kill -9 1234 to force it to stop.
In a cloud environment like Tencent Cloud, you can manage processes on your Fedora instances using the same commands through the Tencent Cloud Console's SSH access feature. This allows you to securely connect to your instance and perform process management tasks as if you were directly connected to the server.