Performing system operations is a crucial part of managing a Linux system. Here are some essential commands for handling
System Operations in Linux
ps
: Display currently active processes
- Basic usage:
$ ps
- Show all processes for all users:
$ ps aux
top
: Real-time Process Monitoring
- Basic usage:
$ top
- Some key commands while
top
is running:-
q
: Quit top -
u
: Show processes for a specific user -
k
: Kill a specific process
-
kill
: Terminate Processes
- Basic usage (using process ID):
$ kill [process_id]
- Send a specific signal to a process (e.g., sending the SIGKILL signal):
$ kill -[signal] [process_id]
For example, to send the SIGKILL
signal:
```bash
$ kill -9 [process_id]
```
shutdown
: Shutdown or restart the system
- Shutdown immediately:
$ shutdown -h now
- Reboot immediately:
$ shutdown -r now
- Shutdown with a message:
$ shutdown -h +10 "System will shutdown in 10 minutes"
This will shut down the system in 10 minutes and broadcast the provided message to all logged-in users.
Understanding these system operation commands is essential for effectively managing and maintaining a Linux system.
Top comments (0)