TOP and HTOP Commands
top Command:
- The topcommand provides a dynamic view of system processes, continuously updating in real-time.
top- It displays a list of active processes with details like PID, CPU usage, memory usage, etc.
htop Command:
- htopis an enhanced alternative to- topwith a more user-friendly interface.
htop- It provides a visually appealing display of processes and their resource utilization.
Process Management Utilities
kill Command:
- The killcommand is used to send signals to processes.
# Terminate a process by PID 
kill <PID> 
# Send SIGTERM (termination) signal to a process 
kill -15 <PID> 
# Send SIGKILL (forceful termination) signal to a process 
kill -9 <PID>killall Command:
- The killallcommand sends a signal to all processes with a specific name.
killall <process-name>pstree Command
- The pstreecommand displays the processes in a tree format, showing their hierarchical relationship.
pstree- This command provides a visual representation of the parent-child relationships among processes.
pgrep and pkill Commands
pgrep Command:
- The pgrepcommand allows you to search for processes by their name.
pgrep <process-name>- It returns the PID(s) of processes that match the specified name.
pkill Command:
- The pkillcommand is used to send signals to processes based on their name.
pkill <process-name>- This command sends a signal to all processes whose names match the specified pattern.
Nice and Renice Commands
nice Command:
- The nicecommand is used to launch a process with a specified priority (niceness).
nice -n <priority> <command>renice Command:
- The renicecommand is used to change the priority of an existing process.
renice <priority> -p <PID>These tools and commands provide powerful capabilities for managing processes in a Unix environment. They allow users to monitor, terminate, and adjust process priorities as needed.
