Process Handling
Listing Running Processes
- List all processes:
ps aux - Check processes being ran by a specific user:
ps aux -u [user ID or name] - Process utilisation preview:
top(highly recommened to usehtopinstead, install if not already present) - Get the process ID of processes with a particular name:
pidof [exact name of process]
Killing Processes
- Killing a process:
kill [process ID] - Force killing a process:
kill -9 [process ID] - Kill all processes which contain a value in their name:
pkill [value] - Kill all processes named a value exactly:
killall [value]
SystemD
- Stop a service:
systemctl stop [service name] - Start a service:
systemctl start [service name] - Restart a service:
systemctl restart [service name] - Check the status of a service:
systemctl status [service name]
Services can be enabled, allowing them to be started on boot.
To enable a service: systemctl enable [service name]
You can disable an enabled service to stop it from starting on boot.
To disable a service: systemctl disable [service name]
Services
- Start a service:
service [service name] start - Restart a service:
service [service name] restart - Stop a service:
service [service name] stop - Check the status of a service:
service [service name] status